grml-chroot: exit with according exit code.
[grml-scripts.git] / usr_sbin / grml-chroot
index a53412c..b3d1184 100755 (executable)
@@ -90,8 +90,11 @@ mountit "sysfs" "sys"
 mountit "/dev"   "dev"   "--bind"
 if (( $# < 1 )); then
     chroot "$DEST_"
+    RC=$?
 else
     chroot "$DEST_" "$@"
+    RC=$?
 fi
 umount_all
 
+exit $RC