是否可以将目标变量传递给钩子脚本?
当更新另一个内核(linux)而不是我正在运行的内核(linux-hardened)时,需要它来实现内核模块保存机制。
[Trigger]
Operation = Upgrade
Type = Package
Target = linux
Target = linux-hardened
Target = linux-lts
Target = linux-zen
[Action]
Description = Save Linux kernel modules
When = PreTransaction
Depends = rsync
Exec = /bin/sh pacman-linux-update-modules-pre.sh $Target
答案1
man 5 alpm-hooks
并查看 NeedsTargets 说明符。
可以在线阅读该联机帮助页:https://jlk.fjfi.cvut.cz/arch/manpages/man/alpm-hooks.5