X-Git-Url: https://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;h=4a9238ad7007612d928f0fe029ac2d87c374092d;hp=7960772e10f23223702eaf65e3fbf84a699dc7db;hb=46693218643ba59dc70e4a3ddc65af745edc8737;hpb=e54ae72e08c71669fccc297c9500e1d8e83447ca diff --git a/autoconfig.functions b/autoconfig.functions index 7960772..4a9238a 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -2150,10 +2150,13 @@ config_debootstrap(){ if stringinstring "BOOT_IMAGE=debian2hd " "$CMDLINE" ; then +einfo "Bootoption debian2hd found. Setting up environment for automatic installation via grml-debootstrap." ; eend 0 + if ! [ -x /usr/sbin/grml-debootstrap ] ; then + eindent eerror "Bootoption debian2hd found, but grml-debootstrap is not available." ; eend 1 - eerror "Dropping you to a shell, just exit it to continue booting." ; eend 1 - /bin/zsh + eoutdent + exit 1 fi if checkbootparam "partition" ; then @@ -2162,8 +2165,13 @@ if checkbootparam "partition" ; then # notice: the following checks whether the given partition is available, if not the skip # execution of grml-debootstrap as it might result in data loss... if ! [ -r $PARTITION ] ; then - ewarn "Partition $PARTITION does not exist. Skipping execution of grml-debootstrap therefore." ; eend 1 + eerror "Partition $PARTITION does not exist. Skipping execution of grml-debootstrap therefore." ; eend 1 fi +else + eindent + eerror "No bootoption partition found, can not continue execution of grml-debootstrap." ; eend 1 + eoutdent + exit 1 fi if checkbootparam "grub" ; then @@ -2211,9 +2219,10 @@ AUTOINSTALL='yes' grml-debootstrap $PARTITIONCMD $GRUBCMD $GROOTCMD $RELEASECMD EOF chmod 750 /usr/bin/grml-debootstrap_noninteractive -einfo "Bootoption debian2hd found. Running automatic installation via grml-debootstrap." && eend 0 -screen /usr/bin/grml-debootstrap_noninteractive ; einfo "Invoking a shell, just exit to continue booting..." ; /bin/zsh +screen /usr/bin/grml-debootstrap_noninteractive +einfo "Invoking a shell, just exit to continue booting..." +/bin/zsh fi # stringinstring "BOOT_IMAGE=debian2hd }