]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Make plymouth play nice with the current crypt code, part 1
authorVictor Lowther <victor.lowther@gmail.com>
Fri, 6 Mar 2009 22:00:56 +0000 (16:00 -0600)
committerVictor Lowther <victor.lowther@gmail.com>
Fri, 6 Mar 2009 22:00:56 +0000 (16:00 -0600)
modules.d/91plymouth/cryptroot.sh [new file with mode: 0755]
modules.d/91plymouth/install
modules.d/91plymouth/plymouth-ask.sh [deleted file]

diff --git a/modules.d/91plymouth/cryptroot.sh b/modules.d/91plymouth/cryptroot.sh
new file mode 100755 (executable)
index 0000000..afb5f84
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+[ -s /cryptroot ] && { 
+    udevadm control --stop-exec-queue
+    while read cryptopts; do
+       (   exec >/dev/console 2>&1 </dev/console
+          set $cryptopts
+          [ -b /dev/mapper/$2 ] || /bin/plymouth ask-for-password \
+              --command="/sbin/cryptsetup luksOpen -T1 $cryptopts"
+       )
+    done </cryptroot
+    >/cryptroot
+    udevadm control --start-exec-queue
+    udevadm settle --timeout=30
+}
index ccc14cf9f911dbba4956d9ebb4149f5fc46f1910..2cb53bae932ea8b4cadd91669f32fe57347c5500 100755 (executable)
@@ -3,7 +3,5 @@ echo "installing plymouth"
 . "$moddir"/plymouth-populate-initrd  -t "$initdir"
 inst_hook pre-udev 10 "$moddir"/plymouth-start.sh
 inst_hook pre-pivot 90 "$moddir"/plymouth-newroot.sh
-inst_rules "$moddir/63-luks.rules"
-inst "$moddir"/plymouth-ask.sh /lib/udev/plymouth-ask
-inst cryptsetup
+inst_hook mount 10 "$moddir/cryptroot.sh"
 
diff --git a/modules.d/91plymouth/plymouth-ask.sh b/modules.d/91plymouth/plymouth-ask.sh
deleted file mode 100755 (executable)
index fadb502..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-[ -b /dev/mapper/$2 ] || exec /bin/plymouth ask-for-password --command="/sbin/cryptsetup luksOpen -T1 $1 $2"
-