projects
/
grml-debootstrap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
06e9a24
)
Directly invoke /usr/sbin/update-grub
author
Michael Prokop
<mika@grml.org>
Mon, 16 Apr 2007 12:51:14 +0000
(14:51 +0200)
committer
Michael Prokop
<mika@grml.org>
Mon, 16 Apr 2007 12:51:14 +0000
(14:51 +0200)
chroot-script
patch
|
blob
|
history
diff --git
a/chroot-script
b/chroot-script
index
7753bdb
..
29cd840
100644
(file)
--- a/
chroot-script
+++ b/
chroot-script
@@
-260,13
+260,18
@@
grub() {
[ "$RELEASE" = 'sarge' ] && cp /lib/grub/i386-pc/* /boot/grub/
# finally install 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
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
}
fi
fi
}