diff options
author | Amadeusz Żołnowski <aidecoe@gentoo.org> | 2012-10-07 15:57:17 +0000 |
---|---|---|
committer | Amadeusz Żołnowski <aidecoe@gentoo.org> | 2012-10-07 15:57:17 +0000 |
commit | 1db831fcb265835ac5236beed4a82a9ad44c0fac (patch) | |
tree | c3fe9b1be8e0fc301b82f033f381785350e4058e /sys-kernel/dracut/files | |
parent | [bump] dev-perl/HTML-Mason-1.500.0 (diff) | |
download | historical-1db831fcb265835ac5236beed4a82a9ad44c0fac.tar.gz historical-1db831fcb265835ac5236beed4a82a9ad44c0fac.tar.bz2 historical-1db831fcb265835ac5236beed4a82a9ad44c0fac.zip |
Fixes for bug #436712, bug #437142 and bug #437270.
Thanks to Jonathan Callen <abcd@gentoo.org>, Nikoli <nikoli@lavabit.com> and
Alexander Tsoy <bugs+gentoo@puleglot.ru>.
Package-Manager: portage-2.1.11.24/cvs/Linux x86_64
Diffstat (limited to 'sys-kernel/dracut/files')
-rw-r--r-- | sys-kernel/dracut/files/023-0001-dracut-functions.sh-find_binary-path-s.patch | 41 | ||||
-rw-r--r-- | sys-kernel/dracut/files/023-0002-90crypt-call-systemd-commands-only-if-.patch | 31 |
2 files changed, 72 insertions, 0 deletions
diff --git a/sys-kernel/dracut/files/023-0001-dracut-functions.sh-find_binary-path-s.patch b/sys-kernel/dracut/files/023-0001-dracut-functions.sh-find_binary-path-s.patch new file mode 100644 index 000000000000..dace9dd95d9f --- /dev/null +++ b/sys-kernel/dracut/files/023-0001-dracut-functions.sh-find_binary-path-s.patch @@ -0,0 +1,41 @@ +From 3d15bc001e6ae4d92ff749a8159f9d1bfa2a7a74 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name> +Date: Sun, 7 Oct 2012 14:23:29 +0200 +Subject: [PATCH 1/2] dracut-functions.sh: find_binary: path starting with + variable + +Credits go to Alexander Tsoy <bugs+gentoo@puleglot.ru> who provided the +patch with following explanation: + + I get messages "Skipping program $env{DM_SBIN_PATH}/..." when + generating initramfs. This happens because some udev rules contains + variables in path to command: + + $ egrep -r 'IMPORT\{program\}=\"\$' /lib64/udev/rules.d/ + /lib64/udev/rules.d/10-dm.rules:ENV{DM_COOKIE}=="?*", IMPORT{program}="$env{DM_SBIN_PATH}/dmsetup udevflags $env{DM_COOKIE}" + + [...] + + $ sudo dracut -f "" 3.5.4-hardened-r1 + I: *** Including module: dm *** + I: Skipping program $env{DM_SBIN_PATH}/dmsetup using in udev rule 10-dm.rules as it cannot be found +--- + dracut-functions.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 2ad8f4a..43a0e16 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -45,7 +45,7 @@ find_binary() { + fi + fi + +- type -P $1 ++ type -P ${1##*/} + } + + if ! [[ $dracutbasedir ]]; then +-- +1.7.12 + diff --git a/sys-kernel/dracut/files/023-0002-90crypt-call-systemd-commands-only-if-.patch b/sys-kernel/dracut/files/023-0002-90crypt-call-systemd-commands-only-if-.patch new file mode 100644 index 000000000000..d35962d82f23 --- /dev/null +++ b/sys-kernel/dracut/files/023-0002-90crypt-call-systemd-commands-only-if-.patch @@ -0,0 +1,31 @@ +From df079b0cc8f5f0e564078c89513412f37ab58771 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name> +Date: Sun, 7 Oct 2012 15:00:22 +0200 +Subject: [PATCH 2/2] 90crypt: call systemd commands only if systemd binaries + are there + +--- + modules.d/90crypt/crypt-run-generator.sh | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/modules.d/90crypt/crypt-run-generator.sh b/modules.d/90crypt/crypt-run-generator.sh +index f2f2da1..aed2f20 100755 +--- a/modules.d/90crypt/crypt-run-generator.sh ++++ b/modules.d/90crypt/crypt-run-generator.sh +@@ -12,7 +12,10 @@ if [ -f /etc/crypttab ]; then + fi + + echo "$luks $dev" >> /etc/crypttab +-/lib/systemd/system-generators/systemd-cryptsetup-generator +-systemctl daemon-reload +-systemctl start cryptsetup.target ++if [ -x /lib/systemd/system-generators/systemd-cryptsetup-generator ] && ++ command -v systemctl >/dev/null; then ++ /lib/systemd/system-generators/systemd-cryptsetup-generator ++ systemctl daemon-reload ++ systemctl start cryptsetup.target ++fi + exit 0 +-- +1.7.12 + |