PCLinuxOS grub update script

An annoying thing in PCLinuxOS is a lack of update-grub feature. After grub package grub menu need to update by hand. An another choise is to use a script, which needs xterm and zenity installed.

grub-update.zip

The code:

#!/bin/sh

zenity --question --text "Would you like to update grub?"
if [ $? = 0 ];
then
xterm -e su -c 'xterm -e grub2-mkconfig -o /boot/grub2/grub.cfg' root && zenity --info --text "Grub menu updated"
else exit 0
fi