X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=27746dca1c630397919f99ab3db38e6f32dec4df;hp=49c73b7d49bb0dbe7d8c82a3d60caeca45f09043;hb=d5ca292be70bd267d20b58ab1f055e41c6d2ab52;hpb=90028449ca7de91e7a88cf843a1f7d352c3dc172 diff --git a/chroot-script b/chroot-script index 49c73b7..27746dc 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 Nov 06 12:31:50 CET 2006 [mika] +# Latest change: Mon Nov 06 15:33:28 CET 2006 [mika] ################################################################################ set -e # exit on any error @@ -145,8 +145,10 @@ if [ -n "$INITRD" ] ; then fi fi -if [ -n "$GROOT" ] ; then - echo "Installing grub" +if [ -z "$GROOT" ] ; then + echo "Warning: $GROOT is not defined, can not adjust grub configuration therefor." +else + echo "Adjusting grub configuration for use on ${GROOT}." # copy stage-files to /boot/grub/ [ -d /boot/grub/ ] || mkdir /boot/grub @@ -160,7 +162,7 @@ if [ -n "$GROOT" ] ; then # finally install grub update-grub -y 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 + 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