X-Git-Url: http://git.grml.org/?p=grml-scripts.git;a=blobdiff_plain;f=usr_sbin%2Fgrml-chroot;fp=usr_sbin%2Fgrml-chroot;h=a894e39040e8f753f3c65b5c690312f131529697;hp=6e292d5129679f5f47383be520bb27623a226400;hb=a753f245b085d1f2e213e0b4d66c8041a3a0d4b7;hpb=7a37b6b3e3b22fe58f2af563e2c04f3cf1910d91 diff --git a/usr_sbin/grml-chroot b/usr_sbin/grml-chroot index 6e292d5..a894e39 100755 --- a/usr_sbin/grml-chroot +++ b/usr_sbin/grml-chroot @@ -90,10 +90,15 @@ if [ ! -d "$DEST_" ]; then fi -mountit "proc" "proc" -mountit "sysfs" "sys" -mountit "/dev" "dev" "--bind" -mountit "devpts" "dev/pts" + +if [ -f "$DEST_"/proc/cmdline ] ; then + echo "Looks like $DEST_ already has filesystems mounted, skipping." +else + mountit "proc" "proc" + mountit "sysfs" "sys" + mountit "/dev" "dev" "--bind" + mountit "devpts" "dev/pts" +fi WROTE_DEBIAN_CHROOT="" if [ ! -f "$DEST_"/etc/debian_chroot ]; then