projects
/
grml-scripts.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: Erase all forgotten stuff from grml-config-user [Closes: issue1272]
[grml-scripts.git]
/
usr_sbin
/
grml-chroot
diff --git
a/usr_sbin/grml-chroot
b/usr_sbin/grml-chroot
index
a53412c
..
e9c1ae3
100755
(executable)
--- a/
usr_sbin/grml-chroot
+++ b/
usr_sbin/grml-chroot
@@
-88,10
+88,25
@@
fi
mountit "proc" "proc"
mountit "sysfs" "sys"
mountit "/dev" "dev" "--bind"
mountit "proc" "proc"
mountit "sysfs" "sys"
mountit "/dev" "dev" "--bind"
+
+WROTE_DEBIAN_CHROOT=""
+if [ ! -f "$DEST_"/etc/debian_chroot ]; then
+ WROTE_DEBIAN_CHROOT="yes"
+ echo "Writing /etc/debian_chroot ..."
+ cat "$DEST_"/etc/hostname > "$DEST_"/etc/debian_chroot
+fi
+
if (( $# < 1 )); then
chroot "$DEST_"
if (( $# < 1 )); then
chroot "$DEST_"
+ RC=$?
else
chroot "$DEST_" "$@"
else
chroot "$DEST_" "$@"
+ RC=$?
fi
umount_all
fi
umount_all
+if [ ! -z "$WROTE_DEBIAN_CHROOT" ]; then
+ rm "$DEST_"/etc/debian_chroot
+fi
+
+exit $RC