X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;h=d573ca929042aa43168d6dc1fb404c61c1c8c7ff;hp=576a8b6353d2852e94ec1a5555e5e3efb41eb425;hb=d919319a42917bd94b547dc1ce0db988dd189839;hpb=95f4b7c479cce25127be9d0ccc160d8bf179b37c diff --git a/grml-debootstrap b/grml-debootstrap index 576a8b6..d573ca9 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -108,6 +108,7 @@ Configuration options: Other options: -v, --verbose Increase verbosity. + --debug Execute in very verbose way. -h, --help Print this usage information and exit. -V, --version Show summary of options and exit. @@ -333,6 +334,11 @@ fi [ "$_opt_insecure" ] && echo "Warning: --insecure is deprecated, continuing anyway." [ "$_opt_force" ] && FORCE=$_opt_force [ "$_opt_verbose" ] && VERBOSE="-v" +[ "$_opt_debug" ] && DEBUG="true" + +if [ "$DEBUG" = "true" ] ; then + set -x +fi [ "$_opt_help" ] && { usage ; eend 0 @@ -840,7 +846,6 @@ set_target_directory(){ MKFS='' TUNE2FS='' FSCK='' - GRUB='' # make sure we normalise the path to an absolute directory name so something like: # mkdir -p foo/a bar/a; (cd foo; grml-debootstrap -t a)&; (cd bar; grml-debootstrap -t a)&; wait # works @@ -1277,7 +1282,11 @@ chrootscript() { else einfo "Executing chroot-script now" mount --bind /dev "$MNTPOINT"/dev - chroot "$MNTPOINT" /bin/chroot-script ; RC=$? + if [ "$DEBUG" = "true" ] ; then + chroot "$MNTPOINT" /bin/sh -x /bin/chroot-script ; RC=$? + else + chroot "$MNTPOINT" /bin/chroot-script ; RC=$? + fi umount "$MNTPOINT"/dev eend $RC fi