Merge remote-tracking branch 'origin/pr/118'
authorMichael Prokop <mika@grml.org>
Wed, 23 Jan 2019 15:38:10 +0000 (16:38 +0100)
committerMichael Prokop <mika@grml.org>
Wed, 23 Jan 2019 15:38:10 +0000 (16:38 +0100)
debian/changelog
grml-debootstrap

index 6d3a397..4ed124b 100644 (file)
@@ -1,3 +1,10 @@
+grml-debootstrap (0.86) unstable; urgency=medium
+
+  * [430abb1] Bind-mount /run/udev in target system as workaround for lvm2
+    issue #918590
+
+ -- Michael Prokop <mika@grml.org>  Fri, 18 Jan 2019 14:15:40 +0100
+
 grml-debootstrap (0.85) unstable; urgency=medium
 
   * [218bf66] Rework backports.debian.org usage (`--backportrepos` option)
index accef96..945b859 100755 (executable)
@@ -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"