Once installed, what do the EndeavourOS packages offer over bare Arch?

To trigger an action automatically after the completion of a specific task.

For instance, the automatic re-generation of initrd and grub after a kernel update, using a pacman hook. Without a hook you would have to do this manually, failure to do so may lead to a non booting system, until chrooting in to correct.

There are others provided by EOS installation.

$ ll /etc/pacman.d/hooks
total 32
drwxr-xr-x 2 root root 4096 Nov 26 14:10 .
drwxr-xr-x 4 root root 4096 Nov  3 12:26 ..
-rw-r--r-- 1 root root  199 Nov  7 07:00 eos-hooks.hook
-rw-r--r-- 1 root root  634 Nov  7 07:00 eos-reboot-required.hook
-rw-r--r-- 1 root root  242 Nov 25 23:42 grub-fix-initrd-generation.hook
-rw-r--r-- 1 root root  373 Nov 25 23:42 grub-update-after-kernel.hook
-rw-r--r-- 1 root root  211 Nov  7 07:00 lsb-release.hook
-rw-r--r-- 1 root root  209 Nov  7 07:00 os-release.hook

The structure of a pacman hook is simple enough, any change to a target package will trigger the defined action.

$ cat /etc/pacman.d/hooks/grub-update-after-kernel.hook
[Trigger]
Operation = Install
Operation = Remove
Type = Package
Target = linux
Target = linux-lts
Target = linux-zen
Target = linux-hardened
Target = amd-ucode
Target = intel-ucode

[Action]
Description = Update grub after installing or removing a kernel or microcode.
When = PostTransaction
Depends = grub
Exec = /bin/sh -c "/usr/bin/grub-mkconfig -o /boot/grub/grub.cfg"

mkinitcpio hooks are … same same but different.

6 Likes