Is it possible to pass the target variable to the hook script?

Need it for kernel-module saving mechanism, when another kernel is updated (linux) instead of my running one (linux-hardened).

Operation = Upgrade
Type = Package
Target = linux
Target = linux-hardened
Target = linux-lts
Target = linux-zen

Description = Save Linux kernel modules
When = PreTransaction
Depends = rsync
Exec = /bin/sh pacman-linux-update-modules-pre.sh $Target
man 5 alpm-hooks

And see the NeedsTargets specifier.

The manpage can be read online at https://jlk.fjfi.cvut.cz/arch/manpages/man/alpm-hooks.5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.