From 17a513adc8e9f4293abb6aa64c5dbc421bf58692 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Jan 31 2015 14:30:41 +0000 Subject: version 041 --- diff --git a/.gitignore b/.gitignore index ca35c33..5e70e94 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ /dracut-037.tar.xz /dracut-038.tar.xz /dracut-040.tar.xz +/dracut-041.tar.xz diff --git a/0001-shutdown-shutdown.sh-loop-over-shutdown-hooks-until-.patch b/0001-shutdown-shutdown.sh-loop-over-shutdown-hooks-until-.patch deleted file mode 100644 index f008f95..0000000 --- a/0001-shutdown-shutdown.sh-loop-over-shutdown-hooks-until-.patch +++ /dev/null @@ -1,41 +0,0 @@ -From b09faad8779f5579b2f1c559edf7c0570e8d50ac Mon Sep 17 00:00:00 2001 -From: Lukas Wunner -Date: Mon, 6 Oct 2014 13:43:58 +0200 -Subject: [PATCH] shutdown/shutdown.sh: loop over shutdown hooks until all - succeed - -Up until now, _check_shutdown() returns true if at least one of -the shutdown hooks succeeded. Change this to only return true if -*all* succeeded. To prevent an infinite loop, introduce an upper -bound of 40 iterations. ---- - modules.d/99shutdown/shutdown.sh | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/modules.d/99shutdown/shutdown.sh b/modules.d/99shutdown/shutdown.sh -index 6e5e559..98eab1d 100755 ---- a/modules.d/99shutdown/shutdown.sh -+++ b/modules.d/99shutdown/shutdown.sh -@@ -90,16 +90,19 @@ _check_shutdown() { - ( . "$__f" $1 ) - if [ $? -eq 0 ]; then - rm -f -- $__f -+ else - __s=0 - fi - done - return $__s - } - --while _check_shutdown; do --: -+_cnt=0 -+while [ $_cnt -le 40 ]; do -+ _check_shutdown || break -+ _cnt=$(($_cnt+1)) - done --_check_shutdown final -+[ $_cnt -ge 40 ] && _check_shutdown final - - getarg 'rd.break=shutdown' && emergency_shell --shutdown shutdown "Break before shutdown" - diff --git a/0002-NEWS-add-040-entry.patch b/0002-NEWS-add-040-entry.patch deleted file mode 100644 index 89e7d34..0000000 --- a/0002-NEWS-add-040-entry.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 1c08ad507b1a40bdc58292e05b6efc05ffcd13d8 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 24 Oct 2014 14:41:29 +0200 -Subject: [PATCH] NEWS: add 040 entry - ---- - NEWS | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/NEWS b/NEWS -index 1b79da1..da44068 100644 ---- a/NEWS -+++ b/NEWS -@@ -1,3 +1,8 @@ -+dracut-040 -+========== -+- fixed dracut module dependency checks -+- fixed test suite -+ - dracut-039 - ========== - - DRACUT_PATH can now be used to specify the PATH used by dracut diff --git a/0003-fix-gzip-compress-then-it-not-supports-rsyncable-opt.patch b/0003-fix-gzip-compress-then-it-not-supports-rsyncable-opt.patch deleted file mode 100644 index a21a654..0000000 --- a/0003-fix-gzip-compress-then-it-not-supports-rsyncable-opt.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 3c90cc2f482d13718a45fed2f8aa34442c8651a0 Mon Sep 17 00:00:00 2001 -From: Vasiliy Tolstov -Date: Mon, 27 Oct 2014 13:42:06 +0300 -Subject: [PATCH] fix gzip compress then it not supports rsyncable option - -dracut fail to create initramfs when compressor gzip and -it not have rsyncable option - -Signed-off-by: Vasiliy Tolstov ---- - dracut.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut.sh b/dracut.sh -index 1c7e208..7aa1264 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -822,7 +822,7 @@ case $compress in - bzip2) compress="bzip2 -9";; - lzma) compress="lzma -9 -T0";; - xz) compress="xz --check=crc32 --lzma2=dict=1MiB -T0";; -- gzip) compress="gzip -n -9 --rsyncable"; command -v pigz > /dev/null 2>&1 && compress="pigz -9 -n -T -R";; -+ gzip) compress="gzip -n -9"; command -v gzip --help 2>&1 | grep -q rsyncable && compress="gzip -n -9 --rsyncable"; command -v pigz > /dev/null 2>&1 && compress="pigz -9 -n -T -R";; - lzo) compress="lzop -9";; - lz4) compress="lz4 -l -9";; - esac diff --git a/0004-ifcfg-write-ifcfg-only-write-DEVICE-for-non-kernel-n.patch b/0004-ifcfg-write-ifcfg-only-write-DEVICE-for-non-kernel-n.patch deleted file mode 100644 index 3fef7de..0000000 --- a/0004-ifcfg-write-ifcfg-only-write-DEVICE-for-non-kernel-n.patch +++ /dev/null @@ -1,187 +0,0 @@ -From 3947f07d93cde5e1cf0d788537e93b135d6c27b0 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 24 Oct 2014 15:47:24 +0200 -Subject: [PATCH] ifcfg/write-ifcfg: only write DEVICE for non-kernel names - -Rename an interface to the kernel namespace is not allowed, so don't add -DEVICE="", if HWADDR is given. ---- - modules.d/40network/net-lib.sh | 46 ++++++++++++++++++++++++++++++- - modules.d/45ifcfg/write-ifcfg.sh | 59 ++++++++++++++++++++++++++-------------- - 2 files changed, 84 insertions(+), 21 deletions(-) - -diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh -index 8b5fbc6..48e7014 100755 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -551,7 +551,19 @@ find_iface_with_link() { - } - - is_persistent_ethernet_name() { -- case "$1" in -+ local _netif="$1" -+ local _name_assign_type="0" -+ -+ [ -f "/sys/class/net/$_netif/name_assign_type" ] \ -+ && _name_assign_type=$(cat "/sys/class/net/$_netif/name_assign_type") -+ -+ # NET_NAME_ENUM 1 -+ [ "$_name_assign_type" = "1" ] && return 1 -+ -+ # NET_NAME_PREDICTABLE 2 -+ [ "$_name_assign_type" = "2" ] && return 0 -+ -+ case "$_netif" in - # udev persistent interface names - eno[0-9]|eno[0-9][0-9]|eno[0-9][0-9][0-9]*) - ;; -@@ -571,3 +583,35 @@ is_persistent_ethernet_name() { - esac - return 0 - } -+ -+is_kernel_ethernet_name() { -+ local _netif="$1" -+ local _name_assign_type="1" -+ -+ if [ -e "/sys/class/net/$_netif/name_assign_type" ]; then -+ _name_assign_type=$(cat "/sys/class/net/$_netif/name_assign_type") -+ -+ case "$_name_assign_type" in -+ 2|3|4) -+ # NET_NAME_PREDICTABLE 2 -+ # NET_NAME_USER 3 -+ # NET_NAME_RENAMED 4 -+ return 1 -+ ;; -+ 1|*) -+ # NET_NAME_ENUM 1 -+ return 0 -+ ;; -+ esac -+ fi -+ -+ # fallback to error prone manual name check -+ case "$_netif" in -+ eth[0-9]|eth[0-9][0-9]|eth[0-9][0-9][0-9]*) -+ return 0 -+ ;; -+ *) -+ return 1 -+ esac -+ -+} -diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh -index bb706f6..3dcf304 100755 ---- a/modules.d/45ifcfg/write-ifcfg.sh -+++ b/modules.d/45ifcfg/write-ifcfg.sh -@@ -80,18 +80,41 @@ print_s390() { - return 0 - } - -+hw_bind() { -+ local _netif="$1" -+ local _macaddr="$2" -+ -+ [ -n "$_macaddr" ] \ -+ && echo "MACADDR=\"$_macaddr\"" -+ -+ print_s390 "$_netif" \ -+ && return 0 -+ -+ [ -n "$_macaddr" ] && return 0 -+ -+ is_persistent_ethernet_name "$_netif" && return 0 -+ -+ [ -f "/sys/class/net/$_netif/addr_assign_type" ] \ -+ && [ "$(cat "/sys/class/net/$_netif/addr_assign_type")" != "0" ] \ -+ && return 1 -+ -+ [ -f "/sys/class/net/$_netif/address" ] \ -+ || return 1 -+ -+ echo "HWADDR=\"$(cat /sys/class/net/$_netif/address)\"" -+} -+ - interface_bind() { -- local netif="$1" -- local macaddr="$2" -- if ! print_s390 $netif; then -- if [ -z "$macaddr" ] && \ -- ! is_persistent_ethernet_name "$netif" && \ -- [ -f /sys/class/net/$netif/addr_assign_type ] && \ -- [ "$(cat /sys/class/net/$netif/addr_assign_type)" = "0" ] && \ -- [ -f /sys/class/net/$netif/address ]; then -- echo "HWADDR=\"$(cat /sys/class/net/$netif/address)\"" -- fi -+ local _netif="$1" -+ local _macaddr="$2" -+ -+ # see, if we can bind it to some hw parms -+ if hw_bind "$_netif" "$_macaddr"; then -+ # only print out DEVICE, if it's user assigned -+ is_kernel_ethernet_name "$_netif" && return 0 - fi -+ -+ echo "DEVICE=\"$_netif\"" - } - - for netup in /tmp/net.*.did-setup ; do -@@ -129,7 +152,8 @@ for netup in /tmp/net.*.did-setup ; do - - { - echo "# Generated by dracut initrd" -- echo "DEVICE=\"$netif\"" -+ echo "NAME=\"$netif\"" -+ interface_bind "$netif" "$macaddr" - echo "ONBOOT=yes" - echo "NETBOOT=yes" - echo "UUID=\"$uuid\"" -@@ -175,10 +199,7 @@ for netup in /tmp/net.*.did-setup ; do - if [ -z "$bridge" ] && [ -z "$bond" ] && [ -z "$vlan" ]; then - # standard interface - { -- [ -n "$macaddr" ] && echo "MACADDR=\"$macaddr\"" -- interface_bind "$netif" "$macaddr" - echo "TYPE=Ethernet" -- echo "NAME=\"$netif\"" - [ -n "$mtu" ] && echo "MTU=\"$mtu\"" - } >> /tmp/ifcfg/ifcfg-$netif - fi -@@ -205,16 +226,15 @@ for netup in /tmp/net.*.did-setup ; do - # write separate ifcfg file for the raw eth interface - ( - echo "# Generated by dracut initrd" -- echo "DEVICE=\"$slave\"" -+ echo "NAME=\"$slave\"" - echo "TYPE=Ethernet" - echo "ONBOOT=yes" - echo "NETBOOT=yes" - echo "SLAVE=yes" - echo "MASTER=\"$netif\"" -- echo "NAME=\"$slave\"" - echo "UUID=\"$(cat /proc/sys/kernel/random/uuid)\"" -+ unset macaddr - [ -e /tmp/net.$slave.override ] && . /tmp/net.$slave.override -- [ -n "$macaddr" ] && echo "MACADDR=\"$macaddr\"" - interface_bind "$slave" "$macaddr" - ) >> /tmp/ifcfg/ifcfg-$slave - done -@@ -230,15 +250,14 @@ for netup in /tmp/net.*.did-setup ; do - # write separate ifcfg file for the raw eth interface - ( - echo "# Generated by dracut initrd" -- echo "DEVICE=\"$slave\"" -+ echo "NAME=\"$slave\"" - echo "TYPE=Ethernet" - echo "ONBOOT=yes" - echo "NETBOOT=yes" - echo "BRIDGE=\"$bridgename\"" -- echo "NAME=\"$slave\"" - echo "UUID=\"$(cat /proc/sys/kernel/random/uuid)\"" -+ unset macaddr - [ -e /tmp/net.$slave.override ] && . /tmp/net.$slave.override -- [ -n "$macaddr" ] && echo "MACADDR=\"$macaddr\"" - interface_bind "$slave" "$macaddr" - ) >> /tmp/ifcfg/ifcfg-$slave - done diff --git a/0005-Fix-location-of-dracut-install-for-local-mode.patch b/0005-Fix-location-of-dracut-install-for-local-mode.patch deleted file mode 100644 index 8946cca..0000000 --- a/0005-Fix-location-of-dracut-install-for-local-mode.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 972d6b44ba54e44c01801614fb57e128604b4a12 Mon Sep 17 00:00:00 2001 -From: Stefan Reimer -Date: Tue, 28 Oct 2014 17:58:22 -0700 -Subject: [PATCH] Fix location of dracut-install for local mode - ---- - dracut-functions.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index 1bcc3b4..3ad8d81 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -741,8 +741,8 @@ if ! [[ $DRACUT_INSTALL ]]; then - DRACUT_INSTALL=$(find_binary dracut-install) - fi - --if ! [[ $DRACUT_INSTALL ]] && [[ -x $dracutbasedir/dracut-install ]]; then -- DRACUT_INSTALL=$dracutbasedir/dracut-install -+if ! [[ $DRACUT_INSTALL ]] && [[ -x $dracutbasedir/install/dracut-install ]]; then -+ DRACUT_INSTALL=$dracutbasedir/install/dracut-install - fi - - if ! [[ -x $DRACUT_INSTALL ]]; then diff --git a/0006-dracut-functions.sh-fixup-for-34a1ec6-for-non-local-.patch b/0006-dracut-functions.sh-fixup-for-34a1ec6-for-non-local-.patch deleted file mode 100644 index 9700f89..0000000 --- a/0006-dracut-functions.sh-fixup-for-34a1ec6-for-non-local-.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 2f0f1b0bbc0aae6b5f54c64d911eb6b09030798d Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 29 Oct 2014 13:39:28 +0100 -Subject: [PATCH] dracut-functions.sh: fixup for 34a1ec6 for non-local mode - ---- - dracut-functions.sh | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index 3ad8d81..b43b766 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -741,7 +741,9 @@ if ! [[ $DRACUT_INSTALL ]]; then - DRACUT_INSTALL=$(find_binary dracut-install) - fi - --if ! [[ $DRACUT_INSTALL ]] && [[ -x $dracutbasedir/install/dracut-install ]]; then -+if ! [[ $DRACUT_INSTALL ]] && [[ -x $dracutbasedir/dracut-install ]]; then -+ DRACUT_INSTALL=$dracutbasedir/dracut-install -+elif ! [[ $DRACUT_INSTALL ]] && [[ -x $dracutbasedir/install/dracut-install ]]; then - DRACUT_INSTALL=$dracutbasedir/install/dracut-install - fi - diff --git a/0007-shutdown.sh-correct-return-code-of-_check_shutdown.patch b/0007-shutdown.sh-correct-return-code-of-_check_shutdown.patch deleted file mode 100644 index 68a3124..0000000 --- a/0007-shutdown.sh-correct-return-code-of-_check_shutdown.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 5cac9e14ecadc21cc5a903101135d07eb3fa60e2 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 29 Oct 2014 13:51:15 +0100 -Subject: [PATCH] shutdown.sh: correct return code of _check_shutdown() - -fix commit b09faad8779f5579, which reversed the return code ---- - modules.d/99shutdown/shutdown.sh | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/modules.d/99shutdown/shutdown.sh b/modules.d/99shutdown/shutdown.sh -index 98eab1d..c183f9d 100755 ---- a/modules.d/99shutdown/shutdown.sh -+++ b/modules.d/99shutdown/shutdown.sh -@@ -84,14 +84,14 @@ fi - - _check_shutdown() { - local __f -- local __s=1 -+ local __s=0 - for __f in $hookdir/shutdown/*.sh; do - [ -e "$__f" ] || continue - ( . "$__f" $1 ) - if [ $? -eq 0 ]; then - rm -f -- $__f - else -- __s=0 -+ __s=1 - fi - done - return $__s -@@ -99,7 +99,7 @@ _check_shutdown() { - - _cnt=0 - while [ $_cnt -le 40 ]; do -- _check_shutdown || break -+ _check_shutdown && break - _cnt=$(($_cnt+1)) - done - [ $_cnt -ge 40 ] && _check_shutdown final diff --git a/0008-kernel-modules-Drop-explicit-modules-that-are-found-.patch b/0008-kernel-modules-Drop-explicit-modules-that-are-found-.patch deleted file mode 100644 index 2576419..0000000 --- a/0008-kernel-modules-Drop-explicit-modules-that-are-found-.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 27dcc3a583e5488ee70dcd0299646cc33faf8a21 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Sun, 26 Oct 2014 11:48:15 +0000 -Subject: [PATCH] kernel-modules: Drop explicit modules that are found with - block_module_filter - -The usb_storage, nvme and sdhci_acpi modules are discovered with the -block_module_filter so there's no need to explicitly list them here. - -Signed-off-by: ---- - modules.d/90kernel-modules/module-setup.sh | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index 83b8995..2fa263c 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -44,8 +44,7 @@ installkernel() { - instmods yenta_socket scsi_dh_rdac scsi_dh_emc \ - atkbd i8042 usbhid hid-apple hid-sunplus hid-cherry hid-logitech \ - hid-logitech-dj hid-microsoft hid-lcpower firewire-ohci \ -- pcmcia usb_storage nvme hid-hyperv hv-vmbus \ -- sdhci_acpi hyperv-keyboard -+ pcmcia hid-hyperv hv-vmbus hyperv-keyboard - - if [[ "$(uname -p)" == arm* ]]; then - # arm specific modules diff --git a/0009-40network-Copy-the-customize-dhcp-config.patch b/0009-40network-Copy-the-customize-dhcp-config.patch deleted file mode 100644 index 2a4b47b..0000000 --- a/0009-40network-Copy-the-customize-dhcp-config.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 56d2aed1c82a9ff62a081722f4b9ff9d49a0fe78 Mon Sep 17 00:00:00 2001 -From: Minfei Huang -Date: Mon, 27 Oct 2014 14:33:11 +0800 -Subject: [PATCH] 40network: Copy the customize dhcp config - -It is not available to valid the customize dhcp config -/etc/dhclient.conf in the initram environment. - -Dracut uses the default follow config to construct the initramfs. - -request subnet-mask, broadcast-address, time-offset, routers, - domain-name, domain-name-servers, domain-search, host-name, - root-path, interface-mtu; - -Copy the customize config to make the config availably in the -initram environment. - -Signed-off-by: Minfei Huang ---- - modules.d/40network/module-setup.sh | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh -index ae1f43f..55bee4c 100755 ---- a/modules.d/40network/module-setup.sh -+++ b/modules.d/40network/module-setup.sh -@@ -79,7 +79,8 @@ install() { - inst_script "$moddir/netroot.sh" "/sbin/netroot" - inst_script "$moddir/dhclient-script.sh" "/sbin/dhclient-script" - inst_simple "$moddir/net-lib.sh" "/lib/net-lib.sh" -- inst_simple "$moddir/dhclient.conf" "/etc/dhclient.conf" -+ inst_simple -H "/etc/dhclient.conf" -+ cat "$moddir/dhclient.conf" >> "${initdir}/etc/dhclient.conf" - inst_hook pre-udev 50 "$moddir/ifname-genrules.sh" - inst_hook pre-udev 60 "$moddir/net-genrules.sh" - inst_hook cmdline 91 "$moddir/dhcp-root.sh" diff --git a/0010-dracut.sh-don-t-check-gzip-for-rsyncable-if-pigz-is-.patch b/0010-dracut.sh-don-t-check-gzip-for-rsyncable-if-pigz-is-.patch deleted file mode 100644 index ca7fb7d..0000000 --- a/0010-dracut.sh-don-t-check-gzip-for-rsyncable-if-pigz-is-.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 66fd7e43295cb67ac6eaaced3c7b271920e07dce Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 29 Oct 2014 14:18:34 +0100 -Subject: [PATCH] dracut.sh: don't check gzip for --rsyncable, if pigz is - available - ---- - dracut.sh | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/dracut.sh b/dracut.sh -index 7aa1264..4590f79 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -822,7 +822,13 @@ case $compress in - bzip2) compress="bzip2 -9";; - lzma) compress="lzma -9 -T0";; - xz) compress="xz --check=crc32 --lzma2=dict=1MiB -T0";; -- gzip) compress="gzip -n -9"; command -v gzip --help 2>&1 | grep -q rsyncable && compress="gzip -n -9 --rsyncable"; command -v pigz > /dev/null 2>&1 && compress="pigz -9 -n -T -R";; -+ gzip) compress="gzip -n -9"; -+ if command -v pigz > /dev/null 2>&1; then -+ compress="pigz -9 -n -T -R" -+ elif command -v gzip --help 2>&1 | grep -q rsyncable; then -+ compress="gzip -n -9 --rsyncable" -+ fi -+ ;; - lzo) compress="lzop -9";; - lz4) compress="lz4 -l -9";; - esac diff --git a/0011-systemd-add-90-vconsole.rules.patch b/0011-systemd-add-90-vconsole.rules.patch deleted file mode 100644 index 1570839..0000000 --- a/0011-systemd-add-90-vconsole.rules.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 027565d0233f76edf434b63a847a717185d267e2 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 6 Nov 2014 10:44:33 +0100 -Subject: [PATCH] systemd: add 90-vconsole.rules - -run systemd-vconsole-setup if fbcon device shows up ---- - modules.d/98systemd/module-setup.sh | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh -index 1ab253d..bd4433e 100755 ---- a/modules.d/98systemd/module-setup.sh -+++ b/modules.d/98systemd/module-setup.sh -@@ -198,7 +198,12 @@ install() { - inst_binary true - ln_r $(type -P true) "/usr/bin/loginctl" - ln_r $(type -P true) "/bin/loginctl" -- inst_rules 70-uaccess.rules 71-seat.rules 73-seat-late.rules 99-systemd.rules -+ inst_rules \ -+ 70-uaccess.rules \ -+ 71-seat.rules \ -+ 73-seat-late.rules \ -+ 90-vconsole.rules \ -+ 99-systemd.rules - - for i in \ - emergency.target \ diff --git a/0012-base-Set-udevd-log-level-via-environment-var-to-cove.patch b/0012-base-Set-udevd-log-level-via-environment-var-to-cove.patch deleted file mode 100644 index ccbd681..0000000 --- a/0012-base-Set-udevd-log-level-via-environment-var-to-cove.patch +++ /dev/null @@ -1,56 +0,0 @@ -From af67d62151b0c4708c4478cc5b2cbdaae5803699 Mon Sep 17 00:00:00 2001 -From: Colin Guthrie -Date: Mon, 10 Nov 2014 14:17:39 +0000 -Subject: [PATCH] base: Set udevd log level via environment var to cover early - startup. - -udevd will these days default to 'info' logging and thus will -often print out the 'starting version nnn' message (which is -logged at level 'info'), thus spamming the console, even on -'quiet' boots. - -We generally expect a udev log level of err (the old default -from pre-October 2013) so we should set that explicilty before -launching udevd in order to suppress the spurious 'info' message. - -As we are using the environment variable approach anyway, we -may as well use this method rather than setting the log level -later via udevadm control commands when rd.udev.info/debug are -given on the kernel command line. - -The enviroment variable has been around since udev 6b493a20e1 -around 2005 so should be safe to use in all cases without version -checks. ---- - modules.d/99base/init.sh | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh -index e249b27..3afe6d5 100755 ---- a/modules.d/99base/init.sh -+++ b/modules.d/99base/init.sh -@@ -137,19 +137,19 @@ make_trace_mem "hook pre-udev" '1:shortmem' '2+:mem' '3+:slab' - getarg 'rd.break=pre-udev' -d 'rdbreak=pre-udev' && emergency_shell -n pre-udev "Break before pre-udev" - source_hook pre-udev - -+UDEV_LOG=err -+getargbool 0 rd.udev.info -d -y rdudevinfo && UDEV_LOG=info -+getargbool 0 rd.udev.debug -d -y rdudevdebug && UDEV_LOG=debug -+ - # start up udev and trigger cold plugs --$systemdutildir/systemd-udevd --daemon --resolve-names=never -+UDEV_LOG=$UDEV_LOG $systemdutildir/systemd-udevd --daemon --resolve-names=never - --UDEV_LOG_PRIO_ARG=--log-priority - UDEV_QUEUE_EMPTY="udevadm settle --timeout=0" - - if [ $UDEVVERSION -lt 140 ]; then -- UDEV_LOG_PRIO_ARG=--log_priority - UDEV_QUEUE_EMPTY="udevadm settle --timeout=1" - fi - --getargbool 0 rd.udev.info -d -y rdudevinfo && udevadm control "$UDEV_LOG_PRIO_ARG=info" --getargbool 0 rd.udev.debug -d -y rdudevdebug && udevadm control "$UDEV_LOG_PRIO_ARG=debug" - udevproperty "hookdir=$hookdir" - - make_trace_mem "hook pre-trigger" '1:shortmem' '2+:mem' '3+:slab' diff --git a/0013-multipath-add-rd.multipath-0-option.patch b/0013-multipath-add-rd.multipath-0-option.patch deleted file mode 100644 index d7d374f..0000000 --- a/0013-multipath-add-rd.multipath-0-option.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 778b3543609d8c9d32df7111229f4072d00d02f0 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 20 Nov 2014 11:27:40 +0100 -Subject: [PATCH] multipath: add "rd.multipath=0" option - ---- - dracut.cmdline.7.asc | 7 +++++++ - modules.d/90multipath/multipathd.sh | 2 +- - 2 files changed, 8 insertions(+), 1 deletion(-) - -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index 48356c7..8e4835d 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -379,6 +379,11 @@ DM RAID - only activate the raid sets with the given UUID. This parameter can be - specified multiple times. - -+MULTIPATH -+~~~~~~~~~ -+**rd.multipath=0**:: -+ disable multipath detection -+ - FIPS - ~~~~ - **rd.fips**:: -@@ -952,6 +957,8 @@ rd_NO_MD:: rd.md=0 - - rd_MD_UUID:: rd.md.uuid - -+rd_NO_MULTIPATH: rd.multipath=0 -+ - rd_NFS_DOMAIN:: rd.nfs.domain - - iscsi_initiator:: rd.iscsi.initiator -diff --git a/modules.d/90multipath/multipathd.sh b/modules.d/90multipath/multipathd.sh -index 1e0e907..2c2dcc8 100755 ---- a/modules.d/90multipath/multipathd.sh -+++ b/modules.d/90multipath/multipathd.sh -@@ -1,6 +1,6 @@ - #!/bin/sh - --if [ -e /etc/multipath.conf ]; then -+if getargbool 1 rd.multipath -d -n rd_NO_MULTIPATH && [ -e /etc/multipath.conf ]; then - modprobe dm-multipath - multipathd -B || multipathd - need_shutdown diff --git a/0014-TODO-update.patch b/0014-TODO-update.patch deleted file mode 100644 index 8af7541..0000000 --- a/0014-TODO-update.patch +++ /dev/null @@ -1,21 +0,0 @@ -From e1e4ee9d7c005f61b6ad88d92ef8993d2cfe92be Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 20 Nov 2014 16:22:51 +0100 -Subject: [PATCH] TODO: update - ---- - TODO | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/TODO b/TODO -index 78dae0f..917b97c 100644 ---- a/TODO -+++ b/TODO -@@ -28,6 +28,7 @@ GENERATOR TODO - - - report errors on missing files in check() - - remove wait for swap devs, if no "resume=" is given on the kernel command line -+- remove wait for swap devs, if the "resume" dracut module is not included (omitted) - - add presets (predefined set of modules) - - add interpreter/plugin-scripts to be sourced at the beginning or end (can use dracut-functions) - - add mechanism for module specific command line options diff --git a/0015-dracut-functions.sh-check-if-dinfo-is-a-function.patch b/0015-dracut-functions.sh-check-if-dinfo-is-a-function.patch deleted file mode 100644 index a604069..0000000 --- a/0015-dracut-functions.sh-check-if-dinfo-is-a-function.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 26d14fb3d36d6091f64258a62c49939478405693 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 24 Nov 2014 15:17:45 +0100 -Subject: [PATCH] dracut-functions.sh: check if dinfo is a function - -If "dinfo" is an executable, dracut-logger.sh would never be sourced. - -See: https://bugzilla.redhat.com/show_bug.cgi?id=1167082 ---- - dracut-functions.sh | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index b43b766..17a71f0 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -176,7 +176,13 @@ srcmods="/lib/modules/$kernel/" - } - export srcmods - --if ! type dinfo >/dev/null 2>&1; then -+# is_func -+# Check whether $1 is a function. -+is_func() { -+ [[ "$(type -t "$1")" = "function" ]] -+} -+ -+if ! is_func dinfo >/dev/null 2>&1; then - . "$dracutbasedir/dracut-logger.sh" - dlog_init - fi -@@ -209,12 +215,6 @@ mksubdirs() { - [[ -e ${1%/*} ]] || mkdir -m 0755 -p -- "${1%/*}" - } - --# is_func --# Check whether $1 is a function. --is_func() { -- [[ "$(type -t "$1")" = "function" ]] --} -- - # Function prints global variables in format name=value line by line. - # $@ = list of global variables' name - print_vars() { diff --git a/0016-90multipath-Install-libgcc_s-library.patch b/0016-90multipath-Install-libgcc_s-library.patch deleted file mode 100644 index f7d0fda..0000000 --- a/0016-90multipath-Install-libgcc_s-library.patch +++ /dev/null @@ -1,27 +0,0 @@ -From cf864c1b8009f4544e6b494979bf396bafcd8834 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 20 Nov 2014 15:56:43 +0100 -Subject: [PATCH] 90multipath: Install libgcc_s library - -multipathd is using pthreads, which require libgcc_s for -pthread_cancel to work. Without it multipathd might crash -with SIGABRT. - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - modules.d/90multipath/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh -index c86c5d9..a547c07 100755 ---- a/modules.d/90multipath/module-setup.sh -+++ b/modules.d/90multipath/module-setup.sh -@@ -87,6 +87,7 @@ install() { - inst $(command -v partx) /sbin/partx - - inst_libdir_file "libmultipath*" "multipath/*" -+ inst_libdir_file 'libgcc_s.so*' - - if dracut_module_included "systemd"; then - inst_multiple \ diff --git a/0017-90multipath-Load-device_handler-modules-early-during.patch b/0017-90multipath-Load-device_handler-modules-early-during.patch deleted file mode 100644 index f579234..0000000 --- a/0017-90multipath-Load-device_handler-modules-early-during.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 856f8265aa8b86ff74802fbfe3e555864794ec2a Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 20 Nov 2014 15:56:44 +0100 -Subject: [PATCH] 90multipath: Load device_handler modules early during boot - -The device handler modules need to be loaded early during boot -to avoid I/O errors being printed to the system log. - -References: bnc#871617 - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - modules.d/90multipath/module-setup.sh | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh -index a547c07..6f4728a 100755 ---- a/modules.d/90multipath/module-setup.sh -+++ b/modules.d/90multipath/module-setup.sh -@@ -28,6 +28,15 @@ depends() { - } - - # called by dracut -+cmdline() { -+ for m in scsi_dh_alua scsi_dh_emc scsi_dh_rdac ; do -+ if module_is_host_only $m ; then -+ printf 'rd.driver.pre=%s ' "$m" -+ fi -+ done -+} -+ -+# called by dracut - installkernel() { - local _ret - local _arch=$(uname -m) -@@ -89,6 +98,11 @@ install() { - inst_libdir_file "libmultipath*" "multipath/*" - inst_libdir_file 'libgcc_s.so*' - -+ if [[ $hostonly_cmdline ]] ; then -+ local _conf=$(cmdline) -+ [[ $_conf ]] && echo "$_conf" >> "${initdir}/etc/cmdline.d/90multipath.conf" -+ fi -+ - if dracut_module_included "systemd"; then - inst_multiple \ - $systemdsystemunitdir/multipathd.service diff --git a/0018-90multipath-install-dracut-specific-service-file.patch b/0018-90multipath-install-dracut-specific-service-file.patch deleted file mode 100644 index 137e10a..0000000 --- a/0018-90multipath-install-dracut-specific-service-file.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 78a78e4239e16a033134dde71830d5bb977f6814 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 20 Nov 2014 15:56:45 +0100 -Subject: [PATCH] 90multipath: install dracut-specific service file - -The multipathd package might install a service and a socket -file. Using the original service file from the installed -system without the socket file triggers a bug in systemd, -causing systemd to crash. - -As we don't actually need to socket file in the initrd we -should be installing our own service file which does not -reference the socket file at all. - -References: bnc#871610 - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - modules.d/90multipath/module-setup.sh | 7 +++---- - modules.d/90multipath/multipathd.service | 15 +++++++++++++++ - 2 files changed, 18 insertions(+), 4 deletions(-) - create mode 100644 modules.d/90multipath/multipathd.service - -diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh -index 6f4728a..a8700f4 100755 ---- a/modules.d/90multipath/module-setup.sh -+++ b/modules.d/90multipath/module-setup.sh -@@ -104,10 +104,9 @@ install() { - fi - - if dracut_module_included "systemd"; then -- inst_multiple \ -- $systemdsystemunitdir/multipathd.service -- mkdir -p "${initdir}${systemdsystemconfdir}/sysinit.target.wants" -- ln -rfs "${initdir}${systemdsystemunitdir}/multipathd.service" "${initdir}${systemdsystemconfdir}/sysinit.target.wants/multipathd.service" -+ inst_simple "${moddir}/multipathd.service" "${systemdsystemunitdir}/multipathd.service" -+ mkdir -p "${initdir}${systemdsystemunitdir}/sysinit.target.wants" -+ ln -rfs "${initdir}${systemdsystemunitdir}/multipathd.service" "${initdir}${systemdsystemunitdir}/sysinit.target.wants/multipathd.service" - else - inst_hook pre-trigger 02 "$moddir/multipathd.sh" - inst_hook cleanup 02 "$moddir/multipathd-stop.sh" -diff --git a/modules.d/90multipath/multipathd.service b/modules.d/90multipath/multipathd.service -new file mode 100644 -index 0000000..44a7b80 ---- /dev/null -+++ b/modules.d/90multipath/multipathd.service -@@ -0,0 +1,15 @@ -+[Unit] -+Description=Device-Mapper Multipath Device Controller -+Before=iscsi.service iscsid.service lvm2-activation-early.service -+DefaultDependencies=no -+Conflicts=shutdown.target -+ -+[Service] -+Type=simple -+ExecStartPre=/sbin/modprobe dm-multipath -+ExecStart=/sbin/multipathd -s -d -+ExecReload=/sbin/multipathd reconfigure -+ExecStop=/sbin/multipathd shutdown -+ -+[Install] -+WantedBy=sysinit.target diff --git a/0019-multipath-multipathd.service-add-more-Conditions.patch b/0019-multipath-multipathd.service-add-more-Conditions.patch deleted file mode 100644 index 9c9e32c..0000000 --- a/0019-multipath-multipathd.service-add-more-Conditions.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 2b2033e561bbf35dcdf849b8014be5b9162b8bd6 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 25 Nov 2014 13:23:21 +0100 -Subject: [PATCH] multipath/multipathd.service: add more Conditions - -Do not start multipathd on rd.multipath=0 rd_NO_MULTIPATH and if there -is no multipath.conf. ---- - modules.d/90multipath/multipathd.service | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/modules.d/90multipath/multipathd.service b/modules.d/90multipath/multipathd.service -index 44a7b80..b64b02c 100644 ---- a/modules.d/90multipath/multipathd.service -+++ b/modules.d/90multipath/multipathd.service -@@ -3,6 +3,10 @@ Description=Device-Mapper Multipath Device Controller - Before=iscsi.service iscsid.service lvm2-activation-early.service - DefaultDependencies=no - Conflicts=shutdown.target -+ConditionKernelCommandLine=!nompath -+ConditionKernelCommandLine=!rd.multipath=0 -+ConditionKernelCommandLine=!rd_NO_MULTIPATH -+ConditionPathExists=/etc/multipath.conf - - [Service] - Type=simple diff --git a/0020-dmsquash-live-do-not-abort-if-user-pressed-ESC-on-ch.patch b/0020-dmsquash-live-do-not-abort-if-user-pressed-ESC-on-ch.patch deleted file mode 100644 index e539e0b..0000000 --- a/0020-dmsquash-live-do-not-abort-if-user-pressed-ESC-on-ch.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 370035d561baa6852bcb02161ef736a78b62b336 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 25 Nov 2014 13:44:54 +0100 -Subject: [PATCH] dmsquash-live: do not abort, if user pressed ESC on - checkisomd5 - -If the user pressed ESC while checkisomd5 runs the media check, it will -exit with "2". Previously that would mean, that the media check was not -successful. ---- - modules.d/90dmsquash-live/checkisomd5@.service | 1 + - modules.d/90dmsquash-live/dmsquash-live-root.sh | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/modules.d/90dmsquash-live/checkisomd5@.service b/modules.d/90dmsquash-live/checkisomd5@.service -index 20e40bd..c4ca10f 100644 ---- a/modules.d/90dmsquash-live/checkisomd5@.service -+++ b/modules.d/90dmsquash-live/checkisomd5@.service -@@ -11,3 +11,4 @@ StandardInput=tty-force - StandardOutput=inherit - StandardError=inherit - TimeoutSec=0 -+SuccessExitStatus=2 -diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh -index 246235b..d921f0c 100755 ---- a/modules.d/90dmsquash-live/dmsquash-live-root.sh -+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh -@@ -42,7 +42,7 @@ if [ -n "$check" ]; then - else - checkisomd5 --verbose $livedev - fi -- if [ $? -ne 0 ]; then -+ if [ $? -eq 1 ]; then - die "CD check failed!" - exit 1 - fi diff --git a/0021-fips-add-libfreeblpriv3.so-and-libfreeblpriv3.chk.patch b/0021-fips-add-libfreeblpriv3.so-and-libfreeblpriv3.chk.patch deleted file mode 100644 index cf72193..0000000 --- a/0021-fips-add-libfreeblpriv3.so-and-libfreeblpriv3.chk.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 3659d64df3fe87e2ec2ca6a55c8f456dabb953db Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 28 Nov 2014 15:32:17 +0100 -Subject: [PATCH] fips: add libfreeblpriv3.so and libfreeblpriv3.chk - ---- - modules.d/01fips/module-setup.sh | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh -index aab96da..01e84e5 100755 ---- a/modules.d/01fips/module-setup.sh -+++ b/modules.d/01fips/module-setup.sh -@@ -40,7 +40,8 @@ install() { - - inst_libdir_file libsoftokn3.so libsoftokn3.so \ - libsoftokn3.chk libfreebl3.so libfreebl3.chk \ -- libssl.so 'hmaccalc/sha512hmac.hmac' libssl.so.10 -+ libssl.so 'hmaccalc/sha512hmac.hmac' libssl.so.10 \ -+ libfreeblpriv3.so and libfreeblpriv3.chk - - inst_multiple -o prelink - inst_simple /etc/system-fips diff --git a/0022-base-init.sh-ignore-exclamation-mark-for-kmod-static.patch b/0022-base-init.sh-ignore-exclamation-mark-for-kmod-static.patch deleted file mode 100644 index f6238ac..0000000 --- a/0022-base-init.sh-ignore-exclamation-mark-for-kmod-static.patch +++ /dev/null @@ -1,41 +0,0 @@ -From fa45d0d9c9109f3c2953ad02d7e3aa69c4e09add Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 1 Dec 2014 11:50:00 +0100 -Subject: [PATCH] base/init.sh: ignore exclamation mark for kmod static-nodes - -newer versions add an exclamation mark for the type, to mark it to be -created on boot only. ---- - modules.d/99base/init.sh | 19 ++++++++++--------- - 1 file changed, 10 insertions(+), 9 deletions(-) - -diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh -index 3afe6d5..5f66d1f 100755 ---- a/modules.d/99base/init.sh -+++ b/modules.d/99base/init.sh -@@ -73,15 +73,16 @@ fi - if command -v kmod >/dev/null 2>/dev/null; then - kmod static-nodes --format=tmpfiles 2>/dev/null | \ - while read type file mode a a a majmin; do -- case $type in -- d) -- mkdir -m $mode -p $file -- ;; -- c) -- mknod -m $mode $file $type ${majmin%:*} ${majmin#*:} -- ;; -- esac -- done -+ type=${type%\!} -+ case $type in -+ d) -+ mkdir -m $mode -p $file -+ ;; -+ c) -+ mknod -m $mode $file $type ${majmin%:*} ${majmin#*:} -+ ;; -+ esac -+ done - fi - - trap "action_on_fail Signal caught!" 0 diff --git a/0023-dracut.sh-add-tmpfilesdir-to-install-files-to-usr-li.patch b/0023-dracut.sh-add-tmpfilesdir-to-install-files-to-usr-li.patch deleted file mode 100644 index 2dccd0f..0000000 --- a/0023-dracut.sh-add-tmpfilesdir-to-install-files-to-usr-li.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 3a04bddeed15c810865aa49a2575bf13e651272d Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 1 Dec 2014 12:34:54 +0100 -Subject: [PATCH] dracut.sh: add $tmpfilesdir to install files to - /usr/lib/tmpfiles.d - ---- - dracut.sh | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -diff --git a/dracut.sh b/dracut.sh -index 4590f79..2357987 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1226,6 +1226,14 @@ fi - - [[ -d "$systemdsystemconfdir" ]] || systemdsystemconfdir=/etc/systemd/system - -+[[ -d $tmpfilesdir ]] \ -+ || tmpfilesdir=$(pkg-config systemd --variable=tmpfilesdir 2>/dev/null) -+ -+if ! [[ -d "$tmpfilesdir" ]]; then -+ [[ -f /lib/tmpfiles.d ]] && tmpfilesdir=/lib/tmpfiles.d -+ [[ -f /usr/lib/tmpfiles.d ]] && tmpfilesdir=/usr/lib/tmpfiles.d -+fi -+ - export initdir dracutbasedir \ - dracutmodules force_add_dracutmodules add_dracutmodules omit_dracutmodules \ - mods_to_load \ -@@ -1236,7 +1244,8 @@ export initdir dracutbasedir \ - debug host_fs_types host_devs sshkey add_fstab \ - DRACUT_VERSION udevdir prefix filesystems drivers \ - systemdutildir systemdsystemunitdir systemdsystemconfdir \ -- host_modalias host_modules hostonly_cmdline loginstall -+ host_modalias host_modules hostonly_cmdline loginstall \ -+ tmpfilesdir - - mods_to_load="" - # check all our modules to see if they should be sourced. diff --git a/0024-do-not-symlink-var-log-to-run-log.patch b/0024-do-not-symlink-var-log-to-run-log.patch deleted file mode 100644 index 98b0b85..0000000 --- a/0024-do-not-symlink-var-log-to-run-log.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 99d4fd6bb791ca8ce07e07e13b58445f3e20894a Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 1 Dec 2014 12:36:20 +0100 -Subject: [PATCH] do not symlink /var/log to /run/log - -some programs e.g. systemd-journald expect a directory in /var/log as -the marker to do some actions. Here journald tries to flush -/run/log/journal to /var/log/journal, if the directory is seen. - -/var/log is now a symlink to /run/initramfs/log. ---- - dracut.sh | 1 - - modules.d/98systemd/dracut-tmpfiles.conf | 3 +++ - modules.d/98systemd/module-setup.sh | 5 +++++ - modules.d/99base/dracut-lib.sh | 6 +++++- - 4 files changed, 13 insertions(+), 2 deletions(-) - create mode 100644 modules.d/98systemd/dracut-tmpfiles.conf - -diff --git a/dracut.sh b/dracut.sh -index 2357987..a542f33 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1300,7 +1300,6 @@ if [[ $kernel_only != yes ]]; then - - ln -sfn ../run "$initdir/var/run" - ln -sfn ../run/lock "$initdir/var/lock" -- ln -sfn ../run/log "$initdir/var/log" - else - for d in lib "$libdir"; do - [[ -e "${initdir}${prefix}/$d" ]] && continue -diff --git a/modules.d/98systemd/dracut-tmpfiles.conf b/modules.d/98systemd/dracut-tmpfiles.conf -new file mode 100644 -index 0000000..3c21ce8 ---- /dev/null -+++ b/modules.d/98systemd/dracut-tmpfiles.conf -@@ -0,0 +1,3 @@ -+d /run/initramfs 0755 root root - -+d /run/initramfs/log 0755 root root - -+L /var/log - - - - ../run/initramfs/log -diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh -index bd4433e..8052984 100755 ---- a/modules.d/98systemd/module-setup.sh -+++ b/modules.d/98systemd/module-setup.sh -@@ -123,6 +123,8 @@ install() { - $systemdsystemunitdir/slices.target \ - $systemdsystemunitdir/system.slice \ - \ -+ $tmpfilesdir/systemd.conf \ -+ \ - journalctl systemctl echo swapoff systemd-cgls systemd-tmpfiles - - inst_multiple -o \ -@@ -232,6 +234,9 @@ install() { - ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/initrd.target.wants/${i}" - done - -+ inst_simple "$moddir/dracut-tmpfiles.conf" "$tmpfilesdir/dracut-tmpfiles.conf" -+ -+ - mkdir -p "$initdir/etc/systemd" - # turn off RateLimit for journal - { -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index 8bc6b26..0a89cc8 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -6,7 +6,11 @@ if [ -n "$NEWROOT" ]; then - [ -d $NEWROOT ] || mkdir -p -m 0755 $NEWROOT - fi - --[ -d /run/initramfs ] || mkdir -p -m 0755 /run/initramfs -+if ! [ -d /run/initramfs ]; then -+ mkdir -p -m 0755 /run/initramfs/log -+ ln -sfn /run/initramfs/log /var/log -+fi -+ - [ -d /run/lock ] || mkdir -p -m 0755 /run/lock - [ -d /run/log ] || mkdir -p -m 0755 /run/log - diff --git a/0025-cms-cms-write-ifcfg.sh-turn-SUBCHANNELS-into-lowerca.patch b/0025-cms-cms-write-ifcfg.sh-turn-SUBCHANNELS-into-lowerca.patch deleted file mode 100644 index b06b15e..0000000 --- a/0025-cms-cms-write-ifcfg.sh-turn-SUBCHANNELS-into-lowerca.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 3ae03005b85a702256ead058375c9fab2e53950e Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 1 Dec 2014 15:04:53 +0100 -Subject: [PATCH] cms/cms-write-ifcfg.sh: turn SUBCHANNELS into lowercase - ---- - modules.d/80cms/cms-write-ifcfg.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/80cms/cms-write-ifcfg.sh b/modules.d/80cms/cms-write-ifcfg.sh -index d3c7c46..eb10ae2 100755 ---- a/modules.d/80cms/cms-write-ifcfg.sh -+++ b/modules.d/80cms/cms-write-ifcfg.sh -@@ -7,6 +7,7 @@ mkdir -m 0755 -p /run/initramfs/state/etc/sysconfig/network-scripts - function cms_write_config() - { - . /tmp/cms.conf -+ SUBCHANNELS="$(echo $SUBCHANNELS | sed 'y/ABCDEF/abcdef/')" - OLDIFS=$IFS - IFS=, - read -a subch_array <<< "indexzero,$SUBCHANNELS" diff --git a/0026-40network-Fix-the-syntax-to-correct-the-judgment-sen.patch b/0026-40network-Fix-the-syntax-to-correct-the-judgment-sen.patch deleted file mode 100644 index cafbef1..0000000 --- a/0026-40network-Fix-the-syntax-to-correct-the-judgment-sen.patch +++ /dev/null @@ -1,28 +0,0 @@ -From c440d302f1cdfc0336e9086c7b9016356f961936 Mon Sep 17 00:00:00 2001 -From: Minfei Huang -Date: Mon, 1 Dec 2014 12:37:06 +0800 -Subject: [PATCH] 40network: Fix the syntax to correct the judgment sentence - -In the judgment sentence, it will print the following warning message, -becasuse of lacking the blank on the left of ']'. - -/lib/net-lib.sh: line 110: [: missing `]' - -Signed-off-by: Minfei Huang ---- - modules.d/40network/net-lib.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh -index 48e7014..d9c5a1d 100755 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -105,7 +105,7 @@ setup_net() { - # add static route - for _p in $(getargs rd.route); do - route_to_var "$_p" || continue -- [ -n "$route_dev" ] && [ "$route_dev" != "$netif"] && continue -+ [ -n "$route_dev" ] && [ "$route_dev" != "$netif" ] && continue - ip route add "$route_mask" ${route_gw:+via "$route_gw"} ${route_dev:+dev "$route_dev"} - if strstr ":" "$route_mask"; then - printf -- "%s\n" "$route_mask ${route_gw:+via $route_gw} ${route_dev:+dev $route_dev}" \ diff --git a/0027-initrd-release-move-from-etc-to-usr-lib.patch b/0027-initrd-release-move-from-etc-to-usr-lib.patch deleted file mode 100644 index 99e0b6d..0000000 --- a/0027-initrd-release-move-from-etc-to-usr-lib.patch +++ /dev/null @@ -1,195 +0,0 @@ -From ca4108b78e04d6ee202efbeea13840fac46f76f6 Mon Sep 17 00:00:00 2001 -From: Tom Gundersen -Date: Mon, 1 Dec 2014 16:59:09 +0100 -Subject: [PATCH] initrd-release: move from /etc to /usr/lib - -This mimicks the similar move of os-release which was done in systemd. These -files are not configuration, but part of the OS. - -Still symlinks are in place for compatibility, but those should probably be -dropped eventually. ---- - modules.d/98systemd/dracut-cmdline-ask.service | 2 +- - modules.d/98systemd/dracut-cmdline.service | 2 +- - modules.d/98systemd/dracut-cmdline.sh | 2 +- - modules.d/98systemd/dracut-initqueue.service | 2 +- - modules.d/98systemd/dracut-mount.service | 2 +- - modules.d/98systemd/dracut-pre-mount.service | 2 +- - modules.d/98systemd/dracut-pre-pivot.service | 2 +- - modules.d/98systemd/dracut-pre-trigger.service | 2 +- - modules.d/98systemd/dracut-pre-udev.service | 2 +- - modules.d/98systemd/initrd.target | 2 +- - modules.d/99base/dracut-lib.sh | 2 +- - modules.d/99base/init.sh | 2 +- - modules.d/99base/module-setup.sh | 4 +++- - 13 files changed, 15 insertions(+), 13 deletions(-) - -diff --git a/modules.d/98systemd/dracut-cmdline-ask.service b/modules.d/98systemd/dracut-cmdline-ask.service -index 9993671..9a34b35 100644 ---- a/modules.d/98systemd/dracut-cmdline-ask.service -+++ b/modules.d/98systemd/dracut-cmdline-ask.service -@@ -13,7 +13,7 @@ DefaultDependencies=no - Before=dracut-cmdline.service - After=systemd-journald.socket - Wants=systemd-journald.socket --ConditionPathExists=/etc/initrd-release -+ConditionPathExists=/usr/lib/initrd-release - ConditionKernelCommandLine=rd.cmdline=ask - - [Service] -diff --git a/modules.d/98systemd/dracut-cmdline.service b/modules.d/98systemd/dracut-cmdline.service -index f888bf4..6eeb991 100644 ---- a/modules.d/98systemd/dracut-cmdline.service -+++ b/modules.d/98systemd/dracut-cmdline.service -@@ -14,7 +14,7 @@ DefaultDependencies=no - Before=dracut-pre-udev.service - After=systemd-journald.socket - Wants=systemd-journald.socket --ConditionPathExists=/etc/initrd-release -+ConditionPathExists=/usr/lib/initrd-release - ConditionPathExistsGlob=|/etc/cmdline.d/*.conf - ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cmdline - ConditionKernelCommandLine=|rd.break=cmdline -diff --git a/modules.d/98systemd/dracut-cmdline.sh b/modules.d/98systemd/dracut-cmdline.sh -index ad81501..871f81b 100755 ---- a/modules.d/98systemd/dracut-cmdline.sh -+++ b/modules.d/98systemd/dracut-cmdline.sh -@@ -5,7 +5,7 @@ if [ -f /dracut-state.sh ]; then - fi - type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh - --[ -f /etc/initrd-release ] && . /etc/initrd-release -+[ -f /usr/lib/initrd-release ] && . /usr/lib/initrd-release - [ -n "$VERSION" ] && info "dracut-$VERSION" - - if ! getargbool 1 'rd.hostonly'; then -diff --git a/modules.d/98systemd/dracut-initqueue.service b/modules.d/98systemd/dracut-initqueue.service -index 1b9e701..5d772f7 100644 ---- a/modules.d/98systemd/dracut-initqueue.service -+++ b/modules.d/98systemd/dracut-initqueue.service -@@ -15,7 +15,7 @@ Before=remote-fs-pre.target - Wants=remote-fs-pre.target - After=systemd-udev-trigger.service - Wants=systemd-udev-trigger.service --ConditionPathExists=/etc/initrd-release -+ConditionPathExists=/usr/lib/initrd-release - ConditionPathExists=|/lib/dracut/need-initqueue - ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/*.sh - ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/settled/*.sh -diff --git a/modules.d/98systemd/dracut-mount.service b/modules.d/98systemd/dracut-mount.service -index 20c633d..1b14f4a 100644 ---- a/modules.d/98systemd/dracut-mount.service -+++ b/modules.d/98systemd/dracut-mount.service -@@ -12,7 +12,7 @@ Description=dracut mount hook - Documentation=man:dracut-mount.service(8) - After=initrd-root-fs.target initrd-parse-etc.service - After=dracut-initqueue.service dracut-pre-mount.service --ConditionPathExists=/etc/initrd-release -+ConditionPathExists=/usr/lib/initrd-release - ConditionDirectoryNotEmpty=|/lib/dracut/hooks/mount - ConditionKernelCommandLine=|rd.break=mount - -diff --git a/modules.d/98systemd/dracut-pre-mount.service b/modules.d/98systemd/dracut-pre-mount.service -index d7be48d..96ea995 100644 ---- a/modules.d/98systemd/dracut-pre-mount.service -+++ b/modules.d/98systemd/dracut-pre-mount.service -@@ -14,7 +14,7 @@ DefaultDependencies=no - Before=initrd-root-fs.target sysroot.mount - After=dracut-initqueue.service - After=cryptsetup.target --ConditionPathExists=/etc/initrd-release -+ConditionPathExists=/usr/lib/initrd-release - ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-mount - ConditionKernelCommandLine=|rd.break=pre-mount - -diff --git a/modules.d/98systemd/dracut-pre-pivot.service b/modules.d/98systemd/dracut-pre-pivot.service -index d7c7b1d..f5a85ce 100644 ---- a/modules.d/98systemd/dracut-pre-pivot.service -+++ b/modules.d/98systemd/dracut-pre-pivot.service -@@ -15,7 +15,7 @@ After=dracut-initqueue.service dracut-pre-mount.service dracut-mount.service - Before=initrd-cleanup.service - Wants=remote-fs.target - After=remote-fs.target --ConditionPathExists=/etc/initrd-release -+ConditionPathExists=/usr/lib/initrd-release - ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-pivot - ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cleanup - ConditionKernelCommandLine=|rd.break=pre-pivot -diff --git a/modules.d/98systemd/dracut-pre-trigger.service b/modules.d/98systemd/dracut-pre-trigger.service -index 69b4cce..826b89b 100644 ---- a/modules.d/98systemd/dracut-pre-trigger.service -+++ b/modules.d/98systemd/dracut-pre-trigger.service -@@ -14,7 +14,7 @@ DefaultDependencies=no - Before=systemd-udev-trigger.service dracut-initqueue.service - After=dracut-pre-udev.service systemd-udevd.service systemd-tmpfiles-setup-dev.service - Wants=dracut-pre-udev.service systemd-udevd.service --ConditionPathExists=/etc/initrd-release -+ConditionPathExists=/usr/lib/initrd-release - ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-trigger - ConditionKernelCommandLine=|rd.break=pre-trigger - -diff --git a/modules.d/98systemd/dracut-pre-udev.service b/modules.d/98systemd/dracut-pre-udev.service -index d125b37..73740be 100644 ---- a/modules.d/98systemd/dracut-pre-udev.service -+++ b/modules.d/98systemd/dracut-pre-udev.service -@@ -14,7 +14,7 @@ DefaultDependencies=no - Before=systemd-udevd.service dracut-pre-trigger.service - After=dracut-cmdline.service - Wants=dracut-cmdline.service --ConditionPathExists=/etc/initrd-release -+ConditionPathExists=/usr/lib/initrd-release - ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-udev - ConditionKernelCommandLine=|rd.break=pre-udev - ConditionKernelCommandLine=|rd.driver.blacklist -diff --git a/modules.d/98systemd/initrd.target b/modules.d/98systemd/initrd.target -index 19494d4..4b7e7da 100644 ---- a/modules.d/98systemd/initrd.target -+++ b/modules.d/98systemd/initrd.target -@@ -6,4 +6,4 @@ After=basic.target rescue.service rescue.target - AllowIsolate=yes - OnFailure=emergency.target - OnFailureIsolate=yes --ConditionPathExists=/etc/initrd-release -+ConditionPathExists=/usr/lib/initrd-release -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index 0a89cc8..5fc5615 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -393,7 +393,7 @@ splitsep() { - } - - setdebug() { -- [ -f /etc/initrd-release ] || return -+ [ -f /usr/lib/initrd-release ] || return - if [ -z "$RD_DEBUG" ]; then - if [ -e /proc/cmdline ]; then - RD_DEBUG=no -diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh -index 5f66d1f..7fcea4a 100755 ---- a/modules.d/99base/init.sh -+++ b/modules.d/99base/init.sh -@@ -106,7 +106,7 @@ else - exec 0<>/dev/console 1<>/dev/console 2<>/dev/console - fi - --[ -f /etc/initrd-release ] && . /etc/initrd-release -+[ -f /usr/lib/initrd-release ] && . /usr/lib/initrd-release - [ -n "$VERSION_ID" ] && info "$NAME-$VERSION_ID" - - source_conf /etc/conf.d -diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh -index fab4a78..7d30320 100755 ---- a/modules.d/99base/module-setup.sh -+++ b/modules.d/99base/module-setup.sh -@@ -88,8 +88,10 @@ install() { - echo VERSION_ID=$VERSION_ID - echo PRETTY_NAME=\"$PRETTY_NAME\" - echo ANSI_COLOR=\"$ANSI_COLOR\" -- } > $initdir/etc/initrd-release -+ } > $initdir/usr/lib/initrd-release - echo dracut-$DRACUT_VERSION > $initdir/lib/dracut/dracut-$DRACUT_VERSION -+ ln -sf ../usr/lib/initrd-release $initdir/etc/initrd-release -+ ln -sf initrd-release $initdir/usr/lib/os-release - ln -sf initrd-release $initdir/etc/os-release - - ## save host_devs which we need bring up diff --git a/0028-dracut.conf.d-fedora.conf.example-turn-on-early_micr.patch b/0028-dracut.conf.d-fedora.conf.example-turn-on-early_micr.patch deleted file mode 100644 index 4eba544..0000000 --- a/0028-dracut.conf.d-fedora.conf.example-turn-on-early_micr.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 414dc51ca2b60a15405bb2b0b1ac23d4d1ef905c Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 4 Dec 2014 11:54:47 +0100 -Subject: [PATCH] dracut.conf.d/fedora.conf.example: turn on early_microcode - ---- - dracut.conf.d/fedora.conf.example | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/dracut.conf.d/fedora.conf.example b/dracut.conf.d/fedora.conf.example -index c06202b..f248f51 100644 ---- a/dracut.conf.d/fedora.conf.example -+++ b/dracut.conf.d/fedora.conf.example -@@ -4,6 +4,8 @@ - i18n_vars="/etc/sysconfig/keyboard:KEYTABLE-KEYMAP /etc/sysconfig/i18n:SYSFONT-FONT,FONTACM-FONT_MAP,FONT_UNIMAP" - i18n_default_font="latarcyrheb-sun16" - i18n_install_all="yes" -+ -+ - stdloglvl=3 - sysloglvl=5 - install_optional_items+=" vi /etc/virc ps grep cat rm " -@@ -13,3 +15,4 @@ systemdsystemunitdir=/usr/lib/systemd/system - systemdsystemconfdir=/etc/systemd/system - udevdir=/usr/lib/udev - hostonly="yes" -+early_microcode="yes" diff --git a/0029-Fixed-the-dracut-shutdown.service.patch b/0029-Fixed-the-dracut-shutdown.service.patch deleted file mode 100644 index 123a1eb..0000000 --- a/0029-Fixed-the-dracut-shutdown.service.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 25b987fed6bd5926a5c1d4027ec91a3c56d3aa85 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 8 Dec 2014 10:43:54 +0100 -Subject: [PATCH] Fixed the dracut-shutdown.service - -Make the service a oneshot service, which remains after exit. This -ensures, that the ExecStop is executed later on, if a shutdown occurs. ---- - dracut-initramfs-restore.sh | 4 ++++ - modules.d/98systemd/dracut-shutdown.service | 7 ++++--- - 2 files changed, 8 insertions(+), 3 deletions(-) - -diff --git a/dracut-initramfs-restore.sh b/dracut-initramfs-restore.sh -index 8b30af1..8b9b80f 100644 ---- a/dracut-initramfs-restore.sh -+++ b/dracut-initramfs-restore.sh -@@ -2,6 +2,10 @@ - - set -e - -+# do some sanity checks first -+[ -e /run/initramfs/bin/sh ] && exit 0 -+[ -e /run/initramfs/.need_shutdown ] || exit 0 -+ - KERNEL_VERSION="$(uname -r)" - - [[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut -diff --git a/modules.d/98systemd/dracut-shutdown.service b/modules.d/98systemd/dracut-shutdown.service -index a4a08ca..21c9d29 100644 ---- a/modules.d/98systemd/dracut-shutdown.service -+++ b/modules.d/98systemd/dracut-shutdown.service -@@ -8,13 +8,14 @@ - [Unit] - Description=Restore /run/initramfs on shutdown - Documentation=man:dracut-shutdown.service(8) --After=local-fs.target -+After=local-fs.target boot.mount boot.automount - Wants=local-fs.target --Before=systemd-reboot.service shutdown.target -+Conflicts=shutdown.target umount.target - DefaultDependencies=no --ConditionPathExists=/run/initramfs/.need_shutdown - ConditionPathExists=!/run/initramfs/bin/sh - - [Service] -+RemainAfterExit=yes -+Type=oneshot - ExecStart=/bin/true - ExecStop=/usr/lib/dracut/dracut-initramfs-restore diff --git a/0030-dmsquash-live-setup-the-images-in-run-initramfs.patch b/0030-dmsquash-live-setup-the-images-in-run-initramfs.patch deleted file mode 100644 index 8cf16e5..0000000 --- a/0030-dmsquash-live-setup-the-images-in-run-initramfs.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 1f8abe81a9fca0f44c63bf3bd30a7f7fbec28642 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 16 Dec 2014 12:53:18 +0100 -Subject: [PATCH] dmsquash-live: setup the images in /run/initramfs - -We want to cleanup / after switch_root. Placing the loop files in / -works, but it is more sane to put them in /run/initramfs ---- - modules.d/90dmsquash-live/dmsquash-live-root.sh | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh -index d921f0c..6e504a6 100755 ---- a/modules.d/90dmsquash-live/dmsquash-live-root.sh -+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh -@@ -162,9 +162,9 @@ fi - - if [ -n "$OSMINSQFS" ]; then - # decompress the delta data -- dd if=$OSMINSQFS of=/osmin.img 2> /dev/null -+ dd if=$OSMINSQFS of=/run/initramfs/osmin.img 2> /dev/null - OSMIN_SQUASHED_LOOPDEV=$( losetup -f ) -- losetup -r $OSMIN_SQUASHED_LOOPDEV /osmin.img -+ losetup -r $OSMIN_SQUASHED_LOOPDEV /run/initramfs/osmin.img - mkdir -m 0755 -p /run/initramfs/squashfs.osmin - mount -n -t squashfs -o ro $OSMIN_SQUASHED_LOOPDEV /run/initramfs/squashfs.osmin - OSMIN_LOOPDEV=$( losetup -f ) -@@ -185,8 +185,8 @@ if [ -n "$FSIMG" ] ; then - if [ -n "$writable_fsimg" ] ; then - # mount the provided fileysstem read/write - echo "Unpacking live filesystem (may take some time)" -- unpack_archive $FSIMG /tmp/fsimg/ -- losetup $BASE_LOOPDEV /tmp/fsimg/rootfs.img -+ unpack_archive $FSIMG /run/initramfs/fsimg/ -+ losetup $BASE_LOOPDEV /run/initramfs/fsimg/rootfs.img - echo "0 $( blockdev --getsize $BASE_LOOPDEV ) linear $BASE_LOOPDEV 0" | dmsetup create live-rw - else - # mount the filesystem read-only and add a dm snapshot for writes -@@ -204,10 +204,10 @@ if [ -e "$SQUASHED" ] ; then - if [ -n "$live_ram" ] ; then - echo "Copying live image to RAM..." - echo "(this may take a few minutes)" -- dd if=$SQUASHED of=/squashed.img bs=512 2> /dev/null -+ dd if=$SQUASHED of=/run/initramfs/squashed.img bs=512 2> /dev/null - umount -n /run/initramfs/live - echo "Done copying live image to RAM." -- SQUASHED="/squashed.img" -+ SQUASHED="/run/initramfs/squashed.img" - fi - - SQUASHED_LOOPDEV=$( losetup -f ) diff --git a/0031-mkinitrd-suse-Update-to-sles12-SUSE-state.patch b/0031-mkinitrd-suse-Update-to-sles12-SUSE-state.patch deleted file mode 100644 index 74754c9..0000000 --- a/0031-mkinitrd-suse-Update-to-sles12-SUSE-state.patch +++ /dev/null @@ -1,195 +0,0 @@ -From 552c37e1563eccbc25968064b087232b9eaea987 Mon Sep 17 00:00:00 2001 -From: Thomas Renninger -Date: Thu, 11 Dec 2014 15:45:52 +0100 -Subject: [PATCH] mkinitrd-suse: Update to sles12 SUSE state - -Incorporates these patches: -- 0013 mkinitrd-suse: do not update bootloader if no kernel was found - bnc#858268 -- 0018 mkinitrd-suse: Fix whitespaces when adding drivers -- 0032 mkinitrd-suse.sh: Use '--hostonly' and '--hostonly-cmdline' correctly - bnc#874000,bnc#874905,bnc#874363 -- 0039 Remove --force parameter from mkinitrd -- 0041 mkinitd-suse: remove --hostonly and --hostonly-cmdline - Should be set via configuration files, not in the script itself. -- 0051 mkinitrd-suse: add 'update bootloader' message -- 0120 mkinitrd-suse.sh: Bail out with exit 1 if initrd cannot be generated - bnc#886630 - -Signed-off-by: Thomas Renninger ---- - mkinitrd-suse.8.asc | 7 +++--- - mkinitrd-suse.sh | 66 +++++++++++++++++++++++++---------------------------- - 2 files changed, 34 insertions(+), 39 deletions(-) - -diff --git a/mkinitrd-suse.8.asc b/mkinitrd-suse.8.asc -index 9eb8fc9..cdb8e3a 100644 ---- a/mkinitrd-suse.8.asc -+++ b/mkinitrd-suse.8.asc -@@ -76,7 +76,9 @@ OPTIONS - - **-A**:: - Create a so called "monster initrd" which includes all available -- features and modules. -+ features and modules. This calls dracut with --no-hostonly and -+ --no-hostonly-cmdline parameters internally, instead of the default -+ --hostonly and --hostonly-cmdline. - - **-v, --verbose**:: - increase verbosity level -@@ -85,9 +87,6 @@ OPTIONS - Disable logging to _/var/log/YaST2/mkinitrd.log_. This is useful for - testing if you don’t want to clutter the system log. - --**--force**:: -- overwrite existing initramfs file. -- - **--help**:: - print a help message and exit. - -diff --git a/mkinitrd-suse.sh b/mkinitrd-suse.sh -index 23dc262..af42cbe 100755 ---- a/mkinitrd-suse.sh -+++ b/mkinitrd-suse.sh -@@ -20,8 +20,6 @@ - - boot_dir="/boot" - quiet=0 --host_only=1 --force=0 - logfile=/var/log/YaST2/mkinitrd.log - dracut_cmd=dracut - -@@ -68,10 +66,7 @@ usage () { - $cmd " -j device Journal device" - $cmd " -D interface Run dhcp on the specified interface." - $cmd " -I interface Configure the specified interface statically." -- $cmd " -a acpi_dsdt Attach compiled ACPI DSDT (Differentiated" -- $cmd " System Description Table) to initrd. This" -- $cmd " replaces the DSDT of the BIOS. Defaults to" -- $cmd " the ACPI_DSDT variable in /etc/sysconfig/kernel." -+ $cmd " -a acpi_dsdt Obsolete, do not use." - $cmd " -s size Add splash animation and bootscreen to initrd." - - [[ $1 = '-n' ]] && exit 0 -@@ -204,8 +199,6 @@ default_kernel_images() { - for initrd_image in $initrd_images;do - targets="$targets $initrd_image" - done -- host_only=1 -- force=1 - } - - while (($# > 0)); do -@@ -218,8 +211,6 @@ while (($# > 0)); do - for kernel_image in $kernel_images;do - kernels="$kernels ${kernel_image#*-}" - done -- host_only=1 -- force=1 - ;; - -i) read_arg initrd_images "$@" || shift $? - for initrd_image in $initrd_images;do -@@ -261,7 +252,7 @@ while (($# > 0)); do - dracut_cmdline="${dracut_cmdline} ip=$(ipconfig $static_if)": - ;; - -a) read_arg acpi_dsdt "$@" || shift $? -- echo "mkinitrd: custom DSDT not yet supported" -+ echo "Obsolete -a param, use acpi_table_dir= and acpi_override= variables in /etc/dracut.conf.d/" - exit 1 - ;; - -s) read_arg boot_splash "$@" || shift $? -@@ -275,7 +266,6 @@ while (($# > 0)); do - --version|-R) - echo "mkinitrd: dracut compatibility wrapper" - exit 0;; -- --force) force=1;; - --quiet|-q) quiet=1;; - *) if [[ ! $targets ]]; then - targets=$1 -@@ -289,15 +279,17 @@ while (($# > 0)); do - done - - [[ $targets && $kernels ]] || default_kernel_images --[[ $targets && $kernels ]] || (error "No kernel found in $boot_dir" && usage) -+if [[ ! $targets || ! $kernels ]];then -+ error "No kernel found in $boot_dir" -+fi - - # We can have several targets/kernels, transform the list to an array - targets=( $targets ) - [[ $kernels ]] && kernels=( $kernels ) - - [[ $logfile ]] && dracut_args="${dracut_args} --logfile $logfile" --[[ $host_only == 1 ]] && dracut_args="${dracut_args} --hostonly" --[[ $force == 1 ]] && dracut_args="${dracut_args} --force" -+dracut_args="${dracut_args} --force" -+ - [[ $dracut_cmdline ]] && dracut_args="${dracut_args} --kernel-cmdline ${dracut_cmdline}" - [ -z "$(type -p update-bootloader)" ] && skip_update_bootloader=1 - -@@ -306,11 +298,9 @@ if [ -f /etc/sysconfig/kernel ] ; then - . /etc/sysconfig/kernel - fi - [[ $module_list ]] || module_list="${INITRD_MODULES}" --basicmodules="$basicmodules ${module_list}" - [[ $domu_module_list ]] || domu_module_list="${DOMU_INITRD_MODULES}" --[[ $acpi_dsdt ]] || acpi_dsdt="${ACPI_DSDT}" -+shopt -s extglob - --echo "Creating: target|kernel|dracut args|basicmodules " - for ((i=0 ; $i<${#targets[@]} ; i++)); do - - if [[ $img_vers ]];then -@@ -320,28 +310,34 @@ for ((i=0 ; $i<${#targets[@]} ; i++)); do - fi - kernel="${kernels[$i]}" - -+ if is_xen_kernel $kernel $rootfs ; then -+ modules_all="${module_list} ${domu_module_list}" -+ else -+ modules_all="${module_list}" -+ fi -+ -+ # Remove leading and trailing spaces needs (set above): shopt -s extglob -+ modules_all=${modules_all%%+([[:space:]])} -+ modules_all=${modules_all##+([[:space:]])} -+ -+ echo "Creating initrd: $target" -+ - # Duplicate code: No way found how to redirect output based on $quiet - if [[ $quiet == 1 ]];then -- echo "$target|$kernel|$dracut_args|$basicmodules" -- if is_xen_kernel $kernel $rootfs ; then -- basicmodules="$basicmodules ${domu_module_list}" -- fi -- if [[ $basicmodules ]]; then -- $dracut_cmd $dracut_args --add-drivers "$basicmodules" "$target" \ -- "$kernel" &>/dev/null -- else -+ # Duplicate code: --force-drivers must not be called with empty string -+ # -> dracut bug workarounded ugly, because of complex whitespace -+ # expansion magics -+ if [ -n "${modules_all}" ];then -+ $dracut_cmd $dracut_args --force-drivers "${modules_all}" "$target" "$kernel" &>/dev/null -+ else - $dracut_cmd $dracut_args "$target" "$kernel" &>/dev/null -- fi -+ fi - else -- if is_xen_kernel $kernel $rootfs ; then -- basicmodules="$basicmodules ${domu_module_list}" -- fi -- if [[ $basicmodules ]]; then -- $dracut_cmd $dracut_args --add-drivers "$basicmodules" "$target" \ -- "$kernel" -- else -+ if [ -n "${modules_all}" ];then -+ $dracut_cmd $dracut_args --force-drivers "${modules_all}" "$target" "$kernel" -+ else - $dracut_cmd $dracut_args "$target" "$kernel" -- fi -+ fi - fi - done - diff --git a/0032-systemd-always-tries-to-load-autofs4.patch b/0032-systemd-always-tries-to-load-autofs4.patch deleted file mode 100644 index 174056e..0000000 --- a/0032-systemd-always-tries-to-load-autofs4.patch +++ /dev/null @@ -1,29 +0,0 @@ -From ae8e6ed5afc1a58c40a2f6b4ec668545dc4841fe Mon Sep 17 00:00:00 2001 -From: Thomas Renninger -Date: Thu, 11 Dec 2014 15:45:53 +0100 -Subject: [PATCH] systemd always tries to load autofs4 - -During boot systemd tries to load autofs4, but dracut will only -add it if it's loaded by the time dracut is run. -Modify dracut to always load autofs4. - -References: bnc#869411 - -Signed-off-by: Thomas Renninger ---- - modules.d/98systemd/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh -index 8052984..53e07a2 100755 ---- a/modules.d/98systemd/module-setup.sh -+++ b/modules.d/98systemd/module-setup.sh -@@ -18,7 +18,7 @@ depends() { - } - - installkernel() { -- instmods autofs4 ipv6 -+ hostonly='' instmods autofs4 ipv6 - instmods -s efivarfs - } - diff --git a/0033-Fixup-mdraid-setup.patch b/0033-Fixup-mdraid-setup.patch deleted file mode 100644 index c2045b9..0000000 --- a/0033-Fixup-mdraid-setup.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 36894743e3105e4831a2d04fc5671c16fc5900c2 Mon Sep 17 00:00:00 2001 -From: NeilBrown -Date: Thu, 11 Dec 2014 15:45:54 +0100 -Subject: [PATCH] Fixup mdraid setup - -This sed script to edit 64-md-raid-assemble.rules needs to -be adjusted for latest mdadm - -References: bnc#866660 - -Signed-off-by: NeilBrown -Signed-off-by: Thomas Renninger ---- - modules.d/90mdraid/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh -index bc4c514..ce3394a 100755 ---- a/modules.d/90mdraid/module-setup.sh -+++ b/modules.d/90mdraid/module-setup.sh -@@ -86,7 +86,7 @@ install() { - for rule in 64-md-raid.rules 64-md-raid-assembly.rules; do - rule_path="${initdir}${udevdir}/rules.d/${rule}" - [ -f "${rule_path}" ] && sed -i -r \ -- -e '/RUN\+?="[[:alpha:]/]*mdadm[[:blank:]]+(--incremental|-I)[[:blank:]]+(\$env\{DEVNAME\}|\$tempnode|\$devnode)/d' \ -+ -e '/(RUN|IMPORT\{program\})\+?="[[:alpha:]/]*mdadm[[:blank:]]+(--incremental|-I)[[:blank:]]+(--export )?(\$env\{DEVNAME\}|\$tempnode|\$devnode)/d' \ - "${rule_path}" - done - diff --git a/0034-95udev-rules-Include-correct-sg3_utils-rules.patch b/0034-95udev-rules-Include-correct-sg3_utils-rules.patch deleted file mode 100644 index e217140..0000000 --- a/0034-95udev-rules-Include-correct-sg3_utils-rules.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 15eed1e4f1d3b72a6112cce686f00d0c97ec616d Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:45:55 +0100 -Subject: [PATCH] 95udev-rules: Include correct sg3_utils rules - -sg3_utils now provides two rules 55-scsi-sg3_id.rules and -58-scsi-sg3_symlink.rules, which need to be included instead -of the older 59-scsi-sg3_utils.rules. - -References: bnc#873151 - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - modules.d/95udev-rules/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh -index 9d6f960..e50709d 100755 ---- a/modules.d/95udev-rules/module-setup.sh -+++ b/modules.d/95udev-rules/module-setup.sh -@@ -31,6 +31,7 @@ install() { - 50-udev.rules 95-late.rules \ - 50-firmware.rules \ - 59-scsi-sg3_utils.rules \ -+ 55-scsi-sg3_id.rules 58-scsi-sg3_symlink.rules \ - 70-uaccess.rules 71-seat.rules 73-seat-late.rules \ - 75-net-description.rules \ - 80-net-name-slot.rules 80-net-setup-link.rules \ diff --git a/0035-90multipath-install-correct-multipath-rules.patch b/0035-90multipath-install-correct-multipath-rules.patch deleted file mode 100644 index fa4a29b..0000000 --- a/0035-90multipath-install-correct-multipath-rules.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 8f4ee8c71b05948c1b65f7cde49c0a4236d91f03 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:45:56 +0100 -Subject: [PATCH] 90multipath: install correct multipath rules - -The multipath and kpartx rules have different numbers in SUSE. - -The 11-dm-mpath.rules file had been missing, causing -blacklisting to not work properly. - -References: bnc#873151, bnc#872662, bnc#883149 - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - modules.d/90multipath/module-setup.sh | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh -index a8700f4..0f88f82 100755 ---- a/modules.d/90multipath/module-setup.sh -+++ b/modules.d/90multipath/module-setup.sh -@@ -114,6 +114,9 @@ install() { - - inst_hook cleanup 80 "$moddir/multipathd-needshutdown.sh" - -- inst_rules 40-multipath.rules 62-multipath.rules 65-multipath.rules 66-kpartx.rules -+ inst_rules 40-multipath.rules 56-multipath.rules \ -+ 62-multipath.rules 65-multipath.rules \ -+ 66-kpartx.rules 67-kpartx-compat.rules \ -+ 11-dm-mpath.rules - } - diff --git a/0036-95iscsi-Autodetect-iSCSI-firmware.patch b/0036-95iscsi-Autodetect-iSCSI-firmware.patch deleted file mode 100644 index b3a9f07..0000000 --- a/0036-95iscsi-Autodetect-iSCSI-firmware.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 442abd16d2cfc6e006738a7373dc14445d22448f Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:45:57 +0100 -Subject: [PATCH] 95iscsi: Autodetect iSCSI firmware - -Some iSCSI initiator present firmware information in -/sys/firmware/ibft or /sys/firmware/iscsi_bootX - -Whenever we detect one of those directories we should assume -that the iSCSI devices should be activated. - -Also incorporates SUSE patches: -0049: -95iscsi: Use 'ip=ibft' for ibft autoconfiguration - -For iBFT autoconfiguration we should be setting 'ip=ibft' -instead of rd.neednet. This should instruct dracut to only -enable the iBFT interfaces and leave the rest alone. - -References: bnc#879038 - -0054: -95iscsi: update commandline printing - -dracut has a separate callout 'cmdline' which should be used -for printing out the generated commandline. - -Signed-off-by: Pavel Wieczorkiewicz -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - modules.d/95iscsi/module-setup.sh | 26 ++++++++++++++++++++++++++ - 1 file changed, 26 insertions(+) - -diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh -index 8b42d3e..5d2a39b 100755 ---- a/modules.d/95iscsi/module-setup.sh -+++ b/modules.d/95iscsi/module-setup.sh -@@ -28,6 +28,21 @@ check() { - return 0 - } - -+install_ibft() { -+ # When iBFT / iscsi_boot is detected: -+ # - Use 'ip=ibft' to set up iBFT network interface -+ # - specify firmware booting cmdline parameter -+ -+ for d in /sys/firmware/* ; do -+ if [ -d ${d}/initiator ] ; then -+ if [ ${d##*/} = "ibft" ] ; then -+ echo -n "ip=ibft " -+ fi -+ echo -n "rd.iscsi.firmware=1" -+ fi -+ done -+} -+ - # called by dracut - depends() { - echo network rootfs-block -@@ -37,6 +52,12 @@ depends() { - installkernel() { - local _arch=$(uname -m) - -+ # Detect iBFT and perform mandatory steps -+ if [[ $hostonly_cmdline == "yes" ]] ; then -+ install_ibft > "${initdir}/etc/cmdline.d/95iscsi.conf" -+ echo >> "${initdir}/etc/cmdline.d/95iscsi.conf" -+ fi -+ - instmods bnx2i qla4xxx cxgb3i cxgb4i be2iscsi - hostonly="" instmods iscsi_tcp iscsi_ibft crc32c iscsi_boot_sysfs - iscsi_module_filter() { -@@ -77,6 +98,11 @@ installkernel() { - } - - # called by dracut -+cmdline() { -+ install_ibft -+} -+ -+# called by dracut - install() { - inst_multiple umount iscsistart hostname iscsi-iname - inst_multiple -o iscsiuio diff --git a/0037-95iscsi-Install-libgcc_s-library.patch b/0037-95iscsi-Install-libgcc_s-library.patch deleted file mode 100644 index a4b5ad4..0000000 --- a/0037-95iscsi-Install-libgcc_s-library.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 4aad3438f7e9fcd58f6c65d2d0d52c0a0db1f00a Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:45:58 +0100 -Subject: [PATCH] 95iscsi: Install libgcc_s library - -iscsiuio is using pthread, which requires libgcc_s for -pthread_cancel to work. -Without this library iscsiuio will crash with SIGABRT. - -References: bnc#881692 - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - modules.d/95iscsi/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh -index 5d2a39b..3641fb8 100755 ---- a/modules.d/95iscsi/module-setup.sh -+++ b/modules.d/95iscsi/module-setup.sh -@@ -106,6 +106,7 @@ cmdline() { - install() { - inst_multiple umount iscsistart hostname iscsi-iname - inst_multiple -o iscsiuio -+ inst_libdir_file 'libgcc_s.so*' - inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh" - inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh" - inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot" diff --git a/0038-95iscsi-Set-correct-iscsi_started-value-for-iSCSI-fi.patch b/0038-95iscsi-Set-correct-iscsi_started-value-for-iSCSI-fi.patch deleted file mode 100644 index a962e45..0000000 --- a/0038-95iscsi-Set-correct-iscsi_started-value-for-iSCSI-fi.patch +++ /dev/null @@ -1,35 +0,0 @@ -From a3a2266046299ef4cfed48ce3a2e6bb573ee0dc7 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:45:59 +0100 -Subject: [PATCH] 95iscsi: Set correct iscsi_started value for iSCSI firmware - -When iSCSI firmware booting is selected we should not rely on -'netroot' or 'iscsiroot' variables to be set. - -References: bnc#873448 - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - modules.d/95iscsi/parse-iscsiroot.sh | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh -index ca57668..85c3027 100755 ---- a/modules.d/95iscsi/parse-iscsiroot.sh -+++ b/modules.d/95iscsi/parse-iscsiroot.sh -@@ -90,8 +90,12 @@ if [ -n "$netroot" ] && [ "$root" != "/dev/root" ] && [ "$root" != "dhcp" ]; the - fi - fi - --netroot_enc=$(str_replace "$netroot" '/' '\2f') --echo "[ -f '/tmp/iscsistarted-$netroot_enc' ]" > $hookdir/initqueue/finished/iscsi_started.sh -+if [ -n "$iscsi_firmware" ] ; then -+ echo "[ -f '/tmp/iscsistarted-firmware' ]" > $hookdir/initqueue/finished/iscsi_started.sh -+else -+ netroot_enc=$(str_replace "$netroot" '/' '\2f') -+ echo "[ -f '/tmp/iscsistarted-$netroot_enc' ]" > $hookdir/initqueue/finished/iscsi_started.sh -+fi - - # Done, all good! - rootok=1 diff --git a/0039-95iscsi-strip-one-set-of-quotes-when-calling-initque.patch b/0039-95iscsi-strip-one-set-of-quotes-when-calling-initque.patch deleted file mode 100644 index 13d8bbb..0000000 --- a/0039-95iscsi-strip-one-set-of-quotes-when-calling-initque.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 9ebf4a5d3c1b47d7e681b2331cf062920613bf2e Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:46:00 +0100 -Subject: [PATCH] 95iscsi: strip one set of quotes when calling initqueue - -The bad initqueue parameter passing is already addressed by git commit: -commit bb8c16d12178373f17553294603ff5187e318b51 -and -commit 486a8f33e2edaf249e3a09c98a910094e201cf9e - -However this appraoch is slightly different: -"$netroot" instead of "'$netroot'", etc. - -initqueue will process the arguments, assuming the first non-option -argument to be the program to be executed. Putting the entire -commandline into this argument confuses both, initqueue and the -program in question. - -References: bnc#879038 - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - modules.d/95iscsi/parse-iscsiroot.sh | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh -index 85c3027..37e46ad 100755 ---- a/modules.d/95iscsi/parse-iscsiroot.sh -+++ b/modules.d/95iscsi/parse-iscsiroot.sh -@@ -59,10 +59,10 @@ fi - - # iscsi_firmware does not need argument checking - if [ -n "$iscsi_firmware" ] ; then -- netroot=${netroot:-iscsi:} -+ [ -z "$netroot" ] && netroot=iscsi: - modprobe -q iscsi_boot_sysfs 2>/dev/null - modprobe -q iscsi_ibft -- initqueue --onetime --timeout /sbin/iscsiroot dummy "'$netroot'" "'$NEWROOT'" -+ initqueue --onetime --timeout /sbin/iscsiroot dummy "$netroot" "$NEWROOT" - fi - - # If it's not iscsi we don't continue -@@ -86,7 +86,7 @@ fi - - if [ -n "$netroot" ] && [ "$root" != "/dev/root" ] && [ "$root" != "dhcp" ]; then - if ! getargbool 1 rd.neednet >/dev/null || ! getarg "ip="; then -- initqueue --onetime --settled /sbin/iscsiroot dummy "'$netroot'" "'$NEWROOT'" -+ initqueue --onetime --settled /sbin/iscsiroot dummy "$netroot" "$NEWROOT" - fi - fi - diff --git a/0040-95iscsi-Fixup-bnx2i-offload-booting.patch b/0040-95iscsi-Fixup-bnx2i-offload-booting.patch deleted file mode 100644 index 84094cc..0000000 --- a/0040-95iscsi-Fixup-bnx2i-offload-booting.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 2e34f3809524d5a69e06a51e13bb3f41b300b4ed Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:46:01 +0100 -Subject: [PATCH] 95iscsi: Fixup bnx2i offload booting - -bnx2i is using a separate iSCSI offload engine with a separate -MAC address. As a result, the iBFT information is displaying -a MAC address which does not relate to any MAC address from -the network interfaces. -In addition, the iSCSI offload engine works independently on -the NIC, so we do not need to enable the NIC for iSCSI offload -to work. -This patch modifies the automatic iBFT detection to not set -the 'ip=ibft' flag when bnx2i offload is detected. - -References: bnc#855747 - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - modules.d/95iscsi/module-setup.sh | 26 +++++++++++++++++++++++++- - 1 file changed, 25 insertions(+), 1 deletion(-) - -diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh -index 3641fb8..d30e64f 100755 ---- a/modules.d/95iscsi/module-setup.sh -+++ b/modules.d/95iscsi/module-setup.sh -@@ -28,14 +28,38 @@ check() { - return 0 - } - -+get_ibft_mod() { -+ local ibft_mac=$1 -+ # Return the iSCSI offload module for a given MAC address -+ iscsiadm -m iface | while read iface_name iface_desc ; do -+ IFS=$',' -+ set -- $iface_desc -+ if [ "$ibft_mac" = "$2" ] ; then -+ echo $1 -+ return 0 -+ fi -+ unset IFS -+ done -+} -+ - install_ibft() { - # When iBFT / iscsi_boot is detected: - # - Use 'ip=ibft' to set up iBFT network interface -+ # Note: bnx2i is using a different MAC address of iSCSI offloading -+ # so the 'ip=ibft' parameter must not be set - # - specify firmware booting cmdline parameter - - for d in /sys/firmware/* ; do -+ if [ -d ${d}/ethernet0 ] ; then -+ read ibft_mac < ${d}/ethernet0/mac -+ ibft_mod=$(get_ibft_mod $ibft_mac) -+ fi -+ if [ -z "$ibft_mod" ] && [ -d ${d}/ethernet1 ] ; then -+ read ibft_mac < ${d}/ethernet1/mac -+ ibft_mod=$(get_ibft_mod $ibft_mac) -+ fi - if [ -d ${d}/initiator ] ; then -- if [ ${d##*/} = "ibft" ] ; then -+ if [ ${d##*/} = "ibft" ] && [ "$ibft_mod" != "bnx2i" ] ; then - echo -n "ip=ibft " - fi - echo -n "rd.iscsi.firmware=1" diff --git a/0041-95iscsi-More-empty-cmdline-fixes.patch b/0041-95iscsi-More-empty-cmdline-fixes.patch deleted file mode 100644 index 3a455e7..0000000 --- a/0041-95iscsi-More-empty-cmdline-fixes.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 54e28d79b9f67b8be349ae97f92dde2c6c118e11 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:46:02 +0100 -Subject: [PATCH] 95iscsi: More empty cmdline fixes - -This fixes up some 95iscsi/module-setup.sh which might print out empty -commandline files. - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - modules.d/95iscsi/module-setup.sh | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - -diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh -index d30e64f..29bba82 100755 ---- a/modules.d/95iscsi/module-setup.sh -+++ b/modules.d/95iscsi/module-setup.sh -@@ -76,12 +76,6 @@ depends() { - installkernel() { - local _arch=$(uname -m) - -- # Detect iBFT and perform mandatory steps -- if [[ $hostonly_cmdline == "yes" ]] ; then -- install_ibft > "${initdir}/etc/cmdline.d/95iscsi.conf" -- echo >> "${initdir}/etc/cmdline.d/95iscsi.conf" -- fi -- - instmods bnx2i qla4xxx cxgb3i cxgb4i be2iscsi - hostonly="" instmods iscsi_tcp iscsi_ibft crc32c iscsi_boot_sysfs - iscsi_module_filter() { -@@ -131,6 +125,13 @@ install() { - inst_multiple umount iscsistart hostname iscsi-iname - inst_multiple -o iscsiuio - inst_libdir_file 'libgcc_s.so*' -+ -+ # Detect iBFT and perform mandatory steps -+ if [[ $hostonly_cmdline == "yes" ]] ; then -+ local _ibftconf=$(install_ibft) -+ [[ $_ibftconf ]] && printf "%s\n" "$_ibftconf" >> "${initdir}/etc/cmdline.d/95iscsi.conf" -+ fi -+ - inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh" - inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh" - inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot" diff --git a/0042-95iscsi-generate-commandline-for-software-iscsi.patch b/0042-95iscsi-generate-commandline-for-software-iscsi.patch deleted file mode 100644 index 647268a..0000000 --- a/0042-95iscsi-generate-commandline-for-software-iscsi.patch +++ /dev/null @@ -1,142 +0,0 @@ -From c4d8793c67cb75804dfb8b14985e125a22f212eb Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:46:03 +0100 -Subject: [PATCH] 95iscsi: generate commandline for software iscsi - -When installing on an software iscsi root we need to generate -the correct commandline, otherwise the system cannot boot. - -References: bnc#880108 -Patch: 0093 - -When using software iscsi we should be using the existing -configuration from the system for the time being. - -References: bnc#884768 -Patch: 0095 - -Avoid bad ip route call on empty address -Patch: 0143 - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - modules.d/95iscsi/module-setup.sh | 91 +++++++++++++++++++++++++++++++++++++-- - 1 file changed, 88 insertions(+), 3 deletions(-) - -diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh -index 29bba82..cd6cb4b 100755 ---- a/modules.d/95iscsi/module-setup.sh -+++ b/modules.d/95iscsi/module-setup.sh -@@ -67,6 +67,84 @@ install_ibft() { - done - } - -+install_iscsiroot() { -+ local devpath=$1 -+ local scsi_path iscsi_lun session c d conn -+ local iscsi_session iscsi_address iscsi_port iscsi_targetname iscsi_tpgt -+ -+ scsi_path=${devpath%%/block*} -+ [ "$scsi_path" = "$devpath" ] && return 1 -+ iscsi_lun=${scsi_path##*:} -+ [ "$iscsi_lun" = "$scsi_path" ] && return 1 -+ session=${devpath%%/target*} -+ [ "$session" = "$devpath" ] && return 1 -+ iscsi_session=${session##*/} -+ [ "$iscsi_session" = "$session" ] && return 1 -+ -+ for d in ${session}/* ; do -+ case $d in -+ *connection*) -+ c=${d##*/} -+ conn=${d}/iscsi_connection/${c} -+ if [ -d ${conn} ] ; then -+ iscsi_address=$(cat ${conn}/persistent_address) -+ iscsi_port=$(cat ${conn}/persistent_port) -+ fi -+ ;; -+ *session) -+ if [ -d ${d}/${iscsi_session} ] ; then -+ iscsi_initiator=$(cat ${d}/${iscsi_session}/initiatorname) -+ iscsi_targetname=$(cat ${d}/${iscsi_session}/targetname) -+ fi -+ ;; -+ esac -+ done -+ -+ [ -z "$iscsi_address" ] && return -+ local_address=$(ip -o route get to $iscsi_address | sed -n 's/.*src \([0-9a-f.:]*\).*/\1/p') -+ ifname=$(ip -o route get to $iscsi_address | sed -n 's/.*dev \([^ ]*\).*/\1/p') -+ printf 'ip=%s:static ' ${ifname} -+ -+ if [ -e /sys/class/net/$ifname/address ] ; then -+ ifmac=$(cat /sys/class/net/$ifname/address) -+ printf 'ifname=%s:%s ' ${ifname} ${ifmac} -+ fi -+ -+ if [ -n "$iscsi_address" -a -n "$iscsi_targetname" ] ; then -+ if [ -n "$iscsi_port" -a "$iscsi_port" -eq 3260 ] ; then -+ iscsi_port= -+ fi -+ if [ -n "$iscsi_lun" -a "$iscsi_lun" -eq 0 ] ; then -+ iscsi_lun= -+ fi -+ # In IPv6 case rd.iscsi.initatior= must pass address in [] brackets -+ case "$iscsi_address" in -+ *:*) -+ iscsi_address="[$iscsi_address]" -+ ;; -+ esac -+ echo "rd.iscsi.initiator=${iscsi_initiator} netroot=iscsi:${iscsi_address}::${iscsi_port}:${iscsi_lun}:${iscsi_targetname}" -+ fi -+ return 0 -+} -+ -+ -+install_softiscsi() { -+ [ -d /sys/firmware/ibft ] && return 0 -+ -+ is_softiscsi() { -+ local _dev=$1 -+ local iscsi_dev -+ -+ [[ -L "/sys/dev/block/$_dev" ]] || return -+ iscsi_dev=$(cd -P /sys/dev/block/$_dev; echo $PWD) -+ install_iscsiroot $iscsi_dev -+ } -+ -+ for_each_host_dev_and_slaves_all is_softiscsi || return 255 -+ return 0 -+} -+ - # called by dracut - depends() { - echo network rootfs-block -@@ -117,7 +195,14 @@ installkernel() { - - # called by dracut - cmdline() { -- install_ibft -+ local _iscsiconf=$(install_ibft) -+ { -+ if [ "$_iscsiconf" ] ; then -+ echo ${_iscsiconf} -+ else -+ install_softiscsi -+ fi -+ } | sort | uniq - } - - # called by dracut -@@ -128,8 +213,8 @@ install() { - - # Detect iBFT and perform mandatory steps - if [[ $hostonly_cmdline == "yes" ]] ; then -- local _ibftconf=$(install_ibft) -- [[ $_ibftconf ]] && printf "%s\n" "$_ibftconf" >> "${initdir}/etc/cmdline.d/95iscsi.conf" -+ local _iscsiconf=$(cmdline) -+ [[ $_iscsiconf ]] && printf "%s\n" "$_iscsiconf" >> "${initdir}/etc/cmdline.d/95iscsi.conf" - fi - - inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh" diff --git a/0043-iscsi-iscsi.initiator-and-others-can-and-must-only-s.patch b/0043-iscsi-iscsi.initiator-and-others-can-and-must-only-s.patch deleted file mode 100644 index 8d5593d..0000000 --- a/0043-iscsi-iscsi.initiator-and-others-can-and-must-only-s.patch +++ /dev/null @@ -1,70 +0,0 @@ -From f34a2ef14df05affa3347d7191ff324bcb547e79 Mon Sep 17 00:00:00 2001 -From: Thomas Renninger -Date: Thu, 11 Dec 2014 15:46:04 +0100 -Subject: [PATCH] iscsi: iscsi.initiator and others can and must only show up - once - -Make sure duplicates of iscsi.initiator vanish. -Only get one rd.iscsi.* paramter value. If getargs is used and several -parameters are parsed, one gets two values separated by whitespace in a -variable which breaks later code and is not suppported. - -Signed-off-by: Thomas Renninger ---- - modules.d/95iscsi/iscsiroot.sh | 18 +++++++++--------- - modules.d/95iscsi/module-setup.sh | 5 ++++- - 2 files changed, 13 insertions(+), 10 deletions(-) - -diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh -index 7351427..5bfb017 100755 ---- a/modules.d/95iscsi/iscsiroot.sh -+++ b/modules.d/95iscsi/iscsiroot.sh -@@ -81,23 +81,23 @@ handle_netroot() - local p - - # override conf settings by command line options -- arg=$(getargs rd.iscsi.initiator -d iscsi_initiator=) -+ arg=$(getarg rd.iscsi.initiator -d iscsi_initiator=) - [ -n "$arg" ] && iscsi_initiator=$arg -- arg=$(getargs rd.iscsi.target.name -d iscsi_target_name=) -+ arg=$(getarg rd.iscsi.target.name -d iscsi_target_name=) - [ -n "$arg" ] && iscsi_target_name=$arg -- arg=$(getargs rd.iscsi.target.ip -d iscsi_target_ip) -+ arg=$(getarg rd.iscsi.target.ip -d iscsi_target_ip) - [ -n "$arg" ] && iscsi_target_ip=$arg -- arg=$(getargs rd.iscsi.target.port -d iscsi_target_port=) -+ arg=$(getarg rd.iscsi.target.port -d iscsi_target_port=) - [ -n "$arg" ] && iscsi_target_port=$arg -- arg=$(getargs rd.iscsi.target.group -d iscsi_target_group=) -+ arg=$(getarg rd.iscsi.target.group -d iscsi_target_group=) - [ -n "$arg" ] && iscsi_target_group=$arg -- arg=$(getargs rd.iscsi.username -d iscsi_username=) -+ arg=$(getarg rd.iscsi.username -d iscsi_username=) - [ -n "$arg" ] && iscsi_username=$arg -- arg=$(getargs rd.iscsi.password -d iscsi_password) -+ arg=$(getarg rd.iscsi.password -d iscsi_password) - [ -n "$arg" ] && iscsi_password=$arg -- arg=$(getargs rd.iscsi.in.username -d iscsi_in_username=) -+ arg=$(getarg rd.iscsi.in.username -d iscsi_in_username=) - [ -n "$arg" ] && iscsi_in_username=$arg -- arg=$(getargs rd.iscsi.in.password -d iscsi_in_password=) -+ arg=$(getarg rd.iscsi.in.password -d iscsi_in_password=) - [ -n "$arg" ] && iscsi_in_password=$arg - for p in $(getargs rd.iscsi.param -d iscsi_param); do - iscsi_param="$iscsi_param --param $p" -diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh -index cd6cb4b..9975e59 100755 ---- a/modules.d/95iscsi/module-setup.sh -+++ b/modules.d/95iscsi/module-setup.sh -@@ -123,7 +123,10 @@ install_iscsiroot() { - iscsi_address="[$iscsi_address]" - ;; - esac -- echo "rd.iscsi.initiator=${iscsi_initiator} netroot=iscsi:${iscsi_address}::${iscsi_port}:${iscsi_lun}:${iscsi_targetname}" -+ # Must be two separate lines, so that "sort | uniq" commands later -+ # can sort out rd.iscsi.initiator= duplicates -+ echo "rd.iscsi.initiator=${iscsi_initiator}" -+ echo "netroot=iscsi:${iscsi_address}::${iscsi_port}:${iscsi_lun}:${iscsi_targetname}" - fi - return 0 - } diff --git a/0044-Implement-rd.timeout-to-modify-the-device-timeout.patch b/0044-Implement-rd.timeout-to-modify-the-device-timeout.patch deleted file mode 100644 index a8df6c6..0000000 --- a/0044-Implement-rd.timeout-to-modify-the-device-timeout.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 56663e7e322cdba5d66cb45424489fd84791a544 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:46:05 +0100 -Subject: [PATCH] Implement 'rd.timeout' to modify the device timeout - -When generating units for devices the administrator might -want to use a different timeout than the default. -So implement a new parameter 'rd.timeout' for this. - -References: bnc#878770 - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - dracut.cmdline.7.asc | 7 ++++++- - modules.d/98systemd/rootfs-generator.sh | 7 +++++-- - modules.d/99base/dracut-lib.sh | 6 +++++- - 3 files changed, 16 insertions(+), 4 deletions(-) - -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index 8e4835d..5ff84ef 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -142,11 +142,16 @@ Misc - have been loaded. This parameter can be specified multiple times. - - **rd.retry=**____:: -- specify how long dracut should wait for devices to appear. -+ specify how long dracut should retry the initqueue to configure devices. - The default is 30 seconds. After 2/3 of the time, degraded raids are force - started. If you have hardware, which takes a very long time to announce its - drives, you might want to extend this value. - -+**rd.timeout=**____:: -+ specify how long dracut should wait for devices to appear. The -+ default is '0', which means 'forever'. Note that this timeout -+ should be longer than rd.retry to allow for proper configuration. -+ - **rd.noverifyssl**:: - accept self-signed certificates for ssl downloads. - -diff --git a/modules.d/98systemd/rootfs-generator.sh b/modules.d/98systemd/rootfs-generator.sh -index 9523729..5b06137 100755 ---- a/modules.d/98systemd/rootfs-generator.sh -+++ b/modules.d/98systemd/rootfs-generator.sh -@@ -5,8 +5,11 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh - generator_wait_for_dev() - { - local _name -+ local _timeout - - _name="$(str_replace "$1" '/' '\x2f')" -+ _timeout=$(getarg rd.timeout) -+ _timeout=${_timeout:-0} - - [ -e "$hookdir/initqueue/finished/devexists-${_name}.sh" ] && return 0 - -@@ -27,7 +30,7 @@ generator_wait_for_dev() - mkdir -p /run/systemd/generator/${_name}.device.d - { - echo "[Unit]" -- echo "JobTimeoutSec=0" -+ echo "JobTimeoutSec=$_timeout" - } > /run/systemd/generator/${_name}.device.d/timeout.conf - fi - } -@@ -58,6 +61,6 @@ case "$root" in - rootok=1 ;; - esac - --[ "${root%%:*}" = "block" ] && generator_wait_for_dev "${root#block:}" -+[ "${root%%:*}" = "block" ] && generator_wait_for_dev "${root#block:}" "$RDRETRY" - - exit 0 -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index 5fc5615..f7cffc4 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -890,12 +890,16 @@ wait_for_dev() - local _name - local _needreload - local _noreload -+ local _timeout - - if [ "$1" = "-n" ]; then - _noreload=1 - shift - fi - -+ _timeout=$(getarg rd.timeout) -+ _timeout=${_timeout:-0} -+ - _name="$(str_replace "$1" '/' '\x2f')" - - type mark_hostonly >/dev/null 2>&1 && mark_hostonly "$hookdir/initqueue/finished/devexists-${_name}.sh" -@@ -922,7 +926,7 @@ wait_for_dev() - mkdir -p ${PREFIX}/etc/systemd/system/${_name}.device.d - { - echo "[Unit]" -- echo "JobTimeoutSec=0" -+ echo "JobTimeoutSec=$_timeout" - } > ${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf - type mark_hostonly >/dev/null 2>&1 && mark_hostonly /etc/systemd/system/${_name}.device.d/timeout.conf - _needreload=1 diff --git a/0045-Do-not-call-lvm-for-non-LVM-device-mapper-devices.patch b/0045-Do-not-call-lvm-for-non-LVM-device-mapper-devices.patch deleted file mode 100644 index 5482757..0000000 --- a/0045-Do-not-call-lvm-for-non-LVM-device-mapper-devices.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 3244bf59816096377edee6f8937f16838dc1a709 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:46:06 +0100 -Subject: [PATCH] Do not call 'lvm' for non-LVM device-mapper devices - -If a device-mapper device is not created by LVM it's pointless -to call any 'lvm' programs got extract details; they'll be -failing anyway. So check the UUID before calling 'lvm'. -This speeds up initrd creation and avoids I/O errors on -multipath devices. - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - dracut-functions.sh | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index 17a71f0..edd8ea9 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -698,10 +698,12 @@ for_each_host_dev_and_slaves() - # but you cannot create the logical volume without the volume group. - # And the volume group might be bigger than the devices the LV needs. - check_vol_slaves() { -- local _lv _vg _pv -+ local _lv _vg _pv _dm - for i in /dev/mapper/*; do - [[ $i == /dev/mapper/control ]] && continue - _lv=$(get_maj_min $i) -+ _dm=/sys/dev/block/$_lv/dm -+ [[ -f $_dm/uuid && $(<$_dm/uuid) =~ LVM-* ]] || continue - if [[ $_lv = $2 ]]; then - _vg=$(lvm lvs --noheadings -o vg_name $i 2>/dev/null) - # strip space diff --git a/0046-Print-stored-dracut-commandline-during-initramfs-bui.patch b/0046-Print-stored-dracut-commandline-during-initramfs-bui.patch deleted file mode 100644 index a8a49dd..0000000 --- a/0046-Print-stored-dracut-commandline-during-initramfs-bui.patch +++ /dev/null @@ -1,36 +0,0 @@ -From fe273e3901f0931c3cc1365177f82f03b6560d30 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:46:07 +0100 -Subject: [PATCH] Print stored dracut commandline during initramfs build - -When generating the initramfs we should be printing out the -generated dracut commandline used for booting. -This will simplify debugging. - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - dracut.sh | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/dracut.sh b/dracut.sh -index a542f33..cda7955 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1584,6 +1584,16 @@ if ! ( echo $PARMS_TO_STORE > $initdir/lib/dracut/build-parameter.txt ); then - exit 1 - fi - -+if [[ $hostonly_cmdline ]] ; then -+ if [ -d $initdir/etc/cmdline.d ];then -+ dinfo "Stored kernel commandline:" -+ for conf in $initdir/etc/cmdline.d/*.conf ; do -+ dinfo "$(< $conf)" -+ done -+ else -+ dinfo "No dracut internal kernel commandline stored in initrd" -+ fi -+fi - rm -f -- "$outfile" - dinfo "*** Creating image file ***" - diff --git a/0047-Align-dev_unit_name-with-systemd-s-function.patch b/0047-Align-dev_unit_name-with-systemd-s-function.patch deleted file mode 100644 index 08c7ebc..0000000 --- a/0047-Align-dev_unit_name-with-systemd-s-function.patch +++ /dev/null @@ -1,55 +0,0 @@ -From e3eec4b8a21a640b7557678b92716a32f8d3dadf Mon Sep 17 00:00:00 2001 -From: Thorsten Behrens -Date: Thu, 11 Dec 2014 15:46:08 +0100 -Subject: [PATCH] Align dev_unit_name() with systemd's function. - -Add more corner cases from systemd's -unit_name_from_path_instance() C function. - -Signed-off-by: Thorsten Behrens -Signed-off-by: Thomas Renninger ---- - modules.d/99base/dracut-lib.sh | 24 ++++++++++++++++++------ - 1 file changed, 18 insertions(+), 6 deletions(-) - -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index f7cffc4..5c1504f 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -866,18 +866,30 @@ wait_for_mount() - } >> "$hookdir/emergency/90-${_name}.sh" - } - -+# get a systemd-compatible unit name from a path -+# (mimicks unit_name_from_path_instance()) - dev_unit_name() - { -+ local dev="$1" -+ - if command -v systemd-escape >/dev/null; then -- systemd-escape -p "$1" -+ systemd-escape -p "$dev" - return - fi - -- _name="${1%%/}" -- _name="${_name##/}" -- _name="$(str_replace "$_name" '-' '\x2d')" -- _name="$(str_replace "$_name" '/' '-')" -- echo "$_name" -+ if [ "$dev" = "/" -o -z "$dev" ]; then -+ printf -- "-" -+ exit 0 -+ fi -+ -+ dev="${1%%/}" -+ dev="${dev##/}" -+ dev="$(str_replace "$dev" '\' '\x5c')" -+ dev="$(str_replace "$dev" '-' '\x2d')" -+ dev=${dev/#\./\\x2e} -+ dev="$(str_replace "$dev" '/' '-')" -+ -+ printf -- "%s" "$dev" - } - - # wait_for_dev diff --git a/0048-Generate-fallback-mount-unit-for-root-filesystem.patch b/0048-Generate-fallback-mount-unit-for-root-filesystem.patch deleted file mode 100644 index a3139f1..0000000 --- a/0048-Generate-fallback-mount-unit-for-root-filesystem.patch +++ /dev/null @@ -1,68 +0,0 @@ -From bd44831b825da5bf38f883344c3e25844bee4df7 Mon Sep 17 00:00:00 2001 -From: Thorsten Behrens -Date: Thu, 11 Dec 2014 15:46:09 +0100 -Subject: [PATCH] Generate fallback mount unit for root filesystem - -If kernel cmdline has no root= provided, *and* the initrd carries -a default value, create a systemd mount unit to have it available -in /sysroot - -References: bnc#855258 - -Signed-off-by: Thorsten Behrens -Signed-off-by: Thomas Renninger ---- - modules.d/98systemd/rootfs-generator.sh | 34 ++++++++++++++++++++++++++++++++- - 1 file changed, 33 insertions(+), 1 deletion(-) - -diff --git a/modules.d/98systemd/rootfs-generator.sh b/modules.d/98systemd/rootfs-generator.sh -index 5b06137..f3c7d1f 100755 ---- a/modules.d/98systemd/rootfs-generator.sh -+++ b/modules.d/98systemd/rootfs-generator.sh -@@ -35,6 +35,35 @@ generator_wait_for_dev() - fi - } - -+generator_mount_rootfs() -+{ -+ local _type=$2 -+ local _flags=$3 -+ local _name -+ -+ [ -z "$1" ] && return 0 -+ -+ _name=$(dev_unit_name "$1") -+ [ -d /run/systemd/generator ] || mkdir -p /run/systemd/generator -+ if ! [ -f /run/systemd/generator/sysroot.mount ]; then -+ { -+ echo "[Unit]" -+ echo "Before=initrd-root-fs.target" -+ echo "RequiresOverridable=systemd-fsck@${_name}.service" -+ echo "After=systemd-fsck@${_name}.service" -+ echo "[Mount]" -+ echo "Where=/sysroot" -+ echo "What=$1" -+ echo "Options=${_flags}" -+ echo "Type=${_type}" -+ } > /run/systemd/generator/sysroot.mount -+ fi -+ if ! [ -L /run/systemd/generator/initrd-root-fs.target.requires/sysroot.mount ]; then -+ [ -d /run/systemd/generator/initrd-root-fs.target.requires ] || mkdir -p /run/systemd/generator/initrd-root-fs.target.requires -+ ln -s ../sysroot.mount /run/systemd/generator/initrd-root-fs.target.requires/sysroot.mount -+ fi -+} -+ - root=$(getarg root=) - case "$root" in - block:LABEL=*|LABEL=*) -@@ -61,6 +90,9 @@ case "$root" in - rootok=1 ;; - esac - --[ "${root%%:*}" = "block" ] && generator_wait_for_dev "${root#block:}" "$RDRETRY" -+if [ "${root%%:*}" = "block" ]; then -+ generator_wait_for_dev "${root#block:}" "$RDRETRY" -+ grep -q 'root=' /proc/cmdline || generator_mount_rootfs "${root#block:}" "$(getarg rootfstype=)" "$(getarg rootflags=)" -+fi - - exit 0 diff --git a/0049-99base-warn-on-invalid-command-for-initqueue.patch b/0049-99base-warn-on-invalid-command-for-initqueue.patch deleted file mode 100644 index e7a47bc..0000000 --- a/0049-99base-warn-on-invalid-command-for-initqueue.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 7c2311660f3f540c2ad9471bcc13686899d677cd Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:46:10 +0100 -Subject: [PATCH] 99base: warn on invalid command for initqueue - -When 'initqueue' is called with an invalid command it'll generate -invalid job scripts. This will lead to confusing error messages -later on. -So abort in these cases and print out a warning. - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - modules.d/99base/initqueue.sh | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/modules.d/99base/initqueue.sh b/modules.d/99base/initqueue.sh -index 4a07da3..193cc5c 100755 ---- a/modules.d/99base/initqueue.sh -+++ b/modules.d/99base/initqueue.sh -@@ -42,6 +42,10 @@ exe=$1 - shift - - [ -x "$exe" ] || exe=$(command -v $exe) -+if [ -z "$exe" ] ; then -+ echo "Invalid command" -+ exit 1 -+fi - - { - [ -n "$onetime" ] && echo '[ -e "$job" ] && rm -f -- "$job"' diff --git a/0050-Handle-module-alias-properly.patch b/0050-Handle-module-alias-properly.patch deleted file mode 100644 index ab306d1..0000000 --- a/0050-Handle-module-alias-properly.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 3ae60e559f049ba41d5d198f27509721a245d6ea Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:46:11 +0100 -Subject: [PATCH] Handle module alias properly - -Some modules (like ext4) provide aliases by which the modules -can be accessed, too. But when using aliases directly dracut -fails to include the correct module. So translate the alias -into the correct module name before checking the module. - -References: bnc#886839 - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - dracut-functions.sh | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index edd8ea9..7a12a76 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -1689,6 +1689,13 @@ instmods() { - --*) _mpargs+=" $_mod" ;; - *) - _mod=${_mod##*/} -+ # Check for aliased modules -+ _modalias=$(modinfo -k $kernel -F filename $_mod 2> /dev/null) -+ _modalias=${_modalias%.ko} -+ if [ "${_modalias##*/}" != "$_mod" ] ; then -+ _mod=${_modalias##*/} -+ fi -+ - # if we are already installed, skip this module and go on - # to the next one. - if [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && \ diff --git a/0051-99base-Increase-initqueue-timeout-in-non-systemd-cas.patch b/0051-99base-Increase-initqueue-timeout-in-non-systemd-cas.patch deleted file mode 100644 index 4397b30..0000000 --- a/0051-99base-Increase-initqueue-timeout-in-non-systemd-cas.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 517d27a75f678d4c295cbb07687453950b55df5a Mon Sep 17 00:00:00 2001 -From: Thomas Renninger -Date: Thu, 11 Dec 2014 15:46:12 +0100 -Subject: [PATCH] 99base: Increase initqueue timeout in non systemd case - -In case of systemd is used the timeout already is set to 180s, compare -with file: modules.d/98systemd/dracut-initqueue.sh - -Do the same if systemd is not used, e.g. in kdump case. - -Signed-off-by: Thomas Renninger ---- - modules.d/99base/init.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh -index 7fcea4a..918dea5 100755 ---- a/modules.d/99base/init.sh -+++ b/modules.d/99base/init.sh -@@ -166,7 +166,7 @@ make_trace_mem "hook initqueue" '1:shortmem' '2+:mem' '3+:slab' - getarg 'rd.break=initqueue' -d 'rdbreak=initqueue' && emergency_shell -n initqueue "Break before initqueue" - - RDRETRY=$(getarg rd.retry -d 'rd_retry=') --RDRETRY=${RDRETRY:-30} -+RDRETRY=${RDRETRY:-180} - RDRETRY=$(($RDRETRY*2)) - export RDRETRY - main_loop=0 diff --git a/0052-90lvm-Install-dm-snapshot-module.patch b/0052-90lvm-Install-dm-snapshot-module.patch deleted file mode 100644 index a9cb20e..0000000 --- a/0052-90lvm-Install-dm-snapshot-module.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 5c84d51b3f258af9035a4031c6b482103adea4d9 Mon Sep 17 00:00:00 2001 -From: Thomas Renninger -Date: Thu, 11 Dec 2014 15:46:13 +0100 -Subject: [PATCH] 90lvm: Install dm-snapshot module - -bnc#888530 - -Signed-off-by: Thomas Renninger ---- - modules.d/90lvm/module-setup.sh | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh -index 9ddc56e..5515ac0 100755 ---- a/modules.d/90lvm/module-setup.sh -+++ b/modules.d/90lvm/module-setup.sh -@@ -42,6 +42,10 @@ cmdline() { - done - } - -+installkernel() { -+ instmods dm-snapshot -+} -+ - # called by dracut - install() { - local _i diff --git a/0053-Check-for-logfile-logfile-option-and-create-it-if-ne.patch b/0053-Check-for-logfile-logfile-option-and-create-it-if-ne.patch deleted file mode 100644 index 21d57f6..0000000 --- a/0053-Check-for-logfile-logfile-option-and-create-it-if-ne.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 3838dc47c3f15128f171bfbd0eaf2e3e8641e4e8 Mon Sep 17 00:00:00 2001 -From: jloeser -Date: Thu, 11 Dec 2014 15:46:14 +0100 -Subject: [PATCH] Check for logfile (--logfile option) and create it if - necessary - -If a logfile is passed to dracut via --logfile option and doesn't -exist, dracut doesn't create it and logs nothing. Instead, dracut -should try to touch the file and print a warning if creating fails. - -References: bnc#892191 -Signed-off-by: Thomas Renninger ---- - dracut.sh | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/dracut.sh b/dracut.sh -index cda7955..79f36b6 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -816,6 +816,16 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) - # eliminate IFS hackery when messing with fw_dir - fw_dir=${fw_dir//:/ } - -+# check for logfile and try to create one if it doesn't exist -+if [[ -n "$logfile" ]];then -+ if [[ ! -f "$logfile" ]];then -+ touch "$logfile" -+ if [ ! $? -eq 0 ] ;then -+ printf "%s\n" "dracut: touch $logfile failed." >&2 -+ fi -+ fi -+fi -+ - # handle compression options. - [[ $compress ]] || compress="gzip" - case $compress in diff --git a/0054-dracut.sh-Avoid-duplicate-devices-in-host_devs.patch b/0054-dracut.sh-Avoid-duplicate-devices-in-host_devs.patch deleted file mode 100644 index 8304a68..0000000 --- a/0054-dracut.sh-Avoid-duplicate-devices-in-host_devs.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 118ca9ecfcc8cec0a428352355592717d0a44109 Mon Sep 17 00:00:00 2001 -From: Thomas Renninger -Date: Thu, 11 Dec 2014 15:46:15 +0100 -Subject: [PATCH] dracut.sh: Avoid duplicate devices in host_devs - -Signed-off-by: Thomas Renninger ---- - dracut.sh | 26 ++++++++++++++++++-------- - 1 file changed, 18 insertions(+), 8 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index 79f36b6..a4c7ce5 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -219,6 +219,16 @@ push() { - done - } - -+# Fills up host_devs stack variable and makes sure there are no duplicates -+push_host_devs() { -+ local _dev -+ for _dev in ${host_devs[@]}; do -+ [ "$_dev" = "$1" ] && return -+ done -+ push host_devs "$1" -+} -+ -+ - # function pop() - # pops the last value from a stack - # assigns value to second argument variable -@@ -1062,25 +1072,25 @@ declare -A host_fs_types - for line in "${fstab_lines[@]}"; do - set -- $line - #dev mp fs fsopts -- push host_devs "$1" -+ push_host_devs "$1" - host_fs_types["$1"]="$3" - done - - for f in $add_fstab; do - [[ -e $f ]] || continue - while read dev rest; do -- push host_devs "$dev" -+ push_host_devs "$dev" - done < "$f" - done - - for dev in $add_device; do -- push host_devs "$dev" -+ push_host_devs "$dev" - done - - if (( ${#add_device_l[@]} )); then - while pop add_device_l val; do - add_device+=" $val " -- push host_devs "$val" -+ push_host_devs "$val" - done - fi - -@@ -1109,9 +1119,9 @@ if [[ $hostonly ]]; then - _dev=$(find_block_device "$mp") - _bdev=$(readlink -f "/dev/block/$_dev") - [[ -b $_bdev ]] && _dev=$_bdev -- push host_devs $_dev -+ push_host_devs $_dev - [[ "$mp" == "/" ]] && root_dev="$_dev" -- push host_devs "$_dev" -+ push_host_devs "$_dev" - done - - if [[ -f /proc/swaps ]] && [[ -f /etc/fstab ]]; then -@@ -1140,7 +1150,7 @@ if [[ $hostonly ]]; then - done < /etc/crypttab - fi - -- push host_devs "$(readlink -f "$dev")" -+ push_host_devs "$(readlink -f "$dev")" - break - done < /etc/fstab - done < /proc/swaps -@@ -1205,7 +1215,7 @@ for dev in "${!host_fs_types[@]}"; do - fi - if [[ $journaldev ]]; then - dev="$(readlink -f "$dev")" -- push host_devs "$dev" -+ push_host_devs "$dev" - _get_fs_type "$dev" - check_block_and_slaves_all _get_fs_type "$(get_maj_min "$dev")" - fi diff --git a/0055-dracut.sh-Fix-UUID-fstab-parsing-in-case-mount-optio.patch b/0055-dracut.sh-Fix-UUID-fstab-parsing-in-case-mount-optio.patch deleted file mode 100644 index 0c758c3..0000000 --- a/0055-dracut.sh-Fix-UUID-fstab-parsing-in-case-mount-optio.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 6df523517f364882c51bbcc5b3245dd568eca3b3 Mon Sep 17 00:00:00 2001 -From: Thomas Renninger -Date: Thu, 11 Dec 2014 15:46:16 +0100 -Subject: [PATCH] dracut.sh: Fix UUID= fstab parsing in case --mount option is - passed - -Dracut parses /etc/fstab when --mount is option is passed (e.g. kdump). - -In host_devs variable the real block device must be stored, not UUID= -There are other /etc/fstab syntax possibilities we now warn that they -are not correctly parsed. This will be fixed by another patch -when there is time to test this properly. - -Signed-off-by: Thomas Renninger ---- - dracut.sh | 20 ++++++++++++++++++-- - 1 file changed, 18 insertions(+), 2 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index a4c7ce5..2eba19b 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1071,9 +1071,25 @@ declare -A host_fs_types - - for line in "${fstab_lines[@]}"; do - set -- $line -+ dev="$1" - #dev mp fs fsopts -- push_host_devs "$1" -- host_fs_types["$1"]="$3" -+ case "$dev" in -+ UUID=*) -+ dev=$(blkid -l -t UUID=${dev#UUID=} -o device) -+ ;; -+ LABEL=*) -+ dev=$(blkid -l -t LABEL=${dev#LABEL=} -o device) -+ ;; -+ PARTUUID=*) -+ dev=$(blkid -l -t PARTUUID=${dev#PARTUUID=} -o device) -+ ;; -+ PARTLABEL=*) -+ dev=$(blkid -l -t PARTLABEL=${dev#PARTLABEL=} -o device) -+ ;; -+ esac -+ [ -z "$dev" ] && dwarn "Bad fstab entry $@" && continue -+ push_host_devs "$dev" -+ host_fs_types["$dev"]="$3" - done - - for f in $add_fstab; do diff --git a/0056-dracut.usage.asc-Remove-distro-specific-help-from-ma.patch b/0056-dracut.usage.asc-Remove-distro-specific-help-from-ma.patch deleted file mode 100644 index 366c771..0000000 --- a/0056-dracut.usage.asc-Remove-distro-specific-help-from-ma.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 4d25892179e4eff9fc4bd2a2ab45a91c5a372fc2 Mon Sep 17 00:00:00 2001 -From: Thomas Renninger -Date: Thu, 11 Dec 2014 15:46:17 +0100 -Subject: [PATCH] dracut.usage.asc: Remove distro specific help from manpage - -Signed-off-by: Thomas Renninger ---- - dracut.usage.asc | 19 +------------------ - 1 file changed, 1 insertion(+), 18 deletions(-) - -diff --git a/dracut.usage.asc b/dracut.usage.asc -index 9e788c1..b4a8663 100644 ---- a/dracut.usage.asc -+++ b/dracut.usage.asc -@@ -246,23 +246,6 @@ specified multiple times. - If your root partition is on a network drive, you have to have the network - dracut modules installed to create a network aware initramfs image. - --On a Red Hat Enterprise Linux or Fedora system, this means, you have to install --the _dracut-network_ rpm package: -- -- ------ --# yum install dracut-network ------ -- --The resulting initramfs image can be served by a boot manager residing on your --local hard drive or it can be served by a PXE/TFTP server. -- --How to setup your PXE/TFTP server can be found in the --http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/[Red --Hat Enterprise Linux 6 Storage Administration Guide] --or http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/[Red --Hat Enterprise Linux 7 Storage Administration Guide]. -- - If you specify ip=dhcp on the kernel command line, then dracut asks a dhcp - server about the ip adress for the machine. The dhcp server can also serve an - additional root-path, which will set the root device for dracut. With this -@@ -302,7 +285,7 @@ This will reduce the size of the initramfs image significantly. - If the boot process does not succeed, you have several options to debug the - situation. Some of the basic operations are covered here. For more information - you should also visit: --http://fedoraproject.org/wiki/How_to_debug_Dracut_problems -+https://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html - - - [[identifying-your-problem-area]] diff --git a/0057-nfs-Add-ip-.-and-root-nfs.-parameters-to-internal-dr.patch b/0057-nfs-Add-ip-.-and-root-nfs.-parameters-to-internal-dr.patch deleted file mode 100644 index d62e9a9..0000000 --- a/0057-nfs-Add-ip-.-and-root-nfs.-parameters-to-internal-dr.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 206345ce9b5eda660d82ce552620edc12db4b2e3 Mon Sep 17 00:00:00 2001 -From: Thomas Renninger -Date: Thu, 11 Dec 2014 15:46:18 +0100 -Subject: [PATCH] nfs: Add ip=... and root=nfs... parameters to internal dracut - - cmdline - -If the rootfs is an nfs mount, also know as nfsroot, add the correct -parameter to the dracut cmdline. - -Signed-off-by: Thomas Renninger ---- - modules.d/95nfs/module-setup.sh | 44 +++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 42 insertions(+), 2 deletions(-) - -diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh -index e1340b3..8eb542c 100755 ---- a/modules.d/95nfs/module-setup.sh -+++ b/modules.d/95nfs/module-setup.sh -@@ -14,7 +14,6 @@ check() { - done - return 255 - } -- - return 0 - } - -@@ -29,6 +28,43 @@ installkernel() { - instmods nfs sunrpc ipv6 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files - } - -+cmdline() { -+ local nfs_device -+ local nfs_options -+ local nfs_root -+ local nfs_address -+ local lookup -+ local ifname -+ -+ ### nfsroot= ### -+ nfs_device=$(findmnt -t nfs4 -n -o SOURCE /) -+ if [ -n "$nfs_device" ];then -+ nfs_root="root=nfs4:$nfs_device" -+ else -+ nfs_device=$(findmnt -t nfs -n -o SOURCE /) -+ [ -z "$nfs_device" ] && return -+ nfs_root="root=nfs:$nfs_device" -+ fi -+ nfs_options=$(findmnt -t nfs4,nfs -n -o OPTIONS /) -+ [ -n "$nfs_options" ] && nfs_root="$nfs_root:$nfs_options" -+ echo "$nfs_root" -+ -+ ### ip= ### -+ if [[ $nfs_device = [0-9]*\.[0-9]*\.[0-9]*.[0-9]* ]] || [[ $nfs_device = \[.*\] ]]; then -+ nfs_address="$nfs_device" -+ else -+ lookup=$(host $(echo ${nfs_device%%:*})| head -n1) -+ nfs_address=${lookup##* } -+ fi -+ ifname=$(ip -o route get to $nfs_address | sed -n 's/.*dev \([^ ]*\).*/\1/p') -+ if [ -e /sys/class/net/$ifname/address ] ; then -+ ifmac=$(cat /sys/class/net/$ifname/address) -+ printf 'ifname=%s:%s ' ${ifname} ${ifmac} -+ fi -+ -+ printf 'ip=%s:static\n' ${ifname} -+} -+ - # called by dracut - install() { - local _i -@@ -37,6 +73,11 @@ install() { - mount.nfs4 umount rpc.idmapd sed /etc/netconfig - inst_multiple /etc/services /etc/nsswitch.conf /etc/rpc /etc/protocols /etc/idmapd.conf - -+ if [[ $hostonly_cmdline == "yes" ]]; then -+ local _netconf="$(cmdline)" -+ [[ $_netconf ]] && printf "%s\n" "$_netconf" >> "${initdir}/etc/cmdline.d/95nfs.conf" -+ fi -+ - if [ -f /lib/modprobe.d/nfs.conf ]; then - inst_multiple /lib/modprobe.d/nfs.conf - else -@@ -75,4 +116,3 @@ install() { - && chown rpc.rpc "$initdir/var/lib/rpcbind" - dracut_need_initqueue - } -- diff --git a/0058-95iscsi-parse-output-from-iscsiadm-correctly.patch b/0058-95iscsi-parse-output-from-iscsiadm-correctly.patch deleted file mode 100644 index 10cd507..0000000 --- a/0058-95iscsi-parse-output-from-iscsiadm-correctly.patch +++ /dev/null @@ -1,44 +0,0 @@ -From cd72830807e231f8a88bd81c8f2df951c5a6d33e Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:46:19 +0100 -Subject: [PATCH] 95iscsi: parse output from iscsiadm correctly - -Due to some obsure reason the IFS parameter is not set correctly -when evaluating get_ibft_mod(). So change the parsing to not rely -on IFS altogether. - -References: bnc#886199 - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - modules.d/95iscsi/module-setup.sh | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - -diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh -index 9975e59..f13119f 100755 ---- a/modules.d/95iscsi/module-setup.sh -+++ b/modules.d/95iscsi/module-setup.sh -@@ -30,15 +30,16 @@ check() { - - get_ibft_mod() { - local ibft_mac=$1 -+ local iface_mac iface_mod - # Return the iSCSI offload module for a given MAC address -- iscsiadm -m iface | while read iface_name iface_desc ; do -- IFS=$',' -- set -- $iface_desc -- if [ "$ibft_mac" = "$2" ] ; then -- echo $1 -+ for iface_desc in $(iscsiadm -m iface | cut -f 2 -d ' '); do -+ iface_mod=${iface_desc%%,*} -+ iface_mac=${iface_desc#*,} -+ iface_mac=${iface_mac%%,*} -+ if [ "$ibft_mac" = "$iface_mac" ] ; then -+ echo $iface_mod - return 0 - fi -- unset IFS - done - } - diff --git a/0059-dracut-Do-not-stop-installing-drivers-if-one-fails.patch b/0059-dracut-Do-not-stop-installing-drivers-if-one-fails.patch deleted file mode 100644 index e27687c..0000000 --- a/0059-dracut-Do-not-stop-installing-drivers-if-one-fails.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 8d40852e8cf5a4b5db38cbbb52c42b348d3c7502 Mon Sep 17 00:00:00 2001 -From: Thomas Renninger -Date: Thu, 11 Dec 2014 15:46:20 +0100 -Subject: [PATCH] dracut: Do not stop installing drivers if one fails - ---add-drivers and --filesystems kernel drivers are added via: -instmods -c -The check option makes the function return if one driver could not get -installed without trying to install further drivers which is bad. - -The user is still informed ($_silent is by default no), but all modules -passed to instmods are tried to be loaded, even if one fails. - -Signed-off-by: Thomas Renninger ---- - dracut-functions.sh | 10 ++++------ - 1 file changed, 4 insertions(+), 6 deletions(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index 7a12a76..b91d8dc 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -1742,18 +1742,16 @@ instmods() { - if (($# == 0)); then # filenames from stdin - while read _mod; do - inst1mod "${_mod%.ko*}" || { -- if [[ "$_check" == "yes" ]]; then -- [[ "$_silent" == "no" ]] && dfatal "Failed to install module $_mod" -- return 1 -+ if [[ "$_check" == "yes" ]] && [[ "$_silent" == "no" ]]; then -+ dfatal "Failed to install module $_mod" - fi - } - done - fi - while (($# > 0)); do # filenames as arguments - inst1mod ${1%.ko*} || { -- if [[ "$_check" == "yes" ]]; then -- [[ "$_silent" == "no" ]] && dfatal "Failed to install module $1" -- return 1 -+ if [[ "$_check" == "yes" ]] && [[ "$_silent" == "no" ]]; then -+ dfatal "Failed to install module $1" - fi - } - shift diff --git a/0060-95fcoe-update-fcoe-interface-check.patch b/0060-95fcoe-update-fcoe-interface-check.patch deleted file mode 100644 index 0eebd7e..0000000 --- a/0060-95fcoe-update-fcoe-interface-check.patch +++ /dev/null @@ -1,36 +0,0 @@ -From c64a94caa98749ceb4fad3c551d8e389f508d6df Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:46:21 +0100 -Subject: [PATCH] 95fcoe: update fcoe interface check - -The 'create' sysfs entry has been removed for newer fcoe modules, -so just check if the module directory exists. - -References: bnc#877288 - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - modules.d/95fcoe/parse-fcoe.sh | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh -index 59de56f..9604503 100755 ---- a/modules.d/95fcoe/parse-fcoe.sh -+++ b/modules.d/95fcoe/parse-fcoe.sh -@@ -20,14 +20,11 @@ - - - # BRCM: Later, should check whether bnx2x is loaded first before loading bnx2fc so do not load bnx2fc when there are no Broadcom adapters --[ -e /sys/module/fcoe/parameters/create ] || modprobe -a fcoe || die "FCoE requested but kernel/initrd does not support FCoE" -+[ -d /sys/module/fcoe ] || modprobe -a fcoe || die "FCoE requested but kernel/initrd does not support FCoE" - - modprobe bnx2fc >/dev/null 2>&1 - udevadm settle --timeout=30 - --# FCoE actually supported? --[ -e /sys/module/fcoe/parameters/create ] || modprobe fcoe || die "FCoE requested but kernel/initrd does not support FCoE" -- - parse_fcoe_opts() { - local IFS=: - set $fcoe diff --git a/0061-95fcoe-Store-current-configuration-in-dracut-cmdline.patch b/0061-95fcoe-Store-current-configuration-in-dracut-cmdline.patch deleted file mode 100644 index 49e1f9c..0000000 --- a/0061-95fcoe-Store-current-configuration-in-dracut-cmdline.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 8b257fcc86f9a470613c1a5719641144a688acf7 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:46:22 +0100 -Subject: [PATCH] 95fcoe: Store current configuration in dracut cmdline - -When running with --hostonly-cmdline we should be storing -the current configuration in /etc/cmdline.d so that dracut -will be configure the system automatically. - -References: bnc#877288 - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - modules.d/95fcoe/module-setup.sh | 52 ++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 52 insertions(+) - -diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh -index b67aa04..174745a 100755 ---- a/modules.d/95fcoe/module-setup.sh -+++ b/modules.d/95fcoe/module-setup.sh -@@ -2,7 +2,16 @@ - - # called by dracut - check() { -+ [[ $hostonly ]] || [[ $mount_needs ]] && { -+ for c in /sys/bus/fcoe/devices/ctlr_* ; do -+ [ -L $c ] || continue -+ fcoe_ctlr=$c -+ done -+ [ -z "$fcoe_ctlr" ] && return 255 -+ } -+ - require_binaries dcbtool fipvlan lldpad ip readlink || return 1 -+ - return 0 - } - -@@ -17,12 +26,55 @@ installkernel() { - instmods fcoe 8021q edd - } - -+get_vlan_parent() { -+ local link=$1 -+ -+ [ -d $link ] || return -+ read iflink < $link/iflink -+ for if in /sys/class/net/* ; do -+ read idx < $if/ifindex -+ if [ $idx -eq $iflink ] ; then -+ echo ${if##*/} -+ fi -+ done -+} -+ -+# called by dracut -+cmdline() { -+ -+ for c in /sys/bus/fcoe/devices/ctlr_* ; do -+ [ -L $c ] || continue -+ read enabled < $c/enabled -+ [ $enabled -eq 0 ] && continue -+ d=$(cd -P $c; echo $PWD) -+ i=${d%/*} -+ read mac < ${i}/address -+ s=$(dcbtool gc ${i##*/} dcb | sed -n 's/^DCB State:\t*\(.*\)/\1/p') -+ if [ -z "$s" ] ; then -+ p=$(get_vlan_parent ${i}) -+ if [ "$p" ] ; then -+ s=$(dcbtool gc ${p} dcb | sed -n 's/^DCB State:\t*\(.*\)/\1/p') -+ fi -+ fi -+ if [ "$s" = "on" ] ; then -+ dcb="dcb" -+ else -+ dcb="nodcb" -+ fi -+ echo "fcoe=${mac}:${dcb}" -+ done -+} -+ - # called by dracut - install() { - inst_multiple ip dcbtool fipvlan lldpad readlink lldptool - - mkdir -m 0755 -p "$initdir/var/lib/lldpad" - -+ if [[ $hostonly_cmdline == "yes" ]] ; then -+ local _fcoeconf=$(cmdline) -+ [[ $_fcoeconf ]] && printf "%s\n" "$_fcoeconf" >> "${initdir}/etc/cmdline.d/95fcoe.conf" -+ fi - inst "$moddir/fcoe-up.sh" "/sbin/fcoe-up" - inst "$moddir/fcoe-edd.sh" "/sbin/fcoe-edd" - inst "$moddir/fcoe-genrules.sh" "/sbin/fcoe-genrules.sh" diff --git a/0062-95fcoe-skip-VLAN-devices-in-fcoe-up.patch b/0062-95fcoe-skip-VLAN-devices-in-fcoe-up.patch deleted file mode 100644 index 3343e3c..0000000 --- a/0062-95fcoe-skip-VLAN-devices-in-fcoe-up.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 0a68a26cffad7fc75e454b06206c0bbf297361b7 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:46:23 +0100 -Subject: [PATCH] 95fcoe: skip VLAN devices in fcoe-up - -DCB & fipvlan can only be called on real devices, not VLAN -ones. So skip any VLAN devices which might been added to the -list of network interfaces. - -References: bnc#878583 - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - modules.d/95fcoe/fcoe-up.sh | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh -index b9d0411..7f6eb1b 100755 ---- a/modules.d/95fcoe/fcoe-up.sh -+++ b/modules.d/95fcoe/fcoe-up.sh -@@ -16,6 +16,14 @@ type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh - netif=$1 - dcb=$2 - -+iflink=$(cat /sys/class/net/$netif/iflink) -+ifindex=$(cat /sys/class/net/$netif/ifindex) -+if [ "$iflink" != "$ifindex" ] ; then -+ # Skip VLAN devices -+ exit 0 -+fi -+ -+ip link set dev $netif up - linkup "$netif" - - netdriver=$(readlink -f /sys/class/net/$netif/device/driver) diff --git a/0063-95fcoe-start-lldpad-separately.patch b/0063-95fcoe-start-lldpad-separately.patch deleted file mode 100644 index 2f58c04..0000000 --- a/0063-95fcoe-start-lldpad-separately.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 22e837b6458d5d17d1cb6a9b09b7515746d4e098 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:46:24 +0100 -Subject: [PATCH] 95fcoe: start lldpad separately - -lldpad is a system-wide process, which must be started only once. -So we should be separate it from fcoe-up, as it might be called -several times. - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - modules.d/95fcoe/fcoe-up.sh | 8 -------- - modules.d/95fcoe/lldpad.sh | 14 ++++++++++++++ - modules.d/95fcoe/module-setup.sh | 1 + - 3 files changed, 15 insertions(+), 8 deletions(-) - create mode 100644 modules.d/95fcoe/lldpad.sh - -diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh -index 7f6eb1b..43a0ad5 100755 ---- a/modules.d/95fcoe/fcoe-up.sh -+++ b/modules.d/95fcoe/fcoe-up.sh -@@ -30,10 +30,6 @@ netdriver=$(readlink -f /sys/class/net/$netif/device/driver) - netdriver=${netdriver##*/} - - if [ "$dcb" = "dcb" ]; then -- # Note lldpad will stay running after switchroot, the system initscripts -- # are to kill it and start a new lldpad to take over. Data is transfered -- # between the 2 using a shm segment -- lldpad -d - # wait for lldpad to be ready - i=0 - while [ $i -lt 60 ]; do -@@ -43,10 +39,6 @@ if [ "$dcb" = "dcb" ]; then - i=$(($i+1)) - done - -- # on some systems lldpad needs some time -- # sleep until we find a better solution -- sleep 30 -- - while [ $i -lt 60 ]; do - dcbtool sc "$netif" dcb on && break - info "Retrying to turn dcb on" -diff --git a/modules.d/95fcoe/lldpad.sh b/modules.d/95fcoe/lldpad.sh -new file mode 100644 -index 0000000..d06a3bd ---- /dev/null -+++ b/modules.d/95fcoe/lldpad.sh -@@ -0,0 +1,14 @@ -+#!/bin/bash -+ -+# Note lldpad will stay running after switchroot, the system initscripts -+# are to kill it and start a new lldpad to take over. Data is transfered -+# between the 2 using a shm segment -+lldpad -d -+# wait for lldpad to be ready -+i=0 -+while [ $i -lt 60 ]; do -+ lldptool -p && break -+ info "Waiting for lldpad to be ready" -+ sleep 1 -+ i=$(($i+1)) -+done -diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh -index 174745a..9c67f17 100755 ---- a/modules.d/95fcoe/module-setup.sh -+++ b/modules.d/95fcoe/module-setup.sh -@@ -78,6 +78,7 @@ install() { - inst "$moddir/fcoe-up.sh" "/sbin/fcoe-up" - inst "$moddir/fcoe-edd.sh" "/sbin/fcoe-edd" - inst "$moddir/fcoe-genrules.sh" "/sbin/fcoe-genrules.sh" -+ inst_hook pre-trigger 03 "$moddir/lldpad.sh" - inst_hook cmdline 99 "$moddir/parse-fcoe.sh" - dracut_need_initqueue - } diff --git a/0064-Enhance-suse.conf-and-debug-module-example-with-SUSE.patch b/0064-Enhance-suse.conf-and-debug-module-example-with-SUSE.patch deleted file mode 100644 index c6b99b1..0000000 --- a/0064-Enhance-suse.conf-and-debug-module-example-with-SUSE.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 94920084351349cba579ce80a89321ab6544653c Mon Sep 17 00:00:00 2001 -From: Thomas Renninger -Date: Thu, 11 Dec 2014 15:46:25 +0100 -Subject: [PATCH] Enhance suse.conf and debug module example with SUSE-specific - settings - -SUSE is using specific settings for dracut, so add them -to the suse.conf.example file. - -Add vi and find to the debug module add some help text to the suse.conf -file when and how to use it. - -Signed-off-by: Thomas Renninger ---- - dracut.conf.d/suse.conf.example | 21 +++++++++++++++++++++ - modules.d/95debug/module-setup.sh | 3 +-- - 2 files changed, 22 insertions(+), 2 deletions(-) - -diff --git a/dracut.conf.d/suse.conf.example b/dracut.conf.d/suse.conf.example -index 1e7f80e..37ffd72 100644 ---- a/dracut.conf.d/suse.conf.example -+++ b/dracut.conf.d/suse.conf.example -@@ -1,3 +1,24 @@ -+# SUSE specifc dracut settings -+# -+# SUSE by default always builds a as small as possible initrd for performance -+# and resource reasons. -+# If you like to build a generic initrd which works on other platforms than -+# on the one dracut/mkinitrd got called comment out below setting(s). -+hostonly="yes" -+hostonly_cmdline="yes" -+ -+compress="xz -0 --check=crc32 --memlimit-compress=50%" -+ - i18n_vars="/etc/sysconfig/language:RC_LANG-LANG,RC_LC_ALL-LC_ALL /etc/sysconfig/console:CONSOLE_UNICODEMAP-FONT_UNIMAP,CONSOLE_FONT-FONT,CONSOLE_SCREENMAP-FONT_MAP /etc/sysconfig/keyboard:KEYTABLE-KEYMAP" - omit_drivers+=" i2o_scsi" - -+# Below adds additional tools to the initrd which are not urgently necessary to -+# bring up the system, but help to debug problems. -+# See /usr/lib/dracut/modules.d/95debug/module-setup.sh which additional tools -+# are installed and add more if you need them. This specifically helps if you -+# use: -+# rd.break=[cmdline|pre-udev|pre-trigger|initqueue|pre-mount| -+# mount|pre-pivot|cleanup] -+# boot parameter or if you are forced to enter the dracut emergency shell. -+ -+# add_dracutmodules+=debug -diff --git a/modules.d/95debug/module-setup.sh b/modules.d/95debug/module-setup.sh -index 625f7fb..5a9aaac 100755 ---- a/modules.d/95debug/module-setup.sh -+++ b/modules.d/95debug/module-setup.sh -@@ -14,8 +14,7 @@ depends() { - # called by dracut - install() { - inst_multiple -o ps grep more cat rm strace free showmount \ -- ping netstat rpcinfo vi scp ping6 ssh \ -+ ping netstat rpcinfo vi scp ping6 ssh find vi \ - fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.vfat e2fsck -- - } - diff --git a/0065-40network-add-missing-_arch-variable-declaration.patch b/0065-40network-add-missing-_arch-variable-declaration.patch deleted file mode 100644 index c2b9bc3..0000000 --- a/0065-40network-add-missing-_arch-variable-declaration.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 681462eca8bd87383c9cb8c0bc34ebad827c4421 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:46:26 +0100 -Subject: [PATCH] 40network: add missing _arch variable declaration - -The module_setup.sh script was missing an '_arch' declaration, -causing network not to be installed on s390. - -Signed-off-by: Thomas Renninger ---- - modules.d/40network/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh -index 55bee4c..f7e0a87 100755 ---- a/modules.d/40network/module-setup.sh -+++ b/modules.d/40network/module-setup.sh -@@ -17,6 +17,7 @@ depends() { - # called by dracut - installkernel() { - # Include wired net drivers, excluding wireless -+ local _arch=$(uname -m) - - net_module_filter() { - local _net_drivers='eth_type_trans|register_virtio_device|usbnet_open' diff --git a/0066-99base-Add-chown-binary.patch b/0066-99base-Add-chown-binary.patch deleted file mode 100644 index ced65d0..0000000 --- a/0066-99base-Add-chown-binary.patch +++ /dev/null @@ -1,29 +0,0 @@ -From a262ad91e82729b661049f24a5d5968d08ce161c Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:46:27 +0100 -Subject: [PATCH] 99base: Add chown binary - -nvidia driver needs this via modprobe script. -Needs to do change the group after a device node got created. -Add chown instead of chgrp which can also change the owner of a file. - -Ask Stefand Dirsch for details. - -Signed-off-by: Thomas Renninger ---- - modules.d/99base/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh -index 7d30320..a1046af 100755 ---- a/modules.d/99base/module-setup.sh -+++ b/modules.d/99base/module-setup.sh -@@ -15,7 +15,7 @@ depends() { - install() { - local _d - -- inst_multiple mount mknod mkdir sleep chroot \ -+ inst_multiple mount mknod mkdir sleep chroot chown \ - sed ls flock cp mv dmesg rm ln rmmod mkfifo umount readlink setsid - inst $(command -v modprobe) /sbin/modprobe - diff --git a/0067-90kernel-modules-install-scsi_dh_alua.patch b/0067-90kernel-modules-install-scsi_dh_alua.patch deleted file mode 100644 index c479ca2..0000000 --- a/0067-90kernel-modules-install-scsi_dh_alua.patch +++ /dev/null @@ -1,28 +0,0 @@ -From ce8f354dbd5a54be247ee8a96aa14b555503f3b6 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:46:28 +0100 -Subject: [PATCH] 90kernel-modules: install scsi_dh_alua - -Install the missing scsi_dh_alua module, too. - -References: bnc#871617 - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - modules.d/90kernel-modules/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index 2fa263c..1a8fcff 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -41,7 +41,7 @@ installkernel() { - uhci-hcd \ - xhci-hcd - -- instmods yenta_socket scsi_dh_rdac scsi_dh_emc \ -+ instmods yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \ - atkbd i8042 usbhid hid-apple hid-sunplus hid-cherry hid-logitech \ - hid-logitech-dj hid-microsoft hid-lcpower firewire-ohci \ - pcmcia hid-hyperv hv-vmbus hyperv-keyboard diff --git a/0068-Fix-non-export-of-journal-dev-boot-options.patch b/0068-Fix-non-export-of-journal-dev-boot-options.patch deleted file mode 100644 index d553c47..0000000 --- a/0068-Fix-non-export-of-journal-dev-boot-options.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 486030575d3573237e776a630b3df0139c11fab3 Mon Sep 17 00:00:00 2001 -From: Thorsten Behrens -Date: Thu, 11 Dec 2014 15:46:29 +0100 -Subject: [PATCH] Fix non-export of journal dev boot options. - -cmdline_journal does not contain linefeeds anymore, so read -silently skipped it altogether. - -Signed-off-by: Thorsten Behrens -Signed-off-by: Thomas Renninger ---- - modules.d/95rootfs-block/module-setup.sh | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/modules.d/95rootfs-block/module-setup.sh b/modules.d/95rootfs-block/module-setup.sh -index 258b32f..c2f71bb 100755 ---- a/modules.d/95rootfs-block/module-setup.sh -+++ b/modules.d/95rootfs-block/module-setup.sh -@@ -43,9 +43,8 @@ cmdline() { - # called by dracut - install() { - if [[ $hostonly_cmdline == "yes" ]]; then -- cmdline_journal | while read journaldev; do -- [[ $journaldev ]] && printf "%s\n" "$journaldev" >> "${initdir}/etc/cmdline.d/95root-journaldev.conf" -- done -+ local _journaldev=$(cmdline_journal) -+ [[ $_journaldev ]] && printf "%s\n" "$_journaldev" >> "${initdir}/etc/cmdline.d/95root-journaldev.conf" - fi - - inst_multiple umount diff --git a/0069-Also-export-root-boot-param-for-hostonly-cmdline-cas.patch b/0069-Also-export-root-boot-param-for-hostonly-cmdline-cas.patch deleted file mode 100644 index 76b1753..0000000 --- a/0069-Also-export-root-boot-param-for-hostonly-cmdline-cas.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 7700b3df4c753112d9a38745388b1e1fd54ce5c5 Mon Sep 17 00:00:00 2001 -From: Thorsten Behrens -Date: Thu, 11 Dec 2014 15:46:30 +0100 -Subject: [PATCH] Also export root= boot param for hostonly-cmdline case. - -If there's a root fallback, at least attempt to have it falling -back to the last root filesystem this system ran off of. - -Signed-off-by: Thorsten Behrens -Signed-off-by: Thomas Renninger ---- - modules.d/95rootfs-block/module-setup.sh | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/modules.d/95rootfs-block/module-setup.sh b/modules.d/95rootfs-block/module-setup.sh -index c2f71bb..81de177 100755 ---- a/modules.d/95rootfs-block/module-setup.sh -+++ b/modules.d/95rootfs-block/module-setup.sh -@@ -29,14 +29,18 @@ cmdline_journal() { - return 0 - } - --# called by dracut --cmdline() { -+cmdline_rootfs() { - local dev=/dev/block/$(find_root_block_device) - if [ -e $dev ]; then - printf " root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")" - printf " rootflags=%s" "$(find_mp_fsopts /)" - printf " rootfstype=%s" "$(find_mp_fstype /)" - fi -+} -+ -+# called by dracut -+cmdline() { -+ cmdline_rootfs - cmdline_journal - } - -@@ -45,6 +49,8 @@ install() { - if [[ $hostonly_cmdline == "yes" ]]; then - local _journaldev=$(cmdline_journal) - [[ $_journaldev ]] && printf "%s\n" "$_journaldev" >> "${initdir}/etc/cmdline.d/95root-journaldev.conf" -+ local _rootdev=$(cmdline_rootfs) -+ [[ $_rootdev ]] && printf "%s\n" "$_rootdev" >> "${initdir}/etc/cmdline.d/95root-dev.conf" - fi - - inst_multiple umount diff --git a/0070-Don-t-create-lots-of-empty-cmdline-files-for-hostonl.patch b/0070-Don-t-create-lots-of-empty-cmdline-files-for-hostonl.patch deleted file mode 100644 index c6c7398..0000000 --- a/0070-Don-t-create-lots-of-empty-cmdline-files-for-hostonl.patch +++ /dev/null @@ -1,94 +0,0 @@ -From fe116c1670c622fa117a7765abb17c976cc48333 Mon Sep 17 00:00:00 2001 -From: Thorsten Behrens -Date: Thu, 11 Dec 2014 15:46:31 +0100 -Subject: [PATCH] Don't create lots of empty cmdline files for hostonly-cmdline - case - -This aligns other places piping cmdline() output to cmdline.d files -with the earlier fix for 95rootfs-block. - -Signed-off-by: Thorsten Behrens -Signed-off-by: Thomas Renninger ---- - modules.d/90crypt/module-setup.sh | 4 ++-- - modules.d/90dmraid/module-setup.sh | 4 ++-- - modules.d/90lvm/module-setup.sh | 4 ++-- - modules.d/90mdraid/module-setup.sh | 4 ++-- - modules.d/95resume/module-setup.sh | 4 ++-- - 5 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh -index 37ae859..ea1e340 100755 ---- a/modules.d/90crypt/module-setup.sh -+++ b/modules.d/90crypt/module-setup.sh -@@ -50,8 +50,8 @@ cmdline() { - install() { - - if [[ $hostonly_cmdline == "yes" ]]; then -- cmdline >> "${initdir}/etc/cmdline.d/90crypt.conf" -- echo >> "${initdir}/etc/cmdline.d/90crypt.conf" -+ local _cryptconf=$(cmdline) -+ [[ $_cryptconf ]] && printf "%s\n" "$_cryptconf" >> "${initdir}/etc/cmdline.d/90crypt.conf" - fi - - inst_multiple cryptsetup rmdir readlink umount -diff --git a/modules.d/90dmraid/module-setup.sh b/modules.d/90dmraid/module-setup.sh -index 508598b..044e01f 100755 ---- a/modules.d/90dmraid/module-setup.sh -+++ b/modules.d/90dmraid/module-setup.sh -@@ -64,8 +64,8 @@ install() { - local _i - - if [[ $hostonly_cmdline == "yes" ]]; then -- cmdline >> "${initdir}/etc/cmdline.d/90dmraid.conf" -- echo >> "${initdir}/etc/cmdline.d/90dmraid.conf" -+ local _raidconf=$(cmdline) -+ [[ $_raidconf ]] && printf "%s\n" "$_raidconf" >> "${initdir}/etc/cmdline.d/90dmraid.conf" - fi - - inst_multiple dmraid -diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh -index 5515ac0..592a2e2 100755 ---- a/modules.d/90lvm/module-setup.sh -+++ b/modules.d/90lvm/module-setup.sh -@@ -53,8 +53,8 @@ install() { - inst lvm - - if [[ $hostonly_cmdline == "yes" ]]; then -- cmdline >> "${initdir}/etc/cmdline.d/90lvm.conf" -- echo >> "${initdir}/etc/cmdline.d/90lvm.conf" -+ local _lvmconf=$(cmdline) -+ [[ $_lvmconf ]] && printf "%s\n" "$_lvmconf" >> "${initdir}/etc/cmdline.d/90lvm.conf" - fi - - inst_rules "$moddir/64-lvm.rules" -diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh -index ce3394a..747ea8a 100755 ---- a/modules.d/90mdraid/module-setup.sh -+++ b/modules.d/90mdraid/module-setup.sh -@@ -71,8 +71,8 @@ install() { - inst $(command -v mdadm) /sbin/mdadm - - if [[ $hostonly_cmdline == "yes" ]]; then -- cmdline >> "${initdir}/etc/cmdline.d/90mdraid.conf" -- echo >> "${initdir}/etc/cmdline.d/90mdraid.conf" -+ local _raidconf=$(cmdline) -+ [[ $_raidconf ]] && printf "%s\n" "$_raidconf" >> "${initdir}/etc/cmdline.d/90mdraid.conf" - fi - - # > "${initdir}/etc/cmdline.d/95resume.conf" -- echo >> "${initdir}/etc/cmdline.d/95resume.conf" -+ local _resumeconf=$(cmdline) -+ [[ $_resumeconf ]] && printf "%s\n" "$_resumeconf" >> "${initdir}/etc/cmdline.d/95resume.conf" - fi - - # Optional uswsusp support diff --git a/0071-95rootfs-block-Correctly-terminate-commandline-param.patch b/0071-95rootfs-block-Correctly-terminate-commandline-param.patch deleted file mode 100644 index bf3006d..0000000 --- a/0071-95rootfs-block-Correctly-terminate-commandline-param.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 4b6b46bb2aa9e6a72f96501888035f2d38b82266 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 11 Dec 2014 15:46:32 +0100 -Subject: [PATCH] 95rootfs-block: Correctly terminate commandline parameter - -95rootfs-block would not terminate the commandline parameter with -a space or newline, instead it'll rely on the main routine from -dracut.sh to do this. -Which will cause unexpected problems for any modules called -after this. - -So terminate the commandline parameters correctly here and remove -the newline from dracut.sh. - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - dracut.sh | 1 - - modules.d/95rootfs-block/module-setup.sh | 8 ++++---- - 2 files changed, 4 insertions(+), 5 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index 2eba19b..f384d2d 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1299,7 +1299,6 @@ if [[ $print_cmdline ]]; then - module_cmdline "$_d_mod" - done - unset moddir -- printf "\n" - exit 0 - fi - -diff --git a/modules.d/95rootfs-block/module-setup.sh b/modules.d/95rootfs-block/module-setup.sh -index 81de177..33875f8 100755 ---- a/modules.d/95rootfs-block/module-setup.sh -+++ b/modules.d/95rootfs-block/module-setup.sh -@@ -22,7 +22,7 @@ cmdline_journal() { - fi - - if [ -n "$journaldev" ]; then -- printf " root.journaldev=%s" "$journaldev" -+ echo "root.journaldev=${journaldev}" - fi - done - fi -@@ -32,9 +32,9 @@ cmdline_journal() { - cmdline_rootfs() { - local dev=/dev/block/$(find_root_block_device) - if [ -e $dev ]; then -- printf " root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")" -- printf " rootflags=%s" "$(find_mp_fsopts /)" -- printf " rootfstype=%s" "$(find_mp_fstype /)" -+ printf "root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")" -+ printf "rootflags=%s" "$(find_mp_fsopts /)" -+ printf "rootfstype=%s\n" "$(find_mp_fstype /)" - fi - } - diff --git a/0072-dracut-nbd-Only-complain-of-missing-binary-in-hoston.patch b/0072-dracut-nbd-Only-complain-of-missing-binary-in-hoston.patch deleted file mode 100644 index 55201f1..0000000 --- a/0072-dracut-nbd-Only-complain-of-missing-binary-in-hoston.patch +++ /dev/null @@ -1,39 +0,0 @@ -From e683985d103f1b0f15a9ccd9678169f4fb7aeb5f Mon Sep 17 00:00:00 2001 -From: Thomas Renninger -Date: Thu, 11 Dec 2014 15:46:33 +0100 -Subject: [PATCH] dracut: nbd: Only complain of missing binary in hostonly mode - if - - rootfs is on nbd - -In not hostonly mode, require_binaries will still complain. -If in hostonly mode and the module is explicitly added via -a nbd, then -install() section will still complain later: -dracut-install: ERROR: installing 'nbd-client' - -Signed-off-by: Thomas Renninger ---- - modules.d/95nbd/module-setup.sh | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/modules.d/95nbd/module-setup.sh b/modules.d/95nbd/module-setup.sh -index 4f9e350..3cb6f49 100755 ---- a/modules.d/95nbd/module-setup.sh -+++ b/modules.d/95nbd/module-setup.sh -@@ -3,8 +3,6 @@ - # called by dracut - check() { - local _rootdev -- # If our prerequisites are not met, fail. -- require_binaries nbd-client || return 1 - - # if an nbd device is not somewhere in the chain of devices root is - # mounted on, fail the hostonly check. -@@ -15,6 +13,7 @@ check() { - [[ -b /dev/block/$_rootdev ]] || return 1 - check_block_and_slaves is_nbd "$_rootdev" || return 255 - } -+ require_binaries nbd-client || return 1 - - return 0 - } diff --git a/0073-dracut-functions.sh-for-module-handling-strip-all-.k.patch b/0073-dracut-functions.sh-for-module-handling-strip-all-.k.patch deleted file mode 100644 index 02f7dce..0000000 --- a/0073-dracut-functions.sh-for-module-handling-strip-all-.k.patch +++ /dev/null @@ -1,72 +0,0 @@ -From bea41b898a93e4437640817964861bbb694b01e6 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 17 Dec 2014 11:22:46 +0100 -Subject: [PATCH] dracut-functions.sh: for module handling, strip all ".ko*" - -Just strip anything after ".ko" including ".ko", otherwise compressed -modules are not stripped, if they end on e.g. ".ko.gz" ---- - dracut-functions.sh | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index b91d8dc..410960d 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -1461,7 +1461,7 @@ install_kmod_with_fw() { - - if [[ $omit_drivers ]]; then - local _kmod=${1##*/} -- _kmod=${_kmod%.ko} -+ _kmod=${_kmod%.ko*} - _kmod=${_kmod/-/_} - if [[ "$_kmod" =~ $omit_drivers ]]; then - dinfo "Omitting driver $_kmod" -@@ -1475,7 +1475,7 @@ install_kmod_with_fw() { - - if [[ $silent_omit_drivers ]]; then - local _kmod=${1##*/} -- _kmod=${_kmod%.ko} -+ _kmod=${_kmod%.ko*} - _kmod=${_kmod/-/_} - [[ "$_kmod" =~ $silent_omit_drivers ]] && return 0 - [[ "${1##*/lib/modules/$kernel/}" =~ $silent_omit_drivers ]] && return 0 -@@ -1599,7 +1599,7 @@ module_is_host_only() { - local _mod=$1 - local _modenc a i _k _s _v _aliases - _mod=${_mod##*/} -- _mod=${_mod%.ko} -+ _mod=${_mod%.ko*} - _modenc=${_mod//-/_} - - [[ " $add_drivers " == *\ ${_mod}\ * ]] && return 0 -@@ -1691,16 +1691,16 @@ instmods() { - _mod=${_mod##*/} - # Check for aliased modules - _modalias=$(modinfo -k $kernel -F filename $_mod 2> /dev/null) -- _modalias=${_modalias%.ko} -- if [ "${_modalias##*/}" != "$_mod" ] ; then -+ _modalias=${_modalias%.ko*} -+ if [[ $_modalias ]] && [ "${_modalias##*/}" != "${_mod%.ko*}" ] ; then - _mod=${_modalias##*/} - fi - - # if we are already installed, skip this module and go on - # to the next one. - if [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && \ -- [[ -f "$DRACUT_KERNEL_LAZY_HASHDIR/${_mod%.ko}.ko" ]]; then -- read _ret <"$DRACUT_KERNEL_LAZY_HASHDIR/${_mod%.ko}.ko" -+ [[ -f "$DRACUT_KERNEL_LAZY_HASHDIR/${_mod%.ko*}" ]]; then -+ read _ret <"$DRACUT_KERNEL_LAZY_HASHDIR/${_mod%.ko*}" - return $_ret - fi - -@@ -1730,7 +1730,7 @@ instmods() { - ((_ret+=$?)) - else - [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && \ -- echo $_mod >> "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist" -+ echo ${_mod%.ko*} >> "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist" - fi - ;; - esac diff --git a/0074-Revert-95rootfs-block-Correctly-terminate-commandlin.patch b/0074-Revert-95rootfs-block-Correctly-terminate-commandlin.patch deleted file mode 100644 index 4439846..0000000 --- a/0074-Revert-95rootfs-block-Correctly-terminate-commandlin.patch +++ /dev/null @@ -1,72 +0,0 @@ -From a17d5cf4941addd0a7e94129062520fd64585a7d Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 17 Dec 2014 11:44:18 +0100 -Subject: [PATCH] Revert "95rootfs-block: Correctly terminate commandline - parameter" -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This reverts commit 4b6b46bb2aa9e6a72f96501888035f2d38b82266. - -$ ./dracut.sh -l --print-cmdline -root=UUID=d5e53483-30bc-4119-8c0c-841d47a2f76brootflags=rw,noatime,compress=lzo,ssd,discard,space_cache,autodefrag,inode_cacherootfstype=btrfs - -instead of: - -$ ./dracut.sh -l --print-cmdline - root=UUID=d5e53483-30bc-4119-8c0c-841d47a2f76b -rootflags=rw,noatime,compress=lzo,ssd,discard,space_cache,autodefrag,inode_cache -rootfstype=btrfs - -and also - -$ make testimage -… - *** Store current command line parameters *** -Stored kernel commandline: -root=UUID=d5e53483-30bc-4119-8c0c-841d47a2f76brootflags=rw,noatime,compress=lzo,ssd,discard,space_cache,autodefrag,inode_cacherootfstype=btrfs -… ---- - dracut.sh | 1 + - modules.d/95rootfs-block/module-setup.sh | 8 ++++---- - 2 files changed, 5 insertions(+), 4 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index f384d2d..2eba19b 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1299,6 +1299,7 @@ if [[ $print_cmdline ]]; then - module_cmdline "$_d_mod" - done - unset moddir -+ printf "\n" - exit 0 - fi - -diff --git a/modules.d/95rootfs-block/module-setup.sh b/modules.d/95rootfs-block/module-setup.sh -index 33875f8..81de177 100755 ---- a/modules.d/95rootfs-block/module-setup.sh -+++ b/modules.d/95rootfs-block/module-setup.sh -@@ -22,7 +22,7 @@ cmdline_journal() { - fi - - if [ -n "$journaldev" ]; then -- echo "root.journaldev=${journaldev}" -+ printf " root.journaldev=%s" "$journaldev" - fi - done - fi -@@ -32,9 +32,9 @@ cmdline_journal() { - cmdline_rootfs() { - local dev=/dev/block/$(find_root_block_device) - if [ -e $dev ]; then -- printf "root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")" -- printf "rootflags=%s" "$(find_mp_fsopts /)" -- printf "rootfstype=%s\n" "$(find_mp_fstype /)" -+ printf " root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")" -+ printf " rootflags=%s" "$(find_mp_fsopts /)" -+ printf " rootfstype=%s" "$(find_mp_fstype /)" - fi - } - diff --git a/0075-resume-make-use-of-systemd-hibernate-resume-if-exist.patch b/0075-resume-make-use-of-systemd-hibernate-resume-if-exist.patch deleted file mode 100644 index 03ddcb0..0000000 --- a/0075-resume-make-use-of-systemd-hibernate-resume-if-exist.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 733c71ce9e2d161c9e04772aeb1c5fb38e3fcb3a Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 17 Dec 2014 12:08:37 +0100 -Subject: [PATCH] resume: make use of systemd-hibernate-resume, if existant - -In systemd mode, and if systemd-hibernate-resume exists, use it -exclusively. ---- - modules.d/95resume/module-setup.sh | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh -index dfd4350..7fe6df3 100755 ---- a/modules.d/95resume/module-setup.sh -+++ b/modules.d/95resume/module-setup.sh -@@ -33,6 +33,15 @@ install() { - [[ $_resumeconf ]] && printf "%s\n" "$_resumeconf" >> "${initdir}/etc/cmdline.d/95resume.conf" - fi - -+ # if systemd is included and has the hibernate-resume tool, use it and nothing else -+ if dracut_module_included "systemd" && [[ -x $systemdutildir/systemd-hibernate-resume ]]; then -+ inst_multiple -o \ -+ $systemdutildir/system-generators/systemd-hibernate-resume-generator \ -+ $systemdsystemunitdir/systemd-hibernate-resume@.service \ -+ $systemdutildir/systemd-hibernate-resume -+ return 0 -+ fi -+ - # Optional uswsusp support - for _bin in /usr/sbin/resume /usr/lib/suspend/resume /usr/lib/uswsusp/resume - do diff --git a/0076-systemd-add-systemd-journald-audit.socket.patch b/0076-systemd-add-systemd-journald-audit.socket.patch deleted file mode 100644 index 6363ba9..0000000 --- a/0076-systemd-add-systemd-journald-audit.socket.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 3e7a05f2a5f051a97ac08885f5288bc310c367c2 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 19 Dec 2014 12:47:49 +0100 -Subject: [PATCH] systemd: add systemd-journald-audit.socket - ---- - modules.d/98systemd/module-setup.sh | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh -index 53e07a2..51ea288 100755 ---- a/modules.d/98systemd/module-setup.sh -+++ b/modules.d/98systemd/module-setup.sh -@@ -83,6 +83,7 @@ install() { - $systemdsystemunitdir/systemd-udevd-kernel.socket \ - $systemdsystemunitdir/systemd-ask-password-plymouth.path \ - $systemdsystemunitdir/systemd-journald.socket \ -+ $systemdsystemunitdir/systemd-journald-audit.socket \ - $systemdsystemunitdir/systemd-ask-password-console.service \ - $systemdsystemunitdir/systemd-modules-load.service \ - $systemdsystemunitdir/systemd-halt.service \ -@@ -105,6 +106,7 @@ install() { - $systemdsystemunitdir/sockets.target.wants/systemd-udevd-control.socket \ - $systemdsystemunitdir/sockets.target.wants/systemd-udevd-kernel.socket \ - $systemdsystemunitdir/sockets.target.wants/systemd-journald.socket \ -+ $systemdsystemunitdir/sockets.target.wants/systemd-journald-audit.socket \ - $systemdsystemunitdir/sockets.target.wants/systemd-journald-dev-log.socket \ - $systemdsystemunitdir/sysinit.target.wants/systemd-udevd.service \ - $systemdsystemunitdir/sysinit.target.wants/systemd-udev-trigger.service \ diff --git a/0077-dracut-Don-t-fail-at-copying-files-when-including-di.patch b/0077-dracut-Don-t-fail-at-copying-files-when-including-di.patch deleted file mode 100644 index 3235546..0000000 --- a/0077-dracut-Don-t-fail-at-copying-files-when-including-di.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 332ecaa900a5af83ffae64f3e103270e49de88de Mon Sep 17 00:00:00 2001 -From: Erwan Velu -Date: Wed, 17 Dec 2014 17:04:19 +0100 -Subject: [PATCH] dracut: Don't fail at copying files when including - directories - -When including a directory, the files were considered in the directory -name which lead to messages like : - -cp: failed to access '/var/tmp/initramfs.L9s2zO///init-func': No such file or directory - -This patch does make the destdir more explicit and copy files into the -destination directory instead of destdir/filename/ ---- - dracut.sh | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index 2eba19b..07e4965 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1493,12 +1493,13 @@ while pop include_src src && pop include_target tgt; do - inst $src $tgt - else - ddebug "Including directory: $src" -- mkdir -p "${initdir}/${tgt}" -+ destdir="${initdir}/${tgt}" -+ mkdir -p "$destdir" - # check for preexisting symlinks, so we can cope with the - # symlinks to $prefix - for i in "$src"/*; do - [[ -e "$i" || -h "$i" ]] || continue -- s=${initdir}/${tgt}/${i#$src/} -+ s=${destdir}/${i#$src/} - if [[ -d "$i" ]]; then - if ! [[ -e "$s" ]]; then - mkdir -m 0755 -p "$s" -@@ -1506,7 +1507,7 @@ while pop include_src src && pop include_target tgt; do - fi - cp --reflink=auto --sparse=auto -fa -t "$s" "$i"/* - else -- cp --reflink=auto --sparse=auto -fa -t "$s" "$i" -+ cp --reflink=auto --sparse=auto -fa -t "$destdir" "$i" - fi - done - fi diff --git a/0078-qemu-add-virtio_rng-kernel-module.patch b/0078-qemu-add-virtio_rng-kernel-module.patch deleted file mode 100644 index 02e91a1..0000000 --- a/0078-qemu-add-virtio_rng-kernel-module.patch +++ /dev/null @@ -1,20 +0,0 @@ -From ebc82d38b74bea9645e33055a193d836dfc3afcb Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 8 Jan 2015 13:18:57 +0100 -Subject: [PATCH] qemu: add virtio_rng kernel module - ---- - modules.d/90qemu/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/90qemu/module-setup.sh b/modules.d/90qemu/module-setup.sh -index d0ea9ed..37972e4 100755 ---- a/modules.d/90qemu/module-setup.sh -+++ b/modules.d/90qemu/module-setup.sh -@@ -25,5 +25,5 @@ installkernel() { - hostonly='' instmods \ - ata_piix ata_generic pata_acpi cdrom sr_mod ahci \ - virtio_blk virtio virtio_ring virtio_pci \ -- virtio_scsi virtio_console -+ virtio_scsi virtio_console virtio_rng - } diff --git a/0079-AUTHORS-and-.mailmap-update.patch b/0079-AUTHORS-and-.mailmap-update.patch deleted file mode 100644 index 0300c2b..0000000 --- a/0079-AUTHORS-and-.mailmap-update.patch +++ /dev/null @@ -1,168 +0,0 @@ -From e0dc6cd4f60e70077ec8e2ca5d7c7942b744fb91 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 8 Jan 2015 13:26:35 +0100 -Subject: [PATCH] AUTHORS and .mailmap update - ---- - .mailmap | 4 +++- - AUTHORS | 41 ++++++++++++++++++++++++++++------------- - 2 files changed, 31 insertions(+), 14 deletions(-) - -diff --git a/.mailmap b/.mailmap -index aaf5aa9..53d61f2 100644 ---- a/.mailmap -+++ b/.mailmap -@@ -10,7 +10,9 @@ Andrey Borzenkov - Dan Horák - John Reiser - Luca Berra --Dave Young dyoung@redhat.com -+Dave Young -+Dave Young - Frederick Grose - Frederic Crozat - Shawn W Dunn -+Kyle McMartin -diff --git a/AUTHORS b/AUTHORS -index b180143..8a89a54 100644 ---- a/AUTHORS -+++ b/AUTHORS -@@ -7,36 +7,40 @@ Warren Togami - Jeremy Katz - Dave Young - David Dillow -+Hannes Reinecke - Michal Soltys - Amerigo Wang - Colin Guthrie -+Thomas Renninger -+WANG Chao - Andrey Borzenkov - Peter Jones --WANG Chao - Andreas Thienemann --Hannes Reinecke - Hans de Goede -+Alexander Tsoy - John Reiser - Luca Berra --Thomas Renninger --Alexander Tsoy --Daniel Drake - Brian C. Lane -+Daniel Drake - Dan Horák - Baoquan He - Leho Kraav - Kamil Rytarowski - Marc Grimme - Peter Rajnoha -+Thorsten Behrens - Chao Wang - Colin Walters - Frederic Crozat - Jesse Keating - Milan Broz -+Nicolas Chauvet - Radek Vykydal - Roberto Sassu - Anton Blanchard - Bill Nottingham -+Chapman Flack -+Cristian Rodríguez - David Cantrell - Dennis Gilmore - Jon Ander Hernandez -@@ -44,21 +48,27 @@ Juan RP - Lance Albertson - Marian Ganisin - Michael Ploujnikov -+Peter Robinson -+Stefan Reimer - Stig Telfer -+Vasiliy Tolstov - Wim Muskee - Alan Jenkins - Alan Pevec --Cristian Rodríguez -+Alex Harpin -+Daniel Schaal - Frederick Grose -+Hari Bathini - Ian Dall - James Buren - James Lee - Joey Boggs - Koen Kooi - Konrad Rzeszutek Wilk -+Kyle McMartin - Mike Snitzer -+Minfei Huang - Przemysław Rudy --Stefan Reimer - Thomas Lange - Till Maas - Vivek Goyal -@@ -67,41 +77,42 @@ Adam Williamson - Alexander Todorov - Andy Lutomirski - Anssi Hannula -+Antony Messerli - Brandon Philips - Canek Peláez Valdés - Chris Leech - Christian Heinz - Cong Wang --Daniel Schaal - Dave Jones --Dave Young - Dennis Schridde - Duane Griffin -+Erwan Velu - Glen Gray --Hari Bathini - Hermann Gausterer - James Laska - Jan Stodola - Jiri Pirko - Joe Lawrence -+Julian Wolf - Kevin Yung --Kyle McMartin --Kyle McMartin - Lars R. Damerow - Lennert Buytenhek - Lubomir Rintel -+Lukas Wunner -+Major Hayden - Marian Csontos - Matt - Matt Smith - Michal Schmidt - Mike Gorse - Munehiro Matsuda --Nicolas Chauvet -+NeilBrown - Nikoli - Olivier Blin - P J P - Paolo Bonzini - Peter Robinson -+Praveen_Paladugu@Dell.com - Pádraig Brady - Quentin Armitage - Robert Buchholz -@@ -110,9 +121,13 @@ Shawn W Dunn - Srinivasa T N - Thilo Bangert - Thomas Backlund -+Tobias Geerinckx -+Tom Gundersen - Tomasz Torcz - Vadim Kuznetsov -+Vaughan Cao - Ville Skyttä - Vratislav Podzimek - Yanko Kaneti -+jloeser - maximilian attems diff --git a/0080-Makefile-add-Wformat-to-CFLAGS.patch b/0080-Makefile-add-Wformat-to-CFLAGS.patch deleted file mode 100644 index 7e78938..0000000 --- a/0080-Makefile-add-Wformat-to-CFLAGS.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 1dc360790d6cdaaa124b299e8d375e3670863312 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 8 Jan 2015 14:53:30 +0100 -Subject: [PATCH] Makefile: add -Wformat to CFLAGS - --Werror=format-security seems to be ignored without -Wformat - -Thanks @ Christoph Brill ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 7127368..41ae274 100644 ---- a/Makefile -+++ b/Makefile -@@ -13,7 +13,7 @@ sysconfdir ?= ${prefix}/etc - bindir ?= ${prefix}/bin - mandir ?= ${prefix}/share/man - CFLAGS ?= -O2 -g -Wall --CFLAGS += -std=gnu99 -D_FILE_OFFSET_BITS=64 -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -+CFLAGS += -std=gnu99 -D_FILE_OFFSET_BITS=64 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 - bashcompletiondir ?= ${datadir}/bash-completion/completions - - man1pages = lsinitrd.1 diff --git a/0081-dracut-functions.sh-avoid-tokenizing-ldconfig-output.patch b/0081-dracut-functions.sh-avoid-tokenizing-ldconfig-output.patch deleted file mode 100644 index a5dc353..0000000 --- a/0081-dracut-functions.sh-avoid-tokenizing-ldconfig-output.patch +++ /dev/null @@ -1,41 +0,0 @@ -From c59779cf9337bc0fc48c7a4d8437f7253f6822c3 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Tue, 23 Dec 2014 22:03:10 +0100 -Subject: [PATCH] dracut-functions.sh: avoid tokenizing ldconfig output with - 'read' - -The space does not separate the elements reliably, spaces can be -embedded in parenthesized expressions too: - - libgmpxx.so.4 (libc6, hwcap: 0x0000000004000000) => /lib/sse2/libgmpxx.so.4 - libgmp.so.10 (libc6, hwcap: 0x0000000004000000) => /lib/sse2/libgmp.so.10 - -This results in dracut creating '0x0000000004000000' and '=>' -directories in the initramfs image. ---- - dracut-functions.sh | 12 +----------- - 1 file changed, 1 insertion(+), 11 deletions(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index 410960d..37ddca2 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -104,17 +104,7 @@ fi - - ldconfig_paths() - { -- local a i -- declare -A a -- for i in $( -- ldconfig -pN 2>/dev/null | grep -F '=>' | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | while read a b c d; do -- d=${d%/*} -- printf "%s\n" "$d"; -- done -- ); do -- a["$i"]=1; -- done; -- printf "%s\n" ${!a[@]} -+ ldconfig -pN 2>/dev/null | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | sed -n 's,.* => \(.*\)/.*,\1,p' | sort | uniq - } - - # Detect lib paths diff --git a/0082-90kernel-modules-update-for-xhci-module-split-in-ker.patch b/0082-90kernel-modules-update-for-xhci-module-split-in-ker.patch deleted file mode 100644 index c1d8204..0000000 --- a/0082-90kernel-modules-update-for-xhci-module-split-in-ker.patch +++ /dev/null @@ -1,35 +0,0 @@ -From eb8f202ed033ed64dde4ce754f78c2f5683c9224 Mon Sep 17 00:00:00 2001 -From: Thomas Backlund -Date: Sun, 21 Dec 2014 12:44:30 +0159 -Subject: [PATCH] 90kernel-modules: update for xhci module split in kernel 3.18 - -As reported in https://bugs.mageia.org/show_bug.cgi?id=14799 - -the xhci module got splitted up in upstream linux merged during -3.18 release cycle: - ->From 29e409f0f7613f9fd2235e41f0fa33e48e94544e Mon Sep 17 00:00:00 2001 -From: Andrew Bresticker -Date: Fri, 3 Oct 2014 11:35:29 +0300 -Subject: xhci: Allow xHCI drivers to be built as separate modules - -so we need to adjust 90kernel-modules accordingly. - -Signed-off-by: Thomas Backlund ---- - modules.d/90kernel-modules/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index 1a8fcff..5e292b0 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -39,7 +39,7 @@ installkernel() { - ehci-hcd ehci-pci ehci-platform \ - ohci-hcd ohci-pci \ - uhci-hcd \ -- xhci-hcd -+ xhci-hcd xhci-pci xhci-plat-hcd - - instmods yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \ - atkbd i8042 usbhid hid-apple hid-sunplus hid-cherry hid-logitech \ diff --git a/dracut.spec b/dracut.spec index 21d0314..244a7e7 100644 --- a/dracut.spec +++ b/dracut.spec @@ -10,8 +10,8 @@ %endif Name: dracut -Version: 040 -Release: 83.git20150108%{?dist} +Version: 041 +Release: 1%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} || 0%{?rhel} @@ -30,88 +30,6 @@ URL: https://dracut.wiki.kernel.org/ # Source can be generated by # http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{version};sf=tgz Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.xz -Patch1: 0001-shutdown-shutdown.sh-loop-over-shutdown-hooks-until-.patch -Patch2: 0002-NEWS-add-040-entry.patch -Patch3: 0003-fix-gzip-compress-then-it-not-supports-rsyncable-opt.patch -Patch4: 0004-ifcfg-write-ifcfg-only-write-DEVICE-for-non-kernel-n.patch -Patch5: 0005-Fix-location-of-dracut-install-for-local-mode.patch -Patch6: 0006-dracut-functions.sh-fixup-for-34a1ec6-for-non-local-.patch -Patch7: 0007-shutdown.sh-correct-return-code-of-_check_shutdown.patch -Patch8: 0008-kernel-modules-Drop-explicit-modules-that-are-found-.patch -Patch9: 0009-40network-Copy-the-customize-dhcp-config.patch -Patch10: 0010-dracut.sh-don-t-check-gzip-for-rsyncable-if-pigz-is-.patch -Patch11: 0011-systemd-add-90-vconsole.rules.patch -Patch12: 0012-base-Set-udevd-log-level-via-environment-var-to-cove.patch -Patch13: 0013-multipath-add-rd.multipath-0-option.patch -Patch14: 0014-TODO-update.patch -Patch15: 0015-dracut-functions.sh-check-if-dinfo-is-a-function.patch -Patch16: 0016-90multipath-Install-libgcc_s-library.patch -Patch17: 0017-90multipath-Load-device_handler-modules-early-during.patch -Patch18: 0018-90multipath-install-dracut-specific-service-file.patch -Patch19: 0019-multipath-multipathd.service-add-more-Conditions.patch -Patch20: 0020-dmsquash-live-do-not-abort-if-user-pressed-ESC-on-ch.patch -Patch21: 0021-fips-add-libfreeblpriv3.so-and-libfreeblpriv3.chk.patch -Patch22: 0022-base-init.sh-ignore-exclamation-mark-for-kmod-static.patch -Patch23: 0023-dracut.sh-add-tmpfilesdir-to-install-files-to-usr-li.patch -Patch24: 0024-do-not-symlink-var-log-to-run-log.patch -Patch25: 0025-cms-cms-write-ifcfg.sh-turn-SUBCHANNELS-into-lowerca.patch -Patch26: 0026-40network-Fix-the-syntax-to-correct-the-judgment-sen.patch -Patch27: 0027-initrd-release-move-from-etc-to-usr-lib.patch -Patch28: 0028-dracut.conf.d-fedora.conf.example-turn-on-early_micr.patch -Patch29: 0029-Fixed-the-dracut-shutdown.service.patch -Patch30: 0030-dmsquash-live-setup-the-images-in-run-initramfs.patch -Patch31: 0031-mkinitrd-suse-Update-to-sles12-SUSE-state.patch -Patch32: 0032-systemd-always-tries-to-load-autofs4.patch -Patch33: 0033-Fixup-mdraid-setup.patch -Patch34: 0034-95udev-rules-Include-correct-sg3_utils-rules.patch -Patch35: 0035-90multipath-install-correct-multipath-rules.patch -Patch36: 0036-95iscsi-Autodetect-iSCSI-firmware.patch -Patch37: 0037-95iscsi-Install-libgcc_s-library.patch -Patch38: 0038-95iscsi-Set-correct-iscsi_started-value-for-iSCSI-fi.patch -Patch39: 0039-95iscsi-strip-one-set-of-quotes-when-calling-initque.patch -Patch40: 0040-95iscsi-Fixup-bnx2i-offload-booting.patch -Patch41: 0041-95iscsi-More-empty-cmdline-fixes.patch -Patch42: 0042-95iscsi-generate-commandline-for-software-iscsi.patch -Patch43: 0043-iscsi-iscsi.initiator-and-others-can-and-must-only-s.patch -Patch44: 0044-Implement-rd.timeout-to-modify-the-device-timeout.patch -Patch45: 0045-Do-not-call-lvm-for-non-LVM-device-mapper-devices.patch -Patch46: 0046-Print-stored-dracut-commandline-during-initramfs-bui.patch -Patch47: 0047-Align-dev_unit_name-with-systemd-s-function.patch -Patch48: 0048-Generate-fallback-mount-unit-for-root-filesystem.patch -Patch49: 0049-99base-warn-on-invalid-command-for-initqueue.patch -Patch50: 0050-Handle-module-alias-properly.patch -Patch51: 0051-99base-Increase-initqueue-timeout-in-non-systemd-cas.patch -Patch52: 0052-90lvm-Install-dm-snapshot-module.patch -Patch53: 0053-Check-for-logfile-logfile-option-and-create-it-if-ne.patch -Patch54: 0054-dracut.sh-Avoid-duplicate-devices-in-host_devs.patch -Patch55: 0055-dracut.sh-Fix-UUID-fstab-parsing-in-case-mount-optio.patch -Patch56: 0056-dracut.usage.asc-Remove-distro-specific-help-from-ma.patch -Patch57: 0057-nfs-Add-ip-.-and-root-nfs.-parameters-to-internal-dr.patch -Patch58: 0058-95iscsi-parse-output-from-iscsiadm-correctly.patch -Patch59: 0059-dracut-Do-not-stop-installing-drivers-if-one-fails.patch -Patch60: 0060-95fcoe-update-fcoe-interface-check.patch -Patch61: 0061-95fcoe-Store-current-configuration-in-dracut-cmdline.patch -Patch62: 0062-95fcoe-skip-VLAN-devices-in-fcoe-up.patch -Patch63: 0063-95fcoe-start-lldpad-separately.patch -Patch64: 0064-Enhance-suse.conf-and-debug-module-example-with-SUSE.patch -Patch65: 0065-40network-add-missing-_arch-variable-declaration.patch -Patch66: 0066-99base-Add-chown-binary.patch -Patch67: 0067-90kernel-modules-install-scsi_dh_alua.patch -Patch68: 0068-Fix-non-export-of-journal-dev-boot-options.patch -Patch69: 0069-Also-export-root-boot-param-for-hostonly-cmdline-cas.patch -Patch70: 0070-Don-t-create-lots-of-empty-cmdline-files-for-hostonl.patch -Patch71: 0071-95rootfs-block-Correctly-terminate-commandline-param.patch -Patch72: 0072-dracut-nbd-Only-complain-of-missing-binary-in-hoston.patch -Patch73: 0073-dracut-functions.sh-for-module-handling-strip-all-.k.patch -Patch74: 0074-Revert-95rootfs-block-Correctly-terminate-commandlin.patch -Patch75: 0075-resume-make-use-of-systemd-hibernate-resume-if-exist.patch -Patch76: 0076-systemd-add-systemd-journald-audit.socket.patch -Patch77: 0077-dracut-Don-t-fail-at-copying-files-when-including-di.patch -Patch78: 0078-qemu-add-virtio_rng-kernel-module.patch -Patch79: 0079-AUTHORS-and-.mailmap-update.patch -Patch80: 0080-Makefile-add-Wformat-to-CFLAGS.patch -Patch81: 0081-dracut-functions.sh-avoid-tokenizing-ldconfig-output.patch -Patch82: 0082-90kernel-modules-update-for-xhci-module-split-in-ker.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt @@ -560,6 +478,9 @@ rm -rf -- $RPM_BUILD_ROOT %endif %changelog +* Sat Jan 31 2015 Harald Hoyer 041-1 +- version 041 + * Thu Jan 08 2015 Harald Hoyer 040-83.git20150108 - git snapshot diff --git a/sources b/sources index b8ba31d..861708e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8d1cdb14a8d9db29c9edf53b957f3cb0 dracut-040.tar.xz +0ea48f52285093652081603e333d6cd3 dracut-041.tar.xz