Grub Hook to grub-install and grub-mkconfig?

Just put your hook in /etc/pacman.d/hooks and uncomment the line

#HookDir = /etc/pacman.d/hooks/

in

/etc/pacman.conf

I would delete:


Operation = remove

There will be no grub-install to talk about if the package Grub is removed.

Operation = install

seems unnecessary as well, since the package is already installed.

The hook needs to be triggered only when the package is upgraded.

1 Like