+live-initramfs (1.154.4-1grml.02) unstable; urgency=low
+
+ * Apply patch by Michael Schierl <schierlm@gmx.de> for bootoption
+ findiso (usage: like findiso=/grml_2008.11.iso). Thanks!
+
+ -- Michael Prokop <mika@grml.org> Mon, 12 Jan 2009 15:44:33 +0100
+
live-initramfs (1.154.4-1grml.01) unstable; urgency=low
* Disable several configuration options in /etc/live.conf as we don't
--- /dev/null
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 07_support_findiso.dpatch by Michael Schierl <schierlm@gmx.de>
+##
+## 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
+# 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 -urNad live-initramfs-grml~/scripts/live-bottom/05mountpoints live-initramfs-grml/scripts/live-bottom/05mountpoints
+--- live-initramfs-grml~/scripts/live-bottom/05mountpoints 2008-11-04 01:20:22.000000000 +0100
++++ live-initramfs-grml/scripts/live-bottom/05mountpoints 2009-01-12 15:42:20.323387590 +0100
+@@ -33,4 +33,11 @@
+ mount --move /live/image /root/live/image
+ fi
+
++# 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 ]
++then
++ mkdir -p /root/live/findiso
++ mount -n --move /live/findiso /root/live/findiso
++fi
++
+ log_end_msg