--- /dev/null
+diff -ur dracut-047.orig/modules.d/90crypt/cryptroot-ask.sh dracut-047/modules.d/90crypt/cryptroot-ask.sh
+--- dracut-047.orig/modules.d/90crypt/cryptroot-ask.sh 2018-02-19 09:00:33.000000000 +0000
++++ dracut-047/modules.d/90crypt/cryptroot-ask.sh 2018-07-02 11:37:44.222951181 +0000
+@@ -106,6 +106,9 @@
+ header=*)
+ cryptsetupopts="${cryptsetupopts} --${1}"
+ ;;
++ keyscript=*)
++ keyscript=${1##keyscript=}
++ ;;
+ esac
+ shift
+ done
+@@ -163,6 +166,14 @@
+ done
+ fi
+
++if [ ! -z "$keyscript" -a -x "$keyscript" ]; then
++ info "Executing keyscript $keyscript"
++ eval $keyscript
++ if [ $? -eq 0 ]; then
++ ask_passphrase=0
++ fi
++fi
++
+ if [ $ask_passphrase -ne 0 ]; then
+ luks_open="$(command -v cryptsetup) $cryptsetupopts luksOpen"
+ ask_for_password --ply-tries 5 \
+diff -ur dracut-047.orig/modules.d/90crypt/module-setup.sh dracut-047/modules.d/90crypt/module-setup.sh
+--- dracut-047.orig/modules.d/90crypt/module-setup.sh 2018-02-19 09:00:33.000000000 +0000
++++ dracut-047/modules.d/90crypt/module-setup.sh 2018-07-02 10:57:20.952095619 +0000
+@@ -96,10 +96,26 @@
+ forceentry="yes"
+ break
+ ;;
++ keyscript=*)
++ keyscript=${1##keyscript=}
++ break
++ ;;
+ esac
+ shift
+ done
+
++ if [ ! -z "${keyscript}" ]; then
++ if [ -x "${keyscript}" ]; then
++ if [ ! -d "${initdir}/etc/keyscripts" ]; then
++ mkdir "${initdir}/etc/keyscripts" 2>/dev/null
++ fi
++ inst_script "${keyscript}" /etc/keyscripts/${keyscript##*/}
++ _luksoptions=${_luksoptions/${keyscript%%=*}/\/etc\/keyscripts\/${keyscript##*/}}
++ else
++ dwarning "Missing keyscript referenced in crypttab: ${keyscript}"
++ fi
++ fi
++
+ # include the entry regardless
+ if [ "${forceentry}" = "yes" ]; then
+ echo "$_mapper $_dev $_luksfile $_luksoptions"
Summary(pl.UTF-8): Generator initramfs wykorzystujący udev
Name: dracut
Version: 047
-Release: 4
+Release: 5
License: GPL v2+
Group: Base
Source0: https://www.kernel.org/pub/linux/utils/boot/dracut/%{name}-%{version}.tar.xz
Patch8: initrd-release.patch
Patch9: no_systemd_udevd.patch
Patch10: ext4.patch
+Patch11: crypttab-keyscript.patch
URL: https://dracut.wiki.kernel.org/
BuildRequires: asciidoc
BuildRequires: dash
%patch8 -p1
%patch9 -p1
%patch10 -p1
+%patch11 -p1
%{__sed} -i -e 's,@lib@,%{_lib},g' modules.d/50plymouth/module-setup.sh
%{__sed} -i -e 's,@lib@,%{_lib},g' modules.d/95resume/module-setup.sh