From: Michael Prokop Date: Mon, 16 Apr 2007 11:18:04 +0000 (+0200) Subject: Make chrootscript() more independent X-Git-Tag: 0.7~32 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=c4ffcff0a85b654adc06e0b1fe4ef06927e20b26 Make chrootscript() more independent --- diff --git a/grml-debootstrap b/grml-debootstrap index f57b0c7..7a5c9f0 100644 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -232,9 +232,17 @@ preparechroot() { # execute chroot-script {{{ chrootscript() { - einfo "Executing chroot-script now" - chroot "$MNTPOINT" /bin/chroot-script - eend $? + if ! [ -r "$MNTPOINT/bin/chroot-script" ] ; then + mount_target + fi + if [ -x "$MNTPOINT/bin/chroot-script" ] ; then + einfo "Executing chroot-script now" + chroot "$MNTPOINT" /bin/chroot-script + eend $? + else + eerror "Fatal: $MNTPOINT/bin/chroot-script could not be found." + eend 1 + fi } # }}}