Refresh debian/patches/07_support_findiso.dpatch.
authorMichael Prokop <mika@grml.org>
Tue, 11 May 2010 09:04:26 +0000 (11:04 +0200)
committerMichael Prokop <mika@grml.org>
Tue, 11 May 2010 09:04:26 +0000 (11:04 +0200)
debian/patches/07_support_findiso.dpatch

index 1375666..0a28d8a 100755 (executable)
@@ -3,53 +3,19 @@
 ##
 ## All lines beginning with `## DP:' are a description of the patch.
 ## DP: support for findoiso bootoption
-# When booting with findiso=/grml_2008.11.iso, it will look for
+# When booting with findiso=/grml_2010.05.iso, it will look for
 # that .iso file on all disks where it usually looks for the .squashfs
 # file. When it is found, the disk containing the iso is read-only mounted
 # as /live/findiso (and exposed there after boot completed). The squashfs
 # file is searched inside that ISO file then.
 
 @DPATCH@
-diff -urNad live-initramfs-grml~/scripts/live live-initramfs-grml/scripts/live
---- live-initramfs-grml~/scripts/live  2009-01-12 15:42:17.752549464 +0100
-+++ live-initramfs-grml/scripts/live   2009-01-12 15:42:20.323387590 +0100
-@@ -92,6 +92,11 @@
-                               export HOSTNAME LIVECONF
-                               ;;
-+                      findiso=*)
-+                              FINDISO="${ARGUMENT#findiso=}"
-+                              export FINDISO
-+                              ;;
-+
-                       isofrom=*|fromiso=*)
-                               FROMISO="${ARGUMENT#*=}"
-                               export FROMISO
-@@ -1385,6 +1390,17 @@
-       if is_supported_fs ${fstype}
-       then
-               mount -t ${fstype} -o ro,noatime "${devname}" ${mountpoint} || continue
-+              if [ -n "${FINDISO}" ]
-+              then
-+                      if [ -f ${mountpoint}/${FINDISO} ]; then
-+                              umount ${mountpoint}
-+                              mkdir /live/findiso -p
-+                              mount -t ${fstype} -o ro,noatime "${devname}" /live/findiso
-+                              loopdevname=$(setup_loop "/live/findiso/${FINDISO}" "loop" "/sys/block/loop*" "" '')
-+                              devname="${loopdevname}"
-+                              mount -t iso9660 -o ro,noatime "${devname}" ${mountpoint}
-+                      fi
-+              fi
-               if is_live_path ${mountpoint} && \
-                       ([ "${skip_uuid_check}" ] || matches_uuid ${mountpoint})
-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
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' live-initramfs-grml~/grml/05mountpoints live-initramfs-grml/grml/05mountpoints
+--- live-initramfs-grml~/grml/05mountpoints    2010-05-11 11:00:21.000000000 +0200
++++ live-initramfs-grml/grml/05mountpoints     2010-05-11 11:03:07.087928541 +0200
+@@ -44,4 +44,21 @@
+ # example when booting FAI, this simple workaround solves it
+ ls /root/* >/dev/null 2>&1
  
 +# Move findiso directory to the new root filesystem so that programs there can get at it.
 +if [ -d /live/findiso -a ! -d /root/live/findiso ]
@@ -69,3 +35,37 @@ index e2b07a4..6411171 100755
 +
 +
  log_end_msg
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' live-initramfs-grml~/scripts/live live-initramfs-grml/scripts/live
+--- live-initramfs-grml~/scripts/live  2010-05-11 11:00:21.000000000 +0200
++++ live-initramfs-grml/scripts/live   2010-05-11 11:03:37.210427405 +0200
+@@ -143,6 +143,11 @@
+                               export HOSTNAME LIVECONF
+                               ;;
++                      findiso=*)
++                              FINDISO="${ARGUMENT#findiso=}"
++                              export FINDISO
++                              ;;
++
+                       isofrom=*|fromiso=*)
+                               FROMISO="${ARGUMENT#*=}"
+                               export FROMISO
+@@ -1593,6 +1598,18 @@
+               mount -t ${fstype} -o ro,noatime "${devname}" ${mountpoint} || continue
+               [ -n "$devuid" ] && echo "$devuid" >> $tried
++              if [ -n "${FINDISO}" ]
++              then
++                      if [ -f ${mountpoint}/${FINDISO} ]; then
++                              umount ${mountpoint}
++                              mkdir /live/findiso -p
++                              mount -t ${fstype} -o ro,noatime "${devname}" /live/findiso
++                              loopdevname=$(setup_loop "/live/findiso/${FINDISO}" "loop" "/sys/block/loop*" "" '')
++                              devname="${loopdevname}"
++                              mount -t iso9660 -o ro,noatime "${devname}" ${mountpoint}
++                      fi
++              fi
++
+               if is_live_path ${mountpoint} && \
+                       ([ "${skip_uuid_check}" ] || matches_uuid ${mountpoint})
+               then