]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
dmsquash: add support for loopmounted *.iso files
authorMunehiro Matsuda <haro@kgt.co.jp>
Thu, 14 Jan 2010 15:32:09 +0000 (16:32 +0100)
committerHarald Hoyer <harald@redhat.com>
Thu, 14 Jan 2010 15:47:16 +0000 (16:47 +0100)
https://bugzilla.redhat.com/show_bug.cgi?id=548283

modules.d/90dmsquash-live/dmsquash-liveiso-genrules.sh [new file with mode: 0644]
modules.d/90dmsquash-live/install
modules.d/90dmsquash-live/parse-dmsquash-live.sh

diff --git a/modules.d/90dmsquash-live/dmsquash-liveiso-genrules.sh b/modules.d/90dmsquash-live/dmsquash-liveiso-genrules.sh
new file mode 100644 (file)
index 0000000..a196202
--- /dev/null
@@ -0,0 +1,7 @@
+if [ "${root%%:*}" = "liveiso" ]; then
+    (
+     printf 'KERNEL=="loop0", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root `/sbin/losetup -f --show %s`"\n' \
+         ${root#liveiso:}
+    ) >> /etc/udev/rules.d/99-liveiso-mount.rules
+    echo '[ -e /dev/root ]' > /initqueue-finished/dmsquash.sh
+fi
index 7326945b281f96247029f0a6ffb90e160f6f8c91..76001586b019e6ba8c73792e64e34904cc55f874 100755 (executable)
@@ -17,6 +17,7 @@ inst blockdev
 which checkisomd5 >/dev/null 2>&1 && inst checkisomd5
 inst_hook cmdline 30 "$moddir/parse-dmsquash-live.sh"
 inst_hook pre-udev 30 "$moddir/dmsquash-live-genrules.sh"
+inst_hook pre-udev 30 "$moddir/dmsquash-liveiso-genrules.sh"
 inst "$moddir/dmsquash-live-root" "/sbin/dmsquash-live-root"
 # should probably just be generally included
 inst_rules 60-cdrom_id.rules
index 0641dde2bb1c583377185c008bd3150457486673..81181f577dbd6bc14649813682dabbd57a40ee1b 100755 (executable)
@@ -30,6 +30,10 @@ case "$liveroot" in
        root="${root#live:}"
        root="live:/dev/disk/by-uuid/${root#UUID=}"
         rootok=1 ;;
+    live:/*.[Ii][Ss][Oo]|/*.[Ii][Ss][Oo])
+       root="${root#live:}"
+       root="liveiso:${root}"
+       rootok=1 ;;
     live:/dev/*)
         rootok=1 ;;
 esac