Update handling of findiso in combination with toram v1.157.1-1grml.05
authorMichael Prokop <mika@grml.org>
Fri, 29 May 2009 10:31:45 +0000 (12:31 +0200)
committerMichael Prokop <mika@grml.org>
Fri, 29 May 2009 10:37:32 +0000 (12:37 +0200)
debian/changelog
debian/patches/07_support_findiso.dpatch

index 8bb9d32..754b9bc 100644 (file)
@@ -1,3 +1,12 @@
+live-initramfs (1.157.1-1grml.05) unstable; urgency=low
+
+  * Update patch 07_support_findiso.dpatch: make sure to get rid of
+    loopback device and unmount /live/findiso when using findiso
+    bootoption in combination with toram. Thanks to Marc Haber.
+    [Closes: issue675]
+
+ -- Michael Prokop <mika@grml.org>  Fri, 29 May 2009 12:35:06 +0200
+
 live-initramfs (1.157.1-1grml.04) unstable; urgency=low
 
   * Update patch 06_support_fromiso_isofrom.dpatch:
index 74996e7..b9ef67c 100755 (executable)
@@ -43,11 +43,12 @@ diff -urNad live-initramfs-grml~/scripts/live live-initramfs-grml/scripts/live
  
                if is_live_path ${mountpoint} && \
                        ([ "${skip_uuid_check}" ] || matches_uuid ${mountpoint})
-diff -urNad live-initramfs-grml~/scripts/live-bottom/05mountpoints live-initramfs-grml/scripts/live-bottom/05mountpoints
---- live-initramfs-grml~/grml/05mountpoints    2008-11-04 01:20:22.000000000 +0100
-+++ live-initramfs-grml/grml/05mountpoints     2009-01-12 15:42:20.323387590 +0100
-@@ -33,4 +33,11 @@
-       mount --move /live/image /root/live/image
+diff --git a/grml/05mountpoints b/grml/05mountpoints
+index e2b07a4..6411171 100755
+--- a/grml/05mountpoints
++++ b/grml/05mountpoints
+@@ -38,4 +38,21 @@ if [ -n "$MOUNTED_ON" ] ; then
+    echo "   -> Mounted live system on $MOUNTED_ON">/dev/console
  fi
  
 +# Move findiso directory to the new root filesystem so that programs there can get at it.
@@ -57,4 +58,14 @@ diff -urNad live-initramfs-grml~/scripts/live-bottom/05mountpoints live-initramf
 +      mount -n --move /live/findiso /root/live/findiso
 +fi
 +
++# if we do not unmount the ISO we can't run "fsck /dev/ice" later on
++# because the mountpoint is left behind in /proc/mounts, so let's get
++# rid of it when running from RAM
++if [ -n "$FINDISO" ] && [ "${TORAM}" ]
++then
++  losetup -d /dev/loop0
++  grep -q /live/findiso /proc/mounts && umount /root/live/findiso
++fi
++
++
  log_end_msg