Warning!

Notice: the grml team is migrating from Mercurial to Git.
Please visit git.grml.org instead!

Directly invoke /usr/sbin/update-grub
authorMichael Prokop <mika@grml.org>
Mon Apr 16 14:51:14 2007 +0200 (19 months ago)
changeset 12031f3265882e8
manifest31f3265882e8
parent 1198ab6b6dc6938
child 121d434eacad871
Directly invoke /usr/sbin/update-grub
chroot-script
--- a/chroot-script Mon Apr 16 14:48:55 2007 +0200
+++ b/chroot-script Mon Apr 16 14:51:14 2007 +0200
@@ -260,13 +260,18 @@ grub() {
[ "$RELEASE" = 'sarge' ] && cp /lib/grub/i386-pc/* /boot/grub/
# finally install grub
- update-grub -y
+ if [ -x /usr/sbin/update-grub ] ; then
+ UPDATEGRUB='/usr/sbin/update-grub'
+ else
+ UPDATEGRUB='/sbin/update-grub'
+ fi
+ $UPDATEGRUB -y
if [ -f /boot/grub/menu.lst ] ; then
sed -i "s/^# groot=.*/# groot=(${GROOT})/g" /boot/grub/menu.lst
sed -i "s|^# kopt=root=.*|# kopt=root=${TARGET} ro|g" /boot/grub/menu.lst
# not sure why savedefault does not work for me; any ideas?
sed -i "s/^savedefault.*/# &/g" /boot/grub/menu.lst
- update-grub -y
+ $UPDATEGRUB -y
fi
fi
}