X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;fp=grml-debootstrap;h=945b8596fde349a75abb6c94cb92b230574104a1;hp=accef960a9fdfc0c6a7343d76bece6c136367168;hb=430abb16315fef4bfc5f7b129b452c26ffb9b6ae;hpb=d806498f5bfdc871a2cbe0386fd9dc33a36ea731 diff --git a/grml-debootstrap b/grml-debootstrap index accef96..945b859 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -266,7 +266,7 @@ cleanup() { # ugly, but make sure we really don't leave anything (/proc /proc and # /dev /dev are intended, trying to work around timing issues, see #657023) - for ARG in /sys /proc /proc /dev/pts /dev/pts /dev /dev ; do + for ARG in /run/udev /sys /proc /proc /dev/pts /dev/pts /dev /dev ; do [ -x "$MNTPOINT"/bin/umount ] && chroot "$MNTPOINT" umount $ARG >/dev/null 2>&1 umount "$MNTPOINT"/$ARG >/dev/null 2>&1 done @@ -1742,6 +1742,13 @@ iface eth0 inet dhcp cp /etc/network/interfaces.examples "$MNTPOINT/etc/network/interfaces.examples" fi + if [ -d /run/udev ] ; then + einfo "Setting up bind-mount /run/udev" + mkdir -p "${MNTPOINT}"/run/udev + mount --bind /run/udev "${MNTPOINT}"/run/udev + eend $? + fi + eend 0 } # }}} @@ -1866,6 +1873,12 @@ umount_chroot() { fi if grep -q "$MNTPOINT" /proc/mounts ; then + if mountpoint "${MNTPOINT}"/run/udev &>/dev/null ; then + einfo "Unmounting bind-mount /run/udev" + umount "${MNTPOINT}"/run/udev + eend $? + fi + if [ -n "$PARTITION" ] ; then einfo "Unmount $MNTPOINT" umount "$MNTPOINT"