]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dmsquash: add nasty hack for cdroms
authorHarald Hoyer <harald@redhat.com>
Tue, 12 Jan 2010 14:08:54 +0000 (15:08 +0100)
committerHarald Hoyer <harald@redhat.com>
Tue, 12 Jan 2010 14:08:54 +0000 (15:08 +0100)
Some CDROMs do not generate a label symlink and have to be read from.

modules.d/90dmsquash-live/cdrom-hack.sh [new file with mode: 0755]
modules.d/90dmsquash-live/install
modules.d/90dmsquash-live/parse-dmsquash-live.sh

diff --git a/modules.d/90dmsquash-live/cdrom-hack.sh b/modules.d/90dmsquash-live/cdrom-hack.sh
new file mode 100755 (executable)
index 0000000..ad1a220
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+[ -e /dev/sr0 ] && {
+       blkid /dev/sr0;
+       blkid /dev/sr0;
+} 2>/dev/null
index ac5e35559ef3ba3a39205dbb4a3f78173e83fd03..7326945b281f96247029f0a6ffb90e160f6f8c91 100755 (executable)
@@ -20,3 +20,4 @@ inst_hook pre-udev 30 "$moddir/dmsquash-live-genrules.sh"
 inst "$moddir/dmsquash-live-root" "/sbin/dmsquash-live-root"
 # should probably just be generally included
 inst_rules 60-cdrom_id.rules
+inst "$moddir/cdrom-hack.sh" /sbin/cdrom-hack.sh
index 646da362b1e28ab3e2f6d4e877dffcd45f79ea73..0641dde2bb1c583377185c008bd3150457486673 100755 (executable)
@@ -30,11 +30,12 @@ case "$liveroot" in
        root="${root#live:}"
        root="live:/dev/disk/by-uuid/${root#UUID=}"
         rootok=1 ;;
-    /dev/*)
-       root="live:${root}"
+    live:/dev/*)
         rootok=1 ;;
 esac
 info "root was $root, liveroot is now $liveroot"
 
+[ $rootok = "1" ] && initqueue --settled /sbin/cdrom-hack.sh
+
 # make sure that init doesn't complain
 [ -z "$root" ] && root="live"