X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=usr_sbin%2Fgrml-chroot;h=e9c1ae35e054d780f04af08171f5110bc1c1a703;hb=2706049698b8bc7478aa252f5e3a4f394bad4e5e;hp=4277c34e9036f2caa8d715c88f77f39153e233d2;hpb=18f85c7883a8fccadf4292c693388e73f866d1b6;p=grml-scripts.git diff --git a/usr_sbin/grml-chroot b/usr_sbin/grml-chroot index 4277c34..e9c1ae3 100755 --- a/usr_sbin/grml-chroot +++ b/usr_sbin/grml-chroot @@ -9,7 +9,6 @@ PROG_NAME_=$(basename $0) DEST_="" MOUNTED_="" # all mounted destinations -COMMAND_="" # command to start in chroot function die @@ -23,7 +22,7 @@ function printUsage cat < "$DEST_"/etc/debian_chroot +fi + +if (( $# < 1 )); then + chroot "$DEST_" + RC=$? +else + chroot "$DEST_" "$@" + RC=$? +fi umount_all +if [ ! -z "$WROTE_DEBIAN_CHROOT" ]; then + rm "$DEST_"/etc/debian_chroot +fi + +exit $RC