X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=grml-debootstrap;h=d783f26834d27e75da8109cc32bc6136b351aaff;hb=8b6758774e28151bb30f72232d5af9f01833b120;hp=7fd52a26505a24e03364399aec1fe23361050eac;hpb=f42f932bfcca306c1d53b49b2c51e2db08837ac4;p=grml-debootstrap.git diff --git a/grml-debootstrap b/grml-debootstrap index 7fd52a2..d783f26 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -157,6 +157,7 @@ Configuration options: --chroot-scripts Execute chroot scripts from specified directory. --pre-scripts Execute scripts from specified directory (before chroot-scripts). --scripts Execute scripts from specified directory (after chroot-scripts). + --remove-configs Delete grml-debootstrap configuration files from installed system. Other options: @@ -244,6 +245,12 @@ cleanup() { einfo "Removing ${STAGES}" ; rmdir "$STAGES" ; eend $? fi + if [ "$REMOVE_CONFIGS" = "yes" ] ; then + einfo "Removing configuration files from installed system as requested via --remove-configs / REMOVE_CONFIGS." + rm -rf "${MNTPOINT}"/etc/debootstrap/ + eend $? + fi + # Remove temporary mountpoint again if echo "$MNTPOINT" | grep -q '/mnt/debootstrap\.' ; then rmdir "$MNTPOINT" 2>/dev/null @@ -405,6 +412,7 @@ fi [ "$_opt_force" ] && FORCE=$_opt_force [ "$_opt_verbose" ] && VERBOSE="-v" [ "$_opt_debug" ] && DEBUG="true" +[ "$_opt_remove_configs" ] && REMOVE_CONFIGS="yes" # make sure main is always included [ -z "$COMPONENTS" ] && COMPONENTS="main" @@ -1199,8 +1207,13 @@ fi case "$RELEASE" in lenny|squeeze|wheezy) - einfo "Adjusting grub.cfg for successful boot sequence." - sed -i "s;root=[^ ]\+;root=UUID=$TARGET_UUID;" "${MNTPOINT}"/boot/grub/grub.cfg + if grep -q '^GRUB_DISABLE_LINUX_UUID=true' "${MNTPOINT}"/etc/default/grub 2>/dev/null ; then + ewarn "GRUB_DISABLE_LINUX_UUID is set to true in /etc/default/grub, not adjusting root= in grub.cfg." + ewarn "Please note that your system might NOT be able to properly boot." + else + einfo "Adjusting grub.cfg for successful boot sequence." + sed -i "s;root=[^ ]\+;root=UUID=$TARGET_UUID;" "${MNTPOINT}"/boot/grub/grub.cfg + fi ;; esac