Update plymouth to work with running cryptsetup from a udev rule.
authorVictor Lowther <victor.lowther@gmail.com>
Thu, 19 Mar 2009 15:38:22 +0000 (10:38 -0500)
committerVictor Lowther <victor.lowther@gmail.com>
Fri, 20 Mar 2009 08:08:40 +0000 (03:08 -0500)
modules.d/50plymouth/63-luks.rules [deleted file]
modules.d/50plymouth/cryptroot.sh
modules.d/50plymouth/install

diff --git a/modules.d/50plymouth/63-luks.rules b/modules.d/50plymouth/63-luks.rules
deleted file mode 100644 (file)
index 5463139..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# hacky rules to try to try unlocking dm-crypt devs
-#
-# Copyright 2008, Red Hat, Inc.
-# Jeremy Katz <katzj@redhat.com>
-
-
-SUBSYSTEM!="block", GOTO="luks_end"
-ACTION!="add|change", GOTO="luks_end"
-
-KERNEL!="sr*", IMPORT{program}="vol_id --export $tempnode"
-ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="plymouth-ask $env{DEVNAME} luks-$env{ID_FS_UUID}"
-
-LABEL="luks_end"
index afb5f84..d2fb43f 100755 (executable)
@@ -1,14 +1,5 @@
 #!/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
-}
+exec >/dev/console 2>&1 </dev/console
+[ -b /dev/mapper/$2 ] && exit 0
+/bin/plymouth ask-for-password \
+    --command="/sbin/cryptsetup luksOpen -T1 $1 $2"
index e05f48f..13b16ac 100755 (executable)
@@ -3,5 +3,5 @@ echo "installing plymouth"
 . "$moddir"/plymouth-populate-initrd
 inst_hook pre-udev 10 "$moddir"/plymouth-start.sh
 inst_hook pre-pivot 90 "$moddir"/plymouth-newroot.sh
-inst_hook mount 10 "$moddir/cryptroot.sh"
+inst "$moddir/cryptroot.sh" /bin/cryptroot.sh