You are not logged in.
I can't find a current thread on this topic, but have to believe it has been asked before...
What I want to do is every time pacman updates the stock arch kernel, have pacman run a script after the upgrade. Is there a hook in pacman to do this, but only after a new kernel?
It seems that it should be possible to set up a monitor within pacman that says, "if package X is updated, then run script xxx". This would be great as then when the kernel is updated my VBox Additions could be upgraded or any one a 100 other scenario's.
Thanks.
Offline
This is currently being discussed on the pacman-dev list. A draft proposal is available here: http://wiki.archlinux.org/index.php/Use … cman_Hooks
Offline
pretty sure there's no default pacman functionality for this. just thinking real quick, you could do something like this as a workaround:
pacup() {
sudo pacman -Syu | tee /tmp/updates.$$
if grep -q "upgraded kernel26" /tmp/updates.$$; then
echo "kernel was upgraded, doing... whatever"
# do whatever here...
fi
rm /tmp/updates.$$
}add that as a bash function, it'll be normal -Syu if kernels not upgraded and it'll run your stuff if it is. i don't really see any issues with doing this... but wouldn't be surprised if there were, and i'm sure someone here will correct me. ![]()
//github/
Offline