Blame 0004-crypt-parse-crypt.sh-create-udev-rule-for-systemd.patch
|
Harald Hoyer |
38a2dd |
From ab9b04f55bb9917749e9ddb52ce8f5f1ef56af99 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
38a2dd |
From: Harald Hoyer <harald@redhat.com>
|
|
Harald Hoyer |
38a2dd |
Date: Thu, 4 Apr 2013 12:54:59 +0200
|
|
Harald Hoyer |
38a2dd |
Subject: [PATCH] crypt/parse-crypt.sh: create udev rule for systemd
|
|
Harald Hoyer |
38a2dd |
|
|
Harald Hoyer |
38a2dd |
Start the systemd-cryptsetup@luks-*.service for the detected crypto_LUKS
|
|
Harald Hoyer |
38a2dd |
device in the initqueue, so we block in the initqueue and wait for the
|
|
Harald Hoyer |
38a2dd |
password entry.
|
|
Harald Hoyer |
38a2dd |
---
|
|
Harald Hoyer |
38a2dd |
modules.d/90crypt/parse-crypt.sh | 8 ++++++++
|
|
Harald Hoyer |
38a2dd |
1 file changed, 8 insertions(+)
|
|
Harald Hoyer |
38a2dd |
|
|
Harald Hoyer |
38a2dd |
diff --git a/modules.d/90crypt/parse-crypt.sh b/modules.d/90crypt/parse-crypt.sh
|
|
Harald Hoyer |
38a2dd |
index d61220c..4cb281b 100755
|
|
Harald Hoyer |
38a2dd |
--- a/modules.d/90crypt/parse-crypt.sh
|
|
Harald Hoyer |
38a2dd |
+++ b/modules.d/90crypt/parse-crypt.sh
|
|
Harald Hoyer |
38a2dd |
@@ -27,6 +27,14 @@ else
|
|
Harald Hoyer |
38a2dd |
printf -- '--name cryptroot-ask-%%k %s ' $(command -v cryptroot-ask)
|
|
Harald Hoyer |
38a2dd |
printf -- '$env{DEVNAME} luks-$env{ID_FS_UUID} %s"\n' $tout
|
|
Harald Hoyer |
38a2dd |
} >> /etc/udev/rules.d/70-luks.rules.new
|
|
Harald Hoyer |
38a2dd |
+ else
|
|
Harald Hoyer |
38a2dd |
+ {
|
|
Harald Hoyer |
38a2dd |
+ printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", '
|
|
Harald Hoyer |
38a2dd |
+ printf -- 'ENV{ID_FS_UUID}=="*%s*", ' $luksid
|
|
Harald Hoyer |
38a2dd |
+ printf -- 'RUN+="%s --unique --onetime ' $(command -v initqueue)
|
|
Harald Hoyer |
38a2dd |
+ printf -- '--name systemd-cryptsetup-%%k %s start ' $(command -v systemctl)
|
|
Harald Hoyer |
38a2dd |
+ printf -- 'systemd-cryptsetup@luks$$(dev_unit_name -$env{ID_FS_UUID}).service"\n'
|
|
Harald Hoyer |
38a2dd |
+ } >> /etc/udev/rules.d/70-luks.rules.new
|
|
Harald Hoyer |
38a2dd |
fi
|
|
Harald Hoyer |
38a2dd |
|
|
Harald Hoyer |
38a2dd |
uuid=$luksid
|