From c4ffcff0a85b654adc06e0b1fe4ef06927e20b26 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 16 Apr 2007 13:18:04 +0200 Subject: [PATCH] Make chrootscript() more independent --- grml-debootstrap | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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 } # }}} -- 2.1.4