X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=29cd840872bf70e8fed97cb273be99c0c6acbba5;hp=bb6d7ad4821db66a51408d29e1dec9fba66546a6;hb=a454a1ad00616dd231602e66782483010384723b;hpb=86654c158b811c20dfe2247afd628083f6bb630a diff --git a/chroot-script b/chroot-script index bb6d7ad..29cd840 100644 --- a/chroot-script +++ b/chroot-script @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Mon Apr 16 13:12:14 CEST 2007 [mika] +# Latest change: Mon Apr 16 14:48:41 CEST 2007 [mika] ################################################################################ set -e # exit on any error @@ -89,7 +89,7 @@ packages() { exit 1 else $APTUPDATE - $APT $(cat /etc/debootstrap/packages) $GRMLPACKAGES + $APTINSTALL $(cat /etc/debootstrap/packages) $GRMLPACKAGES fi fi } @@ -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 }