You are not logged in.
Hey,
I got several specific commands to run each time I do a kernel upgrade (such as recompiling VMWare and VirtualBox modules, etc).
Is there a way (writing sort of a script, obviously) to automate these tasks?
Meaning, after a pacman -Syu command, if the script (?) detects that the kernel has been updated,
it will automatically run the wanted post-upgrade commands.
Thanks
Fiod
Offline
See compilekernel.
Could use /etc/rc.local to check if the module is missing, or check the datestamp of the module vs the date of /boot/config, but that's just overkill.
Improve your desktop responsiveness and font rendering and ALSA sound and BusyBox init
Offline
you could create a new scrip to do the upgrade
syu.sh
#!/bin/sh
alias get_kver="pacman -Q kernel26 | cut -d' ' -f2"
kver=$(get_kver)
pacman -Syu || exit 1
if [ $kver != $(get_kver) ]; then
#~ do something
fior if you prefer to use the pacman command
pacman
#!/bin/sh
alias get_kver="/usr/bin/pacman -Q kernel26 | cut -d' ' -f2"
kver=$(get_kver)
/usr/bin/pacman $@ || exit 1
if [ $kver != $(get_kver) ]; then
do something
fiplacing the pacman script somewhere that appears in the $PATH ahead of /usr/bin
Last edited by raeven (2008-02-23 14:43:54)
Offline
That is exactly what I need.
Thanks a lot!
Offline