crypt: don't use systemd for crypto handling
PATCH 1/1 crypt: don't use systemd for crypto handling
There already is the code necessary to handle an encrypted root device. The "rd.luks.key" option is not handled the same way in systemd as it is in dracut, so some setups (like having the keyfile on a separate device) don't work.
--- modules.d/90crypt/crypt-run-generator.sh | 31 ---------------------- modules.d/90crypt/module-setup.sh | 9 ------- modules.d/90crypt/parse-crypt.sh | 44 +++++++++----------------------- 3 files changed, 12 insertions(+), 72 deletions(-) delete mode 100755 modules.d/90crypt/crypt-run-generator.sh
modules.d/90crypt/crypt-run-generator.sh deleted +0 -31
@@ -1,31 +0,0 @@ -#!/bin/sh - -. /lib/dracut-lib.sh -type crypttab_contains >/dev/null 2>&1 || . /lib/dracut-crypt-lib.sh - -dev=$1 -luks=$2 - -crypttab_contains "$luks" && exit 0 - -allowdiscards="-" - -# parse for allow-discards -if strstr "$(cryptsetup --help)" "allow-discards"; then - if discarduuids=$(getargs "rd.luks.allow-discards"); then - discarduuids=$(str_replace "$discarduuids" 'luks-' '') - if strstr " $discarduuids " " ${luks##luks-}"; then - allowdiscards="allow-discards" - fi - elif getargbool 0 rd.luks.allow-discards; then - allowdiscards="allow-discards" - fi -fi - -echo "$luks $dev - timeout=0,$allowdiscards" >> /etc/crypttab - -if command -v systemctl >/dev/null; then - systemctl daemon-reload - systemctl start cryptsetup.target -fi -exit 0
modules.d/90crypt/module-setup.sh +0 -9
@@ -85,14 +85,5 @@ install() { inst_simple "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh" - inst_multiple -o \ - $systemdutildir/system-generators/systemd-cryptsetup-generator \ - $systemdutildir/systemd-cryptsetup \ - $systemdsystemunitdir/systemd-ask-password-console.path \ - $systemdsystemunitdir/systemd-ask-password-console.service \ - $systemdsystemunitdir/cryptsetup.target \ - $systemdsystemunitdir/sysinit.target.wants/cryptsetup.target \ - systemd-ask-password systemd-tty-ask-password-agent - inst_script "$moddir"/crypt-run-generator.sh /sbin/crypt-run-generator dracut_need_initqueue }
modules.d/90crypt/parse-crypt.sh +12 -32
56 lines not on this page · raw message
Signature · 1 line
2.1.0
[Dracut GitHub] Patchset imported to github
In reply to a message not in the archivePatchset imported to github.
Pull request:
<https://github.com/haraldh/dracut/compare/master...dracut-mailing-devs:[email protected]>
Re: [Dracut GitHub] Patchset imported to github
In reply to a message not in the archiveQuoted 5 lines · Dracut GitHub Import Bot
Patchset imported to github.
Pull request:
<https://github.com/haraldh/dracut/compare/master...dracut-mailing-devs:1425455385-28495-1-git-send-email-jsynacek-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
N�����r��y���b�X��ǧv�^�){.n�+����+kjg�{ay�ʇڙ�,j��f���h���z��w������j:+v���w�j�m��������zZ+�����ݢj"��!tml=
Ok, I will change my bot to not send with
Content-Transfer-Encoding: base64
otherwise the majordomo signature is scrambled :)