-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The hook now reacts on updated files instead of updated packages, like the `mkinitcpio` hook does. This allows it to be triggered each time a kernel image is updated: - when a kernel package is updated (e.g. `linux`); - when a dependency is updated (e.g. `systemd`). This also allows to only rebuild the kernel images that were actually updated instead of always rebuilding all. The main script now accepts kernel names as arguments for that. Files have been renamed to be more consistent with the AUR package.
- Loading branch information
1 parent
f31b91a
commit b9eb737
Showing
6 changed files
with
57 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Trigger] | ||
Type = Path | ||
Operation = Install | ||
Operation = Upgrade | ||
Target = usr/lib/modules/*/vmlinuz | ||
Target = usr/lib/initcpio/* | ||
|
||
[Action] | ||
Description = Updating EFI kernel images | ||
When = PostTransaction | ||
Exec = /etc/pacman.d/hooks/efi-kernel-update.sh | ||
NeedsTargets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash -e | ||
|
||
while read -r updated_file; do | ||
if [[ $updated_file == usr/lib/initcpio/* ]]; then | ||
# all kernels images have been updated | ||
build_efi_kernels | ||
|
||
break | ||
fi | ||
|
||
pkgbase_file="${updated_file%/vmlinuz}/pkgbase" | ||
if ! read -r kernel > /dev/null 2>&1 < "${pkgbase_file}"; then | ||
continue | ||
fi | ||
|
||
build_efi_kernels "${kernel}" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.