3 TOUCHFILE
=/var
/run
/pm-bust
4 QUESTION
="Kernel update detected. Should I shutdown instead?"
9 if [ -f /usr
/bin
/zenity
]; then
10 zenity
--question --text "$QUESTION"
12 elif [ -f /usr
/bin
/Xdialog
]; then
13 Xdialog
--yesno "$QUESTION" 200x90
16 echo "Install zenity or xdialog for GUI"
20 if [ -f $TOUCHFILE ]; then
21 if [ $
(find /var
/cache
/pacman
/ -name 'kernel26*' -newer $TOUCHFILE |
wc -l) -gt 0 ]; then
22 if [ "$1" == "-gui" ]; then
26 if [ "$?" -eq 0 ]; then
32 echo "Kernel update detected. Should I shutdown instead? [y/N]"
36 if [ "$shutdown" == "y" ]; then