X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;h=7a5c9f066b19511c3c2501297ee7ecba3226a7e1;hp=f57b0c7370553fcd351f761b478eb89530a555ad;hb=c4ffcff0a85b654adc06e0b1fe4ef06927e20b26;hpb=86654c158b811c20dfe2247afd628083f6bb630a 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 } # }}}