summaryrefslogtreecommitdiff
path: root/modules.d
diff options
context:
space:
mode:
authorMunehiro Matsuda <haro@kgt.co.jp>2010-01-14 16:32:09 +0100
committerHarald Hoyer <harald@redhat.com>2010-01-14 16:47:16 +0100
commit651f3f3d1a3f58d58fd365962154e555017bd7ae (patch)
treee90195b3d73e6b7dc70d135476ae4ef53f8529ad /modules.d
parent0bc4ef1caf3e28d8a9fe7a686de096e2303b2b13 (diff)
downloaddracut-651f3f3d1a3f58d58fd365962154e555017bd7ae.tar.gz
dracut-651f3f3d1a3f58d58fd365962154e555017bd7ae.tar.bz2
dracut-651f3f3d1a3f58d58fd365962154e555017bd7ae.zip
dmsquash: add support for loopmounted *.iso files
https://bugzilla.redhat.com/show_bug.cgi?id=548283
Diffstat (limited to 'modules.d')
-rw-r--r--modules.d/90dmsquash-live/dmsquash-liveiso-genrules.sh7
-rwxr-xr-xmodules.d/90dmsquash-live/install1
-rwxr-xr-xmodules.d/90dmsquash-live/parse-dmsquash-live.sh4
3 files changed, 12 insertions, 0 deletions
diff --git a/modules.d/90dmsquash-live/dmsquash-liveiso-genrules.sh b/modules.d/90dmsquash-live/dmsquash-liveiso-genrules.sh
new file mode 100644
index 00000000..a196202e
--- /dev/null
+++ b/modules.d/90dmsquash-live/dmsquash-liveiso-genrules.sh
@@ -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
diff --git a/modules.d/90dmsquash-live/install b/modules.d/90dmsquash-live/install
index 7326945b..76001586 100755
--- a/modules.d/90dmsquash-live/install
+++ b/modules.d/90dmsquash-live/install
@@ -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
diff --git a/modules.d/90dmsquash-live/parse-dmsquash-live.sh b/modules.d/90dmsquash-live/parse-dmsquash-live.sh
index 0641dde2..81181f57 100755
--- a/modules.d/90dmsquash-live/parse-dmsquash-live.sh
+++ b/modules.d/90dmsquash-live/parse-dmsquash-live.sh
@@ -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