X-Git-Url: http://git.grml.org/?a=blobdiff_plain;ds=sidebyside;f=usr_sbin%2Fgrml-chroot;h=3b2750549765bd47f3c55309f4b36ac6954863e4;hb=74367b9f37596ec5c775c4e44a3ecf45366a2232;hp=6e292d5129679f5f47383be520bb27623a226400;hpb=3559bd707848cb41e6e0de2432db793385a26edf;p=grml-scripts.git diff --git a/usr_sbin/grml-chroot b/usr_sbin/grml-chroot index 6e292d5..3b27505 100755 --- a/usr_sbin/grml-chroot +++ b/usr_sbin/grml-chroot @@ -90,10 +90,18 @@ 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" + if [ -d "$DEST_"/run/udev ] && [ -d /run/udev ] ; then + mountit "/run/udev" "/run/udev" "--bind" + fi +fi WROTE_DEBIAN_CHROOT="" if [ ! -f "$DEST_"/etc/debian_chroot ]; then