diff --git a/0001-kernel-modules-Fix-storage-module-selection-for-sdhc.patch b/0001-kernel-modules-Fix-storage-module-selection-for-sdhc.patch new file mode 100644 index 0000000..efd1688 --- /dev/null +++ b/0001-kernel-modules-Fix-storage-module-selection-for-sdhc.patch @@ -0,0 +1,52 @@ +From 827ec27a9c36755095dda899eff75cdae78b2120 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Fri, 23 May 2014 11:54:01 +0100 +Subject: [PATCH] kernel-modules: Fix storage module selection for + sdhci/mmc/ahci + +Currently the block driver detection for generic initrd doesn't include +the SD/MMC drivers so we fail to boot generic images on any device using +those platforms as boot devices when using a generic initrd. Add logic +to detect those modules. This primarily fixes embedded ARM devices but +also likely intel tablets/dev boards and enterprise hypervisors that +have the ability to boot from SD. + +Also the ahci_init_controller misses a number of drivers that use the +libahci_platform module for the init so this fixes some missing achi +moduless too. + +Finally it cleans up the ARM storage module hacks that the above now +deals with in a more generic manner. + +Signed-off-by: +--- + modules.d/90kernel-modules/module-setup.sh | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index 2378663..5271438 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -6,7 +6,7 @@ + installkernel() { + if [[ -z $drivers ]]; then + block_module_filter() { +- local _blockfuncs='ahci_init_controller|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect' ++ local _blockfuncs='ahci_platform_get_resources|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect|mmc_add_host|sdhci_pltfm_init' + # subfunctions inherit following FDs + local _merge=8 _side2=9 + function bmf1() { +@@ -51,9 +51,7 @@ installkernel() { + + if [[ "$(uname -p)" == arm* ]]; then + # arm specific modules +- hostonly='' instmods sdhci_esdhc_imx mmci sdhci_tegra mvsdio omap omapdrm \ +- omap_hsmmc panel-tfp410 sdhci_dove ahci_platform pata_imx sata_mv \ +- ehci-tegra mmc_block usb_storage ++ hostonly='' instmods omapdrm panel-tfp410 + fi + + # install virtual machine support +-- +2.2.0 + diff --git a/0011-Correct-paths-for-openSUSE.patch b/0011-Correct-paths-for-openSUSE.patch index 0b31197..d276dee 100644 --- a/0011-Correct-paths-for-openSUSE.patch +++ b/0011-Correct-paths-for-openSUSE.patch @@ -13,11 +13,11 @@ Signed-off-by: Hannes Reinecke modules.d/98systemd/rescue.service | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -Index: dracut-041/dracut.sh -=================================================================== ---- dracut-041.orig/dracut.sh 2015-03-16 17:47:39.671230783 +0100 -+++ dracut-041/dracut.sh 2015-03-16 17:47:45.231540139 +0100 -@@ -809,7 +809,7 @@ +diff --git a/dracut.sh b/dracut.sh +index c4163bc..adf26ad 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -774,7 +774,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) [[ $mdadmconf_l ]] && mdadmconf=$mdadmconf_l [[ $lvmconf_l ]] && lvmconf=$lvmconf_l [[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut @@ -26,11 +26,11 @@ Index: dracut-041/dracut.sh [[ $tmpdir_l ]] && tmpdir="$tmpdir_l" [[ $tmpdir ]] || tmpdir=/var/tmp [[ $INITRD_COMPRESS ]] && compress=$INITRD_COMPRESS -Index: dracut-041/modules.d/98systemd/rescue.service -=================================================================== ---- dracut-041.orig/modules.d/98systemd/rescue.service 2015-01-31 12:54:52.000000000 +0100 -+++ dracut-041/modules.d/98systemd/rescue.service 2015-03-16 17:47:45.235540363 +0100 -@@ -16,7 +16,7 @@ +diff --git a/modules.d/98systemd/rescue.service b/modules.d/98systemd/rescue.service +index edc2461..d80900f 100644 +--- a/modules.d/98systemd/rescue.service ++++ b/modules.d/98systemd/rescue.service +@@ -16,7 +16,7 @@ Environment=HOME=/ Environment=DRACUT_SYSTEMD=1 Environment=NEWROOT=/sysroot WorkingDirectory=/ @@ -39,3 +39,6 @@ Index: dracut-041/modules.d/98systemd/rescue.service ExecStart=-/bin/sh -i -l ExecStopPost=-/bin/rm -f -- /.console_lock ExecStopPost=-/usr/bin/systemctl --fail --no-block default +-- +1.8.4.5 + diff --git a/0012-Check-for-plymouth-lib-directories.patch b/0012-Check-for-plymouth-lib-directories.patch new file mode 100644 index 0000000..80ac9a9 --- /dev/null +++ b/0012-Check-for-plymouth-lib-directories.patch @@ -0,0 +1,45 @@ +From ab0a60b5a9c7c747400f458ae4a632b2d88fe2e1 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Wed, 27 Nov 2013 15:54:00 +0100 +Subject: [PATCH] Check for plymouth lib directories + +SUSE installs plymount files in /usr/lib, not /usr/libexec. +So check for both when including plymouth support. + +Signed-off-by: Hannes Reinecke +--- + modules.d/50plymouth/module-setup.sh | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh +index b818324..86a68fe 100755 +--- a/modules.d/50plymouth/module-setup.sh ++++ b/modules.d/50plymouth/module-setup.sh +@@ -15,12 +15,19 @@ depends() { + + # called by dracut + install() { +- if grep -q nash /usr/libexec/plymouth/plymouth-populate-initrd \ +- || [ ! -x /usr/libexec/plymouth/plymouth-populate-initrd ]; then ++ if [ -d /usr/libexec/plymouth ] ; then ++ _plymouth=/usr/libexec/plymouth; ++ elif [ -d /usr/lib/plymouth ] ; then ++ _plymouth=/usr/lib/plymouth ++ fi ++ if [ -n "$_plymouth" ] ; then ++ if grep -q nash ${_plymouth}/plymouth-populate-initrd \ ++ || [ ! -x ${_plymouth}/plymouth-populate-initrd ]; then + . "$moddir"/plymouth-populate-initrd.sh +- else +- PLYMOUTH_POPULATE_SOURCE_FUNCTIONS="$dracutfunctions" \ +- /usr/libexec/plymouth/plymouth-populate-initrd -t "$initdir" ++ else ++ PLYMOUTH_POPULATE_SOURCE_FUNCTIONS="$dracutfunctions" \ ++ ${_plymouth}/plymouth-populate-initrd -t "$initdir" ++ fi + fi + + inst_hook emergency 50 "$moddir"/plymouth-emergency.sh +-- +1.8.1.4 + diff --git a/0013-mkinitrd-suse-do-not-update-bootloader-if-no-kernel-.patch b/0013-mkinitrd-suse-do-not-update-bootloader-if-no-kernel-.patch new file mode 100644 index 0000000..98305d8 --- /dev/null +++ b/0013-mkinitrd-suse-do-not-update-bootloader-if-no-kernel-.patch @@ -0,0 +1,34 @@ +From 6e2410d3e9403b030125e8d7f523de341466d658 Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Mon, 7 Apr 2014 16:23:49 +0200 +Subject: [PATCH] mkinitrd-suse: do not update bootloader if no kernel was + found + +When no kernel is found mkinitrd-suse should exit without updating the +bootloader. + +References: bnc#858268 + +Signed-off-by: Hannes Reinecke +--- + mkinitrd-suse.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/mkinitrd-suse.sh b/mkinitrd-suse.sh +index d20270a..b31ea36 100755 +--- a/mkinitrd-suse.sh ++++ b/mkinitrd-suse.sh +@@ -291,7 +291,9 @@ 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 ) +-- +1.8.1.4 + diff --git a/0014-Update-dracut-manpage-for-GRUB-Legacy-and-GRUB2.patch b/0014-Update-dracut-manpage-for-GRUB-Legacy-and-GRUB2.patch new file mode 100644 index 0000000..35064f0 --- /dev/null +++ b/0014-Update-dracut-manpage-for-GRUB-Legacy-and-GRUB2.patch @@ -0,0 +1,30 @@ +From 3607fd4c8a14ec0a1222e7f7903f6f12648367ef Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Tue, 8 Apr 2014 09:06:43 +0200 +Subject: [PATCH] Update dracut manpage for GRUB Legacy and GRUB2 + +Signed-off-by: sfalken@opensuse.org +--- + dracut.usage.asc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/dracut.usage.asc b/dracut.usage.asc +index 6979af6..0787ead 100644 +--- a/dracut.usage.asc ++++ b/dracut.usage.asc +@@ -99,9 +99,9 @@ raid with encryption and LVM on top), as long as you specify the correct + filesystem LABEL or UUID on the kernel command line for your root device, dracut + will find it and boot from it. + +-The kernel command line usually can be configured in _/boot/grub/grub.conf_ or +-_/boot/grub2/grub.cfg_, if grub is your bootloader and it also can be edited in +-the real boot process in the grub menu. ++The kernel command line usually can be configured in _/boot/grub/grub.conf_, ++for GRUB legacy, or _/boot/grub2/grub.cfg_, for GRUB2 if grub is your ++bootloader and it also can be edited in the real boot process in the grub menu. + + The kernel command line can also be provided by the dhcp server with the + root-path option. See <>. +-- +1.8.1.4 + diff --git a/0015-40network-replace-dhclient-with-wickedd-dhcp-supplic.patch b/0015-40network-replace-dhclient-with-wickedd-dhcp-supplic.patch index 4d01b3f..3158ad7 100644 --- a/0015-40network-replace-dhclient-with-wickedd-dhcp-supplic.patch +++ b/0015-40network-replace-dhclient-with-wickedd-dhcp-supplic.patch @@ -20,12 +20,15 @@ Signed-off-by: Hannes Reinecke delete mode 100644 modules.d/40network/dhclient.conf delete mode 100755 modules.d/40network/kill-dhclient.sh -Index: dracut-041/modules.d/40network/dhclient-script.sh -=================================================================== ---- dracut-041.orig/modules.d/40network/dhclient-script.sh 2015-03-17 12:02:54.894703848 +0100 -+++ /dev/null 1970-01-01 00:00:00.000000000 +0000 -@@ -1,154 +0,0 @@ +diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh +deleted file mode 100755 +index ba05250..0000000 +--- a/modules.d/40network/dhclient-script.sh ++++ /dev/null +@@ -1,156 +0,0 @@ -#!/bin/sh +-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +-# ex: ts=8 sw=4 sts=4 et filetype=sh - -PATH=/usr/sbin:/usr/bin:/sbin:/bin - @@ -70,7 +73,7 @@ Index: dracut-041/modules.d/40network/dhclient-script.sh - valid_lft ${lease_time} preferred_lft ${lease_time} \ - dev $netif - -- [ -n "$gw" ] && echo ip route replace default via $gw dev $netif > /tmp/net.$netif.gw +- [ -n "$gw" ] && echo ip route add default via $gw dev $netif > /tmp/net.$netif.gw - - [ -n "${search}${domain}" ] && echo "search $search $domain" > /tmp/net.$netif.resolv.conf - if [ -n "$namesrv" ] ; then @@ -179,19 +182,20 @@ Index: dracut-041/modules.d/40network/dhclient-script.sh -esac - -exit 0 -Index: dracut-041/modules.d/40network/dhclient.conf -=================================================================== ---- dracut-041.orig/modules.d/40network/dhclient.conf 2015-01-31 12:54:52.000000000 +0100 -+++ /dev/null 1970-01-01 00:00:00.000000000 +0000 +diff --git a/modules.d/40network/dhclient.conf b/modules.d/40network/dhclient.conf +deleted file mode 100644 +index dbf5882..0000000 +--- a/modules.d/40network/dhclient.conf ++++ /dev/null @@ -1,3 +0,0 @@ -request subnet-mask, broadcast-address, time-offset, routers, - domain-name, domain-name-servers, domain-search, host-name, - root-path, interface-mtu; -Index: dracut-041/modules.d/40network/ifup.sh -=================================================================== ---- dracut-041.orig/modules.d/40network/ifup.sh 2015-01-31 12:54:52.000000000 +0100 -+++ dracut-041/modules.d/40network/ifup.sh 2015-03-17 12:27:22.361149708 +0100 -@@ -86,21 +86,106 @@ +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 7740be5..99d2ed4 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -88,21 +88,106 @@ else [ -e /tmp/net.$(cat /sys/class/net/$netif/address).did-setup ] && exit 0 fi @@ -303,7 +307,7 @@ Index: dracut-041/modules.d/40network/ifup.sh } load_ipv6() { -@@ -226,8 +311,6 @@ +@@ -226,8 +311,6 @@ if [ -e /tmp/team.info ]; then fi fi @@ -312,12 +316,15 @@ Index: dracut-041/modules.d/40network/ifup.sh if [ -e /tmp/bridge.info ]; then . /tmp/bridge.info # start bridge if necessary -Index: dracut-041/modules.d/40network/kill-dhclient.sh -=================================================================== ---- dracut-041.orig/modules.d/40network/kill-dhclient.sh 2015-03-17 12:02:54.906704510 +0100 -+++ /dev/null 1970-01-01 00:00:00.000000000 +0000 -@@ -1,15 +0,0 @@ +diff --git a/modules.d/40network/kill-dhclient.sh b/modules.d/40network/kill-dhclient.sh +deleted file mode 100755 +index 78060f5..0000000 +--- a/modules.d/40network/kill-dhclient.sh ++++ /dev/null +@@ -1,17 +0,0 @@ -#!/bin/sh +-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +-# ex: ts=8 sw=4 sts=4 et filetype=sh - -for f in /tmp/dhclient.*.pid; do - [ -e $f ] || continue @@ -332,12 +339,13 @@ Index: dracut-041/modules.d/40network/kill-dhclient.sh - read PID < $f; - kill -9 $PID >/dev/null 2>&1 -done -Index: dracut-041/modules.d/40network/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/40network/module-setup.sh 2015-03-17 12:02:55.006710127 +0100 -+++ dracut-041/modules.d/40network/module-setup.sh 2015-03-17 12:37:51.868466193 +0100 -@@ -1,10 +1,13 @@ - #!/bin/bash +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index 1df4174..b54f873 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -2,11 +2,14 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh +WICKEDD_DHCP_PATH="/usr/lib/wicked/bin" +WICKED_EXT_PATH="/etc/wicked/extensions" @@ -351,7 +359,7 @@ Index: dracut-041/modules.d/40network/module-setup.sh return 255 } -@@ -71,17 +74,18 @@ +@@ -72,16 +75,18 @@ installkernel() { # called by dracut install() { local _arch _i _dir @@ -369,12 +377,11 @@ Index: dracut-041/modules.d/40network/module-setup.sh 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 -H "/etc/dhclient.conf" -- cat "$moddir/dhclient.conf" >> "${initdir}/etc/dhclient.conf" +- inst_simple "$moddir/dhclient.conf" "/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" -@@ -92,7 +96,6 @@ +@@ -92,7 +97,6 @@ install() { inst_hook cmdline 97 "$moddir/parse-bridge.sh" inst_hook cmdline 98 "$moddir/parse-ip-opts.sh" inst_hook cmdline 99 "$moddir/parse-ifname.sh" @@ -382,3 +389,6 @@ Index: dracut-041/modules.d/40network/module-setup.sh _arch=$(uname -m) +-- +1.8.4.5 + diff --git a/0016-Add-new-s390x-specific-rule-files.patch b/0016-Add-new-s390x-specific-rule-files.patch index 383fd3f..8b45a6b 100644 --- a/0016-Add-new-s390x-specific-rule-files.patch +++ b/0016-Add-new-s390x-specific-rule-files.patch @@ -15,11 +15,11 @@ Signed-off-by: Hannes Reinecke modules.d/95zfcp_rules/module-setup.sh | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) -Index: dracut-041/modules.d/95dasd_rules/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/95dasd_rules/module-setup.sh 2015-01-31 12:54:52.000000000 +0100 -+++ dracut-041/modules.d/95dasd_rules/module-setup.sh 2015-03-17 12:38:30.046605162 +0100 -@@ -4,7 +4,7 @@ +diff --git a/modules.d/95dasd_rules/module-setup.sh b/modules.d/95dasd_rules/module-setup.sh +index 51c315d..451fc25 100755 +--- a/modules.d/95dasd_rules/module-setup.sh ++++ b/modules.d/95dasd_rules/module-setup.sh +@@ -6,7 +6,7 @@ check() { local _arch=$(uname -m) [ "$_arch" = "s390" -o "$_arch" = "s390x" ] || return 1 @@ -28,7 +28,7 @@ Index: dracut-041/modules.d/95dasd_rules/module-setup.sh return 0 } -@@ -16,10 +16,10 @@ +@@ -18,10 +18,10 @@ depends() { # called by dracut install() { @@ -40,14 +40,17 @@ Index: dracut-041/modules.d/95dasd_rules/module-setup.sh fi inst_rules 59-dasd.rules } -Index: dracut-041/modules.d/95zfcp_rules/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/95zfcp_rules/module-setup.sh 2015-01-31 12:54:52.000000000 +0100 -+++ dracut-041/modules.d/95zfcp_rules/module-setup.sh 2015-03-17 12:38:30.050605397 +0100 -@@ -19,5 +19,6 @@ +diff --git a/modules.d/95zfcp_rules/module-setup.sh b/modules.d/95zfcp_rules/module-setup.sh +index d9879cb..849645c 100755 +--- a/modules.d/95zfcp_rules/module-setup.sh ++++ b/modules.d/95zfcp_rules/module-setup.sh +@@ -21,5 +21,6 @@ install() { inst_hook cmdline 30 "$moddir/parse-zfcp.sh" if [[ $hostonly ]] ; then inst_rules_wildcard 51-zfcp-*.rules + inst_rules_wildcard 41-s390x-zfcp-*.rules fi } +-- +1.8.1.4 + diff --git a/0017-45ifcfg-use-distro-specific-scripts.patch b/0017-45ifcfg-use-distro-specific-scripts.patch index e21d43a..ab3610f 100644 --- a/0017-45ifcfg-use-distro-specific-scripts.patch +++ b/0017-45ifcfg-use-distro-specific-scripts.patch @@ -16,11 +16,11 @@ Modified-by: Thomas Rennigner modules.d/45ifcfg/module-setup.sh | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) -Index: dracut-041/modules.d/40network/ifup.sh -=================================================================== ---- dracut-041.orig/modules.d/40network/ifup.sh 2015-03-17 12:38:28.586523363 +0100 -+++ dracut-041/modules.d/40network/ifup.sh 2015-03-17 12:38:48.851658757 +0100 -@@ -184,6 +184,7 @@ +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 99d2ed4..934c61e 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -186,6 +186,7 @@ do_dhcp() { $dhclient --test $netif > /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1} dhcp_apply $1 || return $? @@ -28,11 +28,11 @@ Index: dracut-041/modules.d/40network/ifup.sh echo $netif > /tmp/setup_net_${netif}.ok return 0 } -Index: dracut-041/modules.d/45ifcfg/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/45ifcfg/module-setup.sh 2015-01-31 12:54:52.000000000 +0100 -+++ dracut-041/modules.d/45ifcfg/module-setup.sh 2015-03-17 12:38:48.851658757 +0100 -@@ -2,7 +2,13 @@ +diff --git a/modules.d/45ifcfg/module-setup.sh b/modules.d/45ifcfg/module-setup.sh +index c407f45..164a580 100755 +--- a/modules.d/45ifcfg/module-setup.sh ++++ b/modules.d/45ifcfg/module-setup.sh +@@ -4,7 +4,13 @@ # called by dracut check() { @@ -47,3 +47,6 @@ Index: dracut-041/modules.d/45ifcfg/module-setup.sh return 255 } +-- +1.8.4.5 + diff --git a/0018-mkinitrd-suse-Fix-whitespaces-when-adding-drivers.patch b/0018-mkinitrd-suse-Fix-whitespaces-when-adding-drivers.patch new file mode 100644 index 0000000..15b5b7b --- /dev/null +++ b/0018-mkinitrd-suse-Fix-whitespaces-when-adding-drivers.patch @@ -0,0 +1,94 @@ +From 942274be37437eefad4ebebae40af43d7bd336b6 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Tue, 8 Apr 2014 08:49:53 +0200 +Subject: [PATCH] mkinitrd-suse: Fix whitespaces when adding drivers + +Signed-off-by: Hannes Reinecke +--- + mkinitrd-suse.sh | 49 +++++++++++++++++++++++++------------------------ + 1 file changed, 25 insertions(+), 24 deletions(-) + +diff --git a/mkinitrd-suse.sh b/mkinitrd-suse.sh +index b31ea36..1c2634f 100755 +--- a/mkinitrd-suse.sh ++++ b/mkinitrd-suse.sh +@@ -70,10 +70,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 +@@ -310,11 +307,10 @@ 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 " ++echo "Creating: target|kernel|dracut args " + for ((i=0 ; $i<${#targets[@]} ; i++)); do + + if [[ $img_vers ]];then +@@ -324,28 +320,33 @@ 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:]])} ++ + # 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 ++ echo "$target|$kernel|$dracut_args_all" ++ # Duplicate code: --add-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 --add-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 --add-drivers "${modules_all}" "$target" "$kernel" ++ else + $dracut_cmd $dracut_args "$target" "$kernel" +- fi ++ fi + fi + done + +-- +1.8.1.4 + diff --git a/0019-40network-Fix-race-condition-when-wait-for-networks.patch b/0019-40network-Fix-race-condition-when-wait-for-networks.patch index d270fe2..92ac312 100644 --- a/0019-40network-Fix-race-condition-when-wait-for-networks.patch +++ b/0019-40network-Fix-race-condition-when-wait-for-networks.patch @@ -17,11 +17,11 @@ Signed-off-by: Hannes Reinecke modules.d/40network/net-genrules.sh | 3 +++ 1 file changed, 3 insertions(+) -Index: dracut-041/modules.d/40network/net-genrules.sh -=================================================================== ---- dracut-041.orig/modules.d/40network/net-genrules.sh 2015-01-31 12:54:52.000000000 +0100 -+++ dracut-041/modules.d/40network/net-genrules.sh 2015-03-17 12:38:55.044006007 +0100 -@@ -96,6 +96,9 @@ +diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh +index af2f09c..6ec9239 100755 +--- a/modules.d/40network/net-genrules.sh ++++ b/modules.d/40network/net-genrules.sh +@@ -98,6 +98,9 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh cond='ACTION=="add", SUBSYSTEM=="net"' # if you change the name of "91-default-net.rules", also change modules.d/80cms/cmssetup.sh echo "$cond, $runcmd" > /etc/udev/rules.d/91-default-net.rules @@ -31,3 +31,6 @@ Index: dracut-041/modules.d/40network/net-genrules.sh fi # if you change the name of "90-net.rules", also change modules.d/80cms/cmssetup.sh +-- +1.8.1.4 + diff --git a/0020-00warpclock-Set-correct-timezone.patch b/0020-00warpclock-Set-correct-timezone.patch index ac8f8aa..09facee 100644 --- a/0020-00warpclock-Set-correct-timezone.patch +++ b/0020-00warpclock-Set-correct-timezone.patch @@ -15,23 +15,19 @@ Signed-off-by: Hannes Reinecke create mode 100755 modules.d/00warpclock/module-setup.sh create mode 100755 modules.d/00warpclock/warpclock.sh -Index: dracut-041/modules.d/00warpclock/module-setup.sh -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ dracut-041/modules.d/00warpclock/module-setup.sh 2015-03-24 15:18:51.564135423 +0100 -@@ -0,0 +1,27 @@ +diff --git a/modules.d/00warpclock/module-setup.sh b/modules.d/00warpclock/module-setup.sh +new file mode 100755 +index 0000000..4d18795 +--- /dev/null ++++ b/modules.d/00warpclock/module-setup.sh +@@ -0,0 +1,22 @@ +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +# called by dracut +check() { -+ # hwclock does not exist on S390(x), bail out silently then -+ local _arch=$(uname -m) -+ [ "$_arch" = "s390" -o "$_arch" = "s390x" ] && return 1 -+ -+ [ -e /etc/localtime -a -e /etc/adjtime ] || return 1 -+ require_binaries /sbin/hwclock || return 1 ++ [ -e /etc/localtime -a -e /etc/adjtime ] +} + +# called by dracut @@ -47,10 +43,11 @@ Index: dracut-041/modules.d/00warpclock/module-setup.sh + inst_hook pre-trigger 00 "$moddir/warpclock.sh" + inst /sbin/hwclock +} -Index: dracut-041/modules.d/00warpclock/warpclock.sh -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ dracut-041/modules.d/00warpclock/warpclock.sh 2015-03-24 15:07:47.762852198 +0100 +diff --git a/modules.d/00warpclock/warpclock.sh b/modules.d/00warpclock/warpclock.sh +new file mode 100755 +index 0000000..f64818c +--- /dev/null ++++ b/modules.d/00warpclock/warpclock.sh @@ -0,0 +1,9 @@ +#!/bin/sh + @@ -61,3 +58,6 @@ Index: dracut-041/modules.d/00warpclock/warpclock.sh + fi + done < /etc/adjtime +fi +-- +1.8.1.4 + diff --git a/0022-95udev-rules-add-persistent-network-rule.patch b/0022-95udev-rules-add-persistent-network-rule.patch new file mode 100644 index 0000000..05cb207 --- /dev/null +++ b/0022-95udev-rules-add-persistent-network-rule.patch @@ -0,0 +1,29 @@ +From 577e9e8a0d5e060e14ac1caef28201bfa208275c Mon Sep 17 00:00:00 2001 +From: Robert Milasan +Date: Tue, 8 Apr 2014 08:54:42 +0200 +Subject: [PATCH] 95udev-rules: add persistent network rule + +Add support for 70-persistent-net.rules in dracut. + +References: bnc#868375 + +Signed-off-by: Hannes Reinecke +--- + 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 fab4ffc..41985df 100755 +--- a/modules.d/95udev-rules/module-setup.sh ++++ b/modules.d/95udev-rules/module-setup.sh +@@ -32,6 +32,7 @@ install() { + 60-pcmcia.rules \ + 50-udev.rules 95-late.rules \ + 50-firmware.rules \ ++ 70-persistent-net.rules \ + 59-scsi-sg3_utils.rules \ + 75-net-description.rules \ + 80-net-name-slot.rules 80-net-setup-link.rules \ +-- +1.8.4.5 + diff --git a/0023-systemd-always-tries-to-load-autofs4.patch b/0023-systemd-always-tries-to-load-autofs4.patch new file mode 100644 index 0000000..67a2e9c --- /dev/null +++ b/0023-systemd-always-tries-to-load-autofs4.patch @@ -0,0 +1,32 @@ +From e7fce3b5ce42ffe1184d5d23e5ed02325af243bb Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Wed, 9 Apr 2014 14:10:57 +0200 +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 cf1b2e7..4516b9a 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -20,7 +20,7 @@ depends() { + } + + installkernel() { +- instmods autofs4 ipv6 ++ hostonly='' instmods autofs4 ipv6 + } + + # called by dracut +-- +1.8.4.5 + diff --git a/0024-Fixup-mdraid-setup.patch b/0024-Fixup-mdraid-setup.patch new file mode 100644 index 0000000..80afc25 --- /dev/null +++ b/0024-Fixup-mdraid-setup.patch @@ -0,0 +1,31 @@ +From 8e920171da42a1c4371db94e4d4fb75f3f261d66 Mon Sep 17 00:00:00 2001 +From: NeilBrown +Date: Wed, 9 Apr 2014 14:14:03 +0200 +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 +--- + 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 81c94f2..4963537 100755 +--- a/modules.d/90mdraid/module-setup.sh ++++ b/modules.d/90mdraid/module-setup.sh +@@ -88,7 +88,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 + +-- +1.8.4.5 + diff --git a/0025-95udev-rules-Add-59-scsi-sg_utils.rules.patch b/0025-95udev-rules-Add-59-scsi-sg_utils.rules.patch new file mode 100644 index 0000000..a930a4f --- /dev/null +++ b/0025-95udev-rules-Add-59-scsi-sg_utils.rules.patch @@ -0,0 +1,31 @@ +From fdd30d0b8d336c29489d8cd7b768e16e3c88c014 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Tue, 8 Apr 2014 09:51:14 +0200 +Subject: [PATCH] 95udev-rules: Add 59-scsi-sg_utils.rules + +Add udev rules from sg3_utils to provide persistent device links. + +References: bnc#872478 + +Signed-off-by: Hannes Reinecke +--- + modules.d/95udev-rules/module-setup.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh +index 41985df..e5c0a7a 100755 +--- a/modules.d/95udev-rules/module-setup.sh ++++ b/modules.d/95udev-rules/module-setup.sh +@@ -27,7 +27,8 @@ install() { + exit 1 + fi + +- inst_rules 50-udev-default.rules 60-persistent-storage.rules \ ++ inst_rules 50-udev-default.rules 59-scsi-sg3_utils.rules \ ++ 60-persistent-storage.rules \ + 61-persistent-storage-edd.rules 80-drivers.rules 95-udev-late.rules \ + 60-pcmcia.rules \ + 50-udev.rules 95-late.rules \ +-- +1.8.4.5 + diff --git a/0026-90multipath-add-67-kpartx-compat.rules.patch b/0026-90multipath-add-67-kpartx-compat.rules.patch new file mode 100644 index 0000000..5d87d72 --- /dev/null +++ b/0026-90multipath-add-67-kpartx-compat.rules.patch @@ -0,0 +1,31 @@ +From 8b76d2e8d7f2dbc6e6020c5f030a697d8f9005f9 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Wed, 9 Apr 2014 08:07:39 +0200 +Subject: [PATCH] 90multipath: add 67-kpartx-compat.rules + +Dracut needs to install the kpartx compability rules, otherwise +random failures might occur during boot. + +References: bnc#872662 + +Signed-off-by: Hannes Reinecke +--- + modules.d/90multipath/module-setup.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh +index b60cc60..c2bbdb4 100755 +--- a/modules.d/90multipath/module-setup.sh ++++ b/modules.d/90multipath/module-setup.sh +@@ -102,6 +102,7 @@ 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 62-multipath.rules 65-multipath.rules \ ++ 66-kpartx.rules 67-kpartx-compat.rules + } + +-- +1.8.1.4 + diff --git a/0027-90multipath-install-dracut-specific-service-file.patch b/0027-90multipath-install-dracut-specific-service-file.patch new file mode 100644 index 0000000..099685b --- /dev/null +++ b/0027-90multipath-install-dracut-specific-service-file.patch @@ -0,0 +1,61 @@ +From db1065791dbcad5325e4c2732dc70d0334decc25 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Tue, 8 Apr 2014 10:04:41 +0200 +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 +--- + modules.d/90multipath/module-setup.sh | 3 +-- + modules.d/90multipath/multipathd.service | 15 +++++++++++++++ + 2 files changed, 16 insertions(+), 2 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 c2bbdb4..9715851 100755 +--- a/modules.d/90multipath/module-setup.sh ++++ b/modules.d/90multipath/module-setup.sh +@@ -91,8 +91,7 @@ install() { + inst_libdir_file "libmultipath*" "multipath/*" + + if dracut_module_included "systemd"; then +- inst_multiple \ +- $systemdsystemunitdir/multipathd.service ++ inst_simple "${moddir}/multipathd.service" "${systemdsystemunitdir}/multipathd.service" + mkdir -p "${initdir}${systemdsystemconfdir}/sysinit.target.wants" + ln -rfs "${initdir}${systemdsystemunitdir}/multipathd.service" "${initdir}${systemdsystemconfdir}/sysinit.target.wants/multipathd.service" + else +diff --git a/modules.d/90multipath/multipathd.service b/modules.d/90multipath/multipathd.service +new file mode 100644 +index 0000000..e9318f5 +--- /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=forking ++ExecStartPre=/sbin/modprobe dm-multipath ++ExecStart=/sbin/multipathd ++ExecReload=/sbin/multipathd reconfigure ++ExecStop=/sbin/multipathd shutdown ++ ++[Install] ++WantedBy=sysinit.target +-- +1.8.4.5 + diff --git a/0028-95udev-rules-Include-correct-sg3_utils-rules.patch b/0028-95udev-rules-Include-correct-sg3_utils-rules.patch new file mode 100644 index 0000000..43fae07 --- /dev/null +++ b/0028-95udev-rules-Include-correct-sg3_utils-rules.patch @@ -0,0 +1,33 @@ +From 6ae2f2f1d27ffde3bc70eeaa3334fda8f178adf7 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Fri, 11 Apr 2014 13:00:58 +0200 +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 +--- + modules.d/95udev-rules/module-setup.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh +index e5c0a7a..059ad0d 100755 +--- a/modules.d/95udev-rules/module-setup.sh ++++ b/modules.d/95udev-rules/module-setup.sh +@@ -27,7 +27,8 @@ install() { + exit 1 + fi + +- inst_rules 50-udev-default.rules 59-scsi-sg3_utils.rules \ ++ inst_rules 50-udev-default.rules \ ++ 55-scsi-sg3_id.rules 58-scsi-sg3_symlink.rules \ + 60-persistent-storage.rules \ + 61-persistent-storage-edd.rules 80-drivers.rules 95-udev-late.rules \ + 60-pcmcia.rules \ +-- +1.8.4.5 + diff --git a/0029-90multipath-install-correct-multipath-rules.patch b/0029-90multipath-install-correct-multipath-rules.patch new file mode 100644 index 0000000..3d37731 --- /dev/null +++ b/0029-90multipath-install-correct-multipath-rules.patch @@ -0,0 +1,31 @@ +From 78dc7fe3690051c714e37067f3d9d13ed7aac976 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Fri, 11 Apr 2014 13:02:56 +0200 +Subject: [PATCH] 90multipath: install correct multipath rules + +The multipath rule got renamed to 56-multipath.rules, and +the 6*-multipath.rules were never provided by SLES. + +References: bnc#873151 + +Signed-off-by: Hannes Reinecke +--- + modules.d/90multipath/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh +index 9715851..508241e 100755 +--- a/modules.d/90multipath/module-setup.sh ++++ b/modules.d/90multipath/module-setup.sh +@@ -101,7 +101,7 @@ install() { + + inst_hook cleanup 80 "$moddir/multipathd-needshutdown.sh" + +- inst_rules 40-multipath.rules 62-multipath.rules 65-multipath.rules \ ++ inst_rules 56-multipath.rules \ + 66-kpartx.rules 67-kpartx-compat.rules + } + +-- +1.8.1.4 + diff --git a/0030-95iscsi-Autodetect-iSCSI-firmware.patch b/0030-95iscsi-Autodetect-iSCSI-firmware.patch new file mode 100644 index 0000000..303fe73 --- /dev/null +++ b/0030-95iscsi-Autodetect-iSCSI-firmware.patch @@ -0,0 +1,47 @@ +From 096545d4d6a2c5bc142b4b924986307607d27469 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Mon, 5 May 2014 08:32:16 +0200 +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. + +Signed-off-by: Pavel Wieczorkiewicz +Signed-off-by: Hannes Reinecke +--- + modules.d/95iscsi/module-setup.sh | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index 1b0f292..97e6e81 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -39,6 +39,22 @@ depends() { + installkernel() { + local _arch=$(uname -m) + ++ install_ibft() { ++ # When iBFT / iscsi_boot is detected: ++ # - mark network as mandatory ++ # - specify firmware booting cmdline parameter ++ ++ for d in /sys/firmware/* ; do ++ if [ -d ${d}/initiator ] ; then ++ echo "rd.neednet=1" >> "${initdir}/etc/cmdline.d/95iscsi.conf" ++ echo "rd.iscsi.firmware=1" >> "${initdir}/etc/cmdline.d/95iscsi.conf" ++ fi ++ done ++ } ++ ++ # Detect iBFT and perform mandatory steps ++ install_ibft ++ + instmods bnx2i qla4xxx cxgb3i cxgb4i be2iscsi + hostonly="" instmods iscsi_tcp iscsi_ibft crc32c iscsi_boot_sysfs + iscsi_module_filter() { +-- +1.8.4.5 + diff --git a/0031-90multipath-Fixup-service-file-for-booting.patch b/0031-90multipath-Fixup-service-file-for-booting.patch new file mode 100644 index 0000000..b070b4e --- /dev/null +++ b/0031-90multipath-Fixup-service-file-for-booting.patch @@ -0,0 +1,51 @@ +From 4a01af95296882e364499728329a1f5bff05cc93 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Wed, 16 Apr 2014 09:35:28 +0200 +Subject: [PATCH] 90multipath: Fixup service file for booting + +'Type=forking' caused systemd to immediately terminate the +entire process, and not creating any device maps. +So we should be using 'Type=simple' here. + +References: bnc#873686 + +Signed-off-by: Hannes Reinecke +--- + modules.d/90multipath/module-setup.sh | 4 ++-- + modules.d/90multipath/multipathd.service | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh +index 508241e..0149df9 100755 +--- a/modules.d/90multipath/module-setup.sh ++++ b/modules.d/90multipath/module-setup.sh +@@ -92,8 +92,8 @@ install() { + + if dracut_module_included "systemd"; then + inst_simple "${moddir}/multipathd.service" "${systemdsystemunitdir}/multipathd.service" +- mkdir -p "${initdir}${systemdsystemconfdir}/sysinit.target.wants" +- ln -rfs "${initdir}${systemdsystemunitdir}/multipathd.service" "${initdir}${systemdsystemconfdir}/sysinit.target.wants/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 +index e9318f5..44a7b80 100644 +--- a/modules.d/90multipath/multipathd.service ++++ b/modules.d/90multipath/multipathd.service +@@ -5,9 +5,9 @@ DefaultDependencies=no + Conflicts=shutdown.target + + [Service] +-Type=forking ++Type=simple + ExecStartPre=/sbin/modprobe dm-multipath +-ExecStart=/sbin/multipathd ++ExecStart=/sbin/multipathd -s -d + ExecReload=/sbin/multipathd reconfigure + ExecStop=/sbin/multipathd shutdown + +-- +1.8.4.5 + diff --git a/0032-mkinitrd-suse.sh-Use-hostonly-and-hostonly-cmdline-c.patch b/0032-mkinitrd-suse.sh-Use-hostonly-and-hostonly-cmdline-c.patch new file mode 100644 index 0000000..72d9b10 --- /dev/null +++ b/0032-mkinitrd-suse.sh-Use-hostonly-and-hostonly-cmdline-c.patch @@ -0,0 +1,52 @@ +From 410700b1b3a4c0e6c092ce453d1f7ca5aaa8c6af Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Mon, 5 May 2014 08:38:44 +0200 +Subject: [PATCH] mkinitrd-suse.sh: Use '--hostonly' and '--hostonly-cmdline' + correctly + +LVM and other systems might not be working properly as the +--hostonly-cmdline flag has to be active by default. + +References: bnc#874000,bnc#874905,bnc#874363 + +Signed-off-by: Thomas Renninger +--- + mkinitrd-suse.8.asc | 4 +++- + mkinitrd-suse.sh | 6 +++++- + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/mkinitrd-suse.8.asc b/mkinitrd-suse.8.asc +index 9eb8fc9..a181b75 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 +diff --git a/mkinitrd-suse.sh b/mkinitrd-suse.sh +index 1c2634f..c02062d 100755 +--- a/mkinitrd-suse.sh ++++ b/mkinitrd-suse.sh +@@ -297,7 +297,11 @@ targets=( $targets ) + [[ $kernels ]] && kernels=( $kernels ) + + [[ $logfile ]] && dracut_args="${dracut_args} --logfile $logfile" +-[[ $host_only == 1 ]] && dracut_args="${dracut_args} --hostonly" ++if [[ $host_only == 1 ]];then ++ dracut_args="${dracut_args} --hostonly --hostonly-cmdline" ++else ++ dracut_args="${dracut_args} --no-hostonly --no-hostonly-cmdline" ++fi + [[ $force == 1 ]] && dracut_args="${dracut_args} --force" + [[ $dracut_cmdline ]] && dracut_args="${dracut_args} --kernel-cmdline ${dracut_cmdline}" + [ -z "$(type -p update-bootloader)" ] && skip_update_bootloader=1 +-- +1.8.4.5 + diff --git a/0033-95iscsi-Set-correct-iscsi_started-value-for-iSCSI-fi.patch b/0033-95iscsi-Set-correct-iscsi_started-value-for-iSCSI-fi.patch new file mode 100644 index 0000000..e46b098 --- /dev/null +++ b/0033-95iscsi-Set-correct-iscsi_started-value-for-iSCSI-fi.patch @@ -0,0 +1,37 @@ +From 05c2671153524a3487a674fb8798556eaf8bdcaa Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Mon, 5 May 2014 08:48:35 +0200 +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 +--- + 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 4be9d56..9651a20 100755 +--- a/modules.d/95iscsi/parse-iscsiroot.sh ++++ b/modules.d/95iscsi/parse-iscsiroot.sh +@@ -92,8 +92,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 +-- +1.8.4.5 + diff --git a/0034-dracut-Do-not-stop-installing-drivers-if-one-fails.patch b/0034-dracut-Do-not-stop-installing-drivers-if-one-fails.patch new file mode 100644 index 0000000..971d916 --- /dev/null +++ b/0034-dracut-Do-not-stop-installing-drivers-if-one-fails.patch @@ -0,0 +1,48 @@ +From 08f0ec43bed63ccd72b1ea9d20c36d3fe1d91a2e Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Tue, 27 May 2014 14:58:54 +0200 +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 ac22b7e..5b3b1fb 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -1689,18 +1689,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 +-- +1.8.4.5 + diff --git a/0035-Introduce-force-drivers-parameter-and-force_drivers-.patch b/0035-Introduce-force-drivers-parameter-and-force_drivers-.patch new file mode 100644 index 0000000..4767d79 --- /dev/null +++ b/0035-Introduce-force-drivers-parameter-and-force_drivers-.patch @@ -0,0 +1,112 @@ +From 35997a262493d31af8cd06a93612cf341df3f0cb Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Tue, 27 May 2014 14:59:39 +0200 +Subject: [PATCH] Introduce --force-drivers parameter and force_drivers=+ + config option + +Which will not only add listed drivers, but also enforce that they are tried + to be loaded at early boot time. + +This is needed if drivers which are not autoloaded (e.g. loop and a lot others) +shall get loaded via initramfs. + +Signed-off-by: Thomas Renninger +--- + dracut.8.asc | 13 +++++++++++++ + dracut.sh | 21 +++++++++++++++++++++ + 2 files changed, 34 insertions(+) + +diff --git a/dracut.8.asc b/dracut.8.asc +index 14ce26b..5ff0e82 100644 +--- a/dracut.8.asc ++++ b/dracut.8.asc +@@ -136,6 +136,19 @@ example: + ---- + =============================== + ++**--force-drivers** __:: ++ See add-drivers above. But in this case it is ensured that the drivers ++ are tried to be loaded early via modprobe. +++ ++[NOTE] ++=============================== ++If [LIST] has multiple arguments, then you have to put these in quotes. For ++example: ++---- ++# dracut --force-drivers "kmodule1 kmodule2" ... ++---- ++=============================== ++ + **--omit-drivers** __:: + specify a space-separated list of kernel modules not to add to the + initramfs. +diff --git a/dracut.sh b/dracut.sh +index adf26ad..9898cdf 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -81,6 +81,10 @@ Creates initial ramdisk images for preloading modules + exclusively include in the initramfs. + --add-drivers [LIST] Specify a space-separated list of kernel + modules to add to the initramfs. ++ --force-drivers [LIST] Specify a space-separated list of kernel ++ modules to add to the initramfs and make sure they ++ are tried to be loaded via modprobe same as passing ++ rd.driver.pre=DRIVER kernel parameter. + --omit-drivers [LIST] Specify a space-separated list of kernel + modules not to add to the initramfs. + --filesystems [LIST] Specify a space-separated list of kernel filesystem +@@ -299,6 +303,7 @@ rearrange_params() + --long add: \ + --long force-add: \ + --long add-drivers: \ ++ --long force-drivers: \ + --long omit-drivers: \ + --long modules: \ + --long omit: \ +@@ -463,6 +468,7 @@ while :; do + -a|--add) push add_dracutmodules_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; + --force-add) push force_add_dracutmodules_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; + --add-drivers) push add_drivers_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ --force-drivers) push force_drivers_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; + --omit-drivers) push omit_drivers_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; + -m|--modules) push dracutmodules_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; + -o|--omit) push omit_dracutmodules_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; +@@ -887,6 +893,13 @@ if (( ${#add_drivers_l[@]} )); then + fi + add_drivers=${add_drivers/-/_} + ++if (( ${#force_drivers_l[@]} )); then ++ while pop force_drivers_l val; do ++ force_drivers+=" $val " ++ done ++fi ++force_drivers=${force_drivers/-/_} ++ + if (( ${#omit_drivers_l[@]} )); then + while pop omit_drivers_l val; do + omit_drivers+=" $val " +@@ -903,6 +916,7 @@ fi + omit_drivers_corrected="" + for d in $omit_drivers; do + [[ " $drivers $add_drivers " == *\ $d\ * ]] && continue ++ [[ " $drivers $force_drivers " == *\ $d\ * ]] && continue + omit_drivers_corrected+="$d|" + done + omit_drivers="${omit_drivers_corrected%|}" +@@ -1295,6 +1309,13 @@ if [[ $no_kernel != yes ]]; then + if [[ $add_drivers ]]; then + hostonly='' instmods -c $add_drivers + fi ++ if [[ $force_drivers ]]; then ++ hostonly='' instmods -c $force_drivers ++ rm -f $initdir/etc/cmdline.d/20-force_driver.conf ++ for mod in $force_drivers; do ++ echo "rd.driver.pre=$mod" >>$initdir/etc/cmdline.d/20-force_drivers.conf ++ done ++ fi + if [[ $filesystems ]]; then + hostonly='' instmods -c $filesystems + fi +-- +1.8.4.5 + diff --git a/0036-95fcoe-Store-current-configuration-in-dracut-cmdline.patch b/0036-95fcoe-Store-current-configuration-in-dracut-cmdline.patch new file mode 100644 index 0000000..f211558 --- /dev/null +++ b/0036-95fcoe-Store-current-configuration-in-dracut-cmdline.patch @@ -0,0 +1,80 @@ +From 2a0e23ad75de80c7cc280b005e2cd5f4a67a31de Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Tue, 13 May 2014 09:05:38 +0200 +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 +--- + modules.d/95fcoe/module-setup.sh | 43 ++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 43 insertions(+) + +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index 9a52c00..ef4a38f 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -2,6 +2,45 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + ++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 + check() { + require_binaries dcbtool fipvlan lldpad ip readlink || return 1 +@@ -25,6 +64,10 @@ install() { + + mkdir -m 0755 -p "$initdir/var/lib/lldpad" + ++ if [[ $hostonly_cmdline == "yes" ]] ; then ++ cmdline >> "${initdir}/etc/cmdline.d/95fcoe.conf" ++ echo >> "${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" +-- +1.8.4.5 + diff --git a/0037-95fcoe-update-fcoe-interface-check.patch b/0037-95fcoe-update-fcoe-interface-check.patch new file mode 100644 index 0000000..374cc42 --- /dev/null +++ b/0037-95fcoe-update-fcoe-interface-check.patch @@ -0,0 +1,38 @@ +From d2b5184bf73bbce848fb3aca10ac7e33f6b65a27 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Tue, 13 May 2014 11:01:29 +0200 +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 +--- + 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 dc40c82..8e08303 100755 +--- a/modules.d/95fcoe/parse-fcoe.sh ++++ b/modules.d/95fcoe/parse-fcoe.sh +@@ -22,14 +22,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 +-- +1.8.4.5 + diff --git a/0038-95fcoe-start-lldpad-separately.patch b/0038-95fcoe-start-lldpad-separately.patch new file mode 100644 index 0000000..969e2ca --- /dev/null +++ b/0038-95fcoe-start-lldpad-separately.patch @@ -0,0 +1,78 @@ +From e4c44afc0f05514f2eed4efaea76d7b9bc239493 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Wed, 14 May 2014 08:04:22 +0200 +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 +--- + 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 d8c73c8..9884713 100755 +--- a/modules.d/95fcoe/fcoe-up.sh ++++ b/modules.d/95fcoe/fcoe-up.sh +@@ -24,10 +24,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 +@@ -37,10 +33,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 ef4a38f..9af8c71 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -71,6 +71,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 + } +-- +1.8.4.5 + diff --git a/0039-Remove-force-parameter-from-mkinitrd.patch b/0039-Remove-force-parameter-from-mkinitrd.patch new file mode 100644 index 0000000..ef1834c --- /dev/null +++ b/0039-Remove-force-parameter-from-mkinitrd.patch @@ -0,0 +1,80 @@ +From ee275da9883bb5a3f10191f6a034d90dd6ba5770 Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Tue, 27 May 2014 15:03:46 +0200 +Subject: [PATCH] Remove --force parameter from mkinitrd + +When calling 'mkinitrd' we're setting the '--force' parameter +to dracut anyway, so it doesn't make any sense to have it +as a separate parameter. + +Signed-off-by: Thomas Renninger +--- + mkinitrd-suse.8.asc | 3 --- + mkinitrd-suse.sh | 9 ++------- + 2 files changed, 2 insertions(+), 10 deletions(-) + +diff --git a/mkinitrd-suse.8.asc b/mkinitrd-suse.8.asc +index a181b75..cdb8e3a 100644 +--- a/mkinitrd-suse.8.asc ++++ b/mkinitrd-suse.8.asc +@@ -87,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 c02062d..7fc787e 100755 +--- a/mkinitrd-suse.sh ++++ b/mkinitrd-suse.sh +@@ -23,7 +23,6 @@ + boot_dir="/boot" + quiet=0 + host_only=1 +-force=0 + logfile=/var/log/YaST2/mkinitrd.log + dracut_cmd=dracut + +@@ -203,8 +202,6 @@ default_kernel_images() { + for initrd_image in $initrd_images;do + targets="$targets $initrd_image" + done +- host_only=1 +- force=1 + } + + while (($# > 0)); do +@@ -217,8 +214,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 +@@ -274,7 +269,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 +@@ -302,7 +296,8 @@ if [[ $host_only == 1 ]];then + else + dracut_args="${dracut_args} --no-hostonly --no-hostonly-cmdline" + fi +-[[ $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 + +-- +1.8.4.5 + diff --git a/0040-95fcoe-skip-VLAN-devices-in-fcoe-up.patch b/0040-95fcoe-skip-VLAN-devices-in-fcoe-up.patch new file mode 100644 index 0000000..7ae887f --- /dev/null +++ b/0040-95fcoe-skip-VLAN-devices-in-fcoe-up.patch @@ -0,0 +1,38 @@ +From 2029fc819675979761968b85526e8b3824f9b97b Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Mon, 19 May 2014 12:25:01 +0200 +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 +--- + 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 9884713..d362f0e 100755 +--- a/modules.d/95fcoe/fcoe-up.sh ++++ b/modules.d/95fcoe/fcoe-up.sh +@@ -18,6 +18,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) +-- +1.7.12.4 + diff --git a/0041-mkinitd-suse-remove-hostonly-and-hostonly-cmdline.patch b/0041-mkinitd-suse-remove-hostonly-and-hostonly-cmdline.patch new file mode 100644 index 0000000..5177b5f --- /dev/null +++ b/0041-mkinitd-suse-remove-hostonly-and-hostonly-cmdline.patch @@ -0,0 +1,82 @@ +From c736a3871f583c60f21215a5e69026e8f0bd6bff Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Mon, 2 Jun 2014 14:36:48 +0200 +Subject: [PATCH] mkinitd-suse: remove --hostonly and --hostonly-cmdline + +Should be set via configuration files, not in the script itself. + +Signed-off-by: Thomas Renninger +--- + mkinitrd-suse.sh | 18 ++++++------------ + 1 file changed, 6 insertions(+), 12 deletions(-) + +diff --git a/mkinitrd-suse.sh b/mkinitrd-suse.sh +index 7fc787e..1750b62 100755 +--- a/mkinitrd-suse.sh ++++ b/mkinitrd-suse.sh +@@ -22,7 +22,6 @@ + + boot_dir="/boot" + quiet=0 +-host_only=1 + logfile=/var/log/YaST2/mkinitrd.log + dracut_cmd=dracut + +@@ -255,7 +254,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 $? +@@ -291,11 +290,6 @@ targets=( $targets ) + [[ $kernels ]] && kernels=( $kernels ) + + [[ $logfile ]] && dracut_args="${dracut_args} --logfile $logfile" +-if [[ $host_only == 1 ]];then +- dracut_args="${dracut_args} --hostonly --hostonly-cmdline" +-else +- dracut_args="${dracut_args} --no-hostonly --no-hostonly-cmdline" +-fi + dracut_args="${dracut_args} --force" + + [[ $dracut_cmdline ]] && dracut_args="${dracut_args} --kernel-cmdline ${dracut_cmdline}" +@@ -309,7 +303,6 @@ fi + [[ $domu_module_list ]] || domu_module_list="${DOMU_INITRD_MODULES}" + shopt -s extglob + +-echo "Creating: target|kernel|dracut args " + for ((i=0 ; $i<${#targets[@]} ; i++)); do + + if [[ $img_vers ]];then +@@ -329,20 +322,21 @@ for ((i=0 ; $i<${#targets[@]} ; i++)); do + 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_all" +- # Duplicate code: --add-drivers must not be called with empty string ++ # 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 --add-drivers "${modules_all}" "$target" "$kernel" &>/dev/null ++ $dracut_cmd $dracut_args --force-drivers "${modules_all}" "$target" "$kernel" &>/dev/null + else + $dracut_cmd $dracut_args "$target" "$kernel" &>/dev/null + fi + else + if [ -n "${modules_all}" ];then +- $dracut_cmd $dracut_args --add-drivers "${modules_all}" "$target" "$kernel" ++ $dracut_cmd $dracut_args --force-drivers "${modules_all}" "$target" "$kernel" + else + $dracut_cmd $dracut_args "$target" "$kernel" + fi +-- +1.8.4.5 + diff --git a/0042-Enhance-suse.conf-example-with-SUSE-specific-setting.patch b/0042-Enhance-suse.conf-example-with-SUSE-specific-setting.patch new file mode 100644 index 0000000..198a109 --- /dev/null +++ b/0042-Enhance-suse.conf-example-with-SUSE-specific-setting.patch @@ -0,0 +1,35 @@ +From a2fb3509fc14d1ce2689878b6e63756a39531dc5 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Mon, 2 Jun 2014 14:39:55 +0200 +Subject: [PATCH] Enhance suse.conf example with SUSE-specific settings + +SUSE is using specific settings for dracut, so add them +to the suse.conf.example file. + +Signed-off-by: Thomas Renninger +--- + dracut.conf.d/suse.conf.example | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/dracut.conf.d/suse.conf.example b/dracut.conf.d/suse.conf.example +index 1e7f80e..818b59f 100644 +--- a/dracut.conf.d/suse.conf.example ++++ b/dracut.conf.d/suse.conf.example +@@ -1,3 +1,14 @@ ++# 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="pixz -6" ++ + 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" + +-- +1.8.4.5 + diff --git a/0043-40network-always-add-network-module.patch b/0043-40network-always-add-network-module.patch new file mode 100644 index 0000000..d635e07 --- /dev/null +++ b/0043-40network-always-add-network-module.patch @@ -0,0 +1,26 @@ +From 1bfb0415eaee805fc5b5685f5e291904f4d5effa Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Mon, 2 Jun 2014 14:41:43 +0200 +Subject: [PATCH] 40network: always add network module + +Signed-off-by: Thomas Renninger +--- + modules.d/40network/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index b54f873..5d3c26e 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -11,7 +11,7 @@ check() { + + require_binaries ip arping $WICKEDD_DHCP_PATH/wickedd-dhcp4 $WICKEDD_DHCP_PATH/wickedd-dhcp6 || return 1 + +- return 255 ++ return 0 + } + + # called by dracut +-- +1.8.4.5 + diff --git a/0044-Add-find-to-debug-binaries.patch b/0044-Add-find-to-debug-binaries.patch new file mode 100644 index 0000000..4428d74 --- /dev/null +++ b/0044-Add-find-to-debug-binaries.patch @@ -0,0 +1,27 @@ +From 753046ce937389b99431870c531dcc862323d660 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Mon, 2 Jun 2014 14:43:16 +0200 +Subject: [PATCH] Add 'find' to debug binaries + +Signed-off-by: Thomas Renninger +--- + modules.d/95debug/module-setup.sh | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/modules.d/95debug/module-setup.sh b/modules.d/95debug/module-setup.sh +index 88de833..1891fa8 100755 +--- a/modules.d/95debug/module-setup.sh ++++ b/modules.d/95debug/module-setup.sh +@@ -16,8 +16,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 \ + fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.vfat e2fsck +- + } + +-- +1.8.4.5 + diff --git a/0045-40network-add-missing-_arch-variable-declaration.patch b/0045-40network-add-missing-_arch-variable-declaration.patch new file mode 100644 index 0000000..a461a84 --- /dev/null +++ b/0045-40network-add-missing-_arch-variable-declaration.patch @@ -0,0 +1,28 @@ +From f15b93bd58f157a4c8f3aa5fe5a03ee0494f262c Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Mon, 2 Jun 2014 14:44:05 +0200 +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 5d3c26e..7e7f087 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -22,6 +22,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' +-- +1.8.4.5 + diff --git a/0046-dracut-Do-not-wait-for-swap-device.patch b/0046-dracut-Do-not-wait-for-swap-device.patch new file mode 100644 index 0000000..4bf7704 --- /dev/null +++ b/0046-dracut-Do-not-wait-for-swap-device.patch @@ -0,0 +1,59 @@ +From 6ecab258710d158a7a628f699449ac1c2c918208 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Mon, 2 Jun 2014 14:45:36 +0200 +Subject: [PATCH] dracut: Do not wait for swap device + +There should be no difference between hostonly and non-hostonly mode; +systemd should take care of bringing up the swap device whenever it's +accessible. + +Signed-off-by: Thomas Renninger +--- + dracut.sh | 31 ------------------------------- + 1 file changed, 31 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 9898cdf..79a6840 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1044,37 +1044,6 @@ if [[ $hostonly ]]; then + push host_devs "$_dev" + done + +- if [[ -f /proc/swaps ]] && [[ -f /etc/fstab ]]; then +- while read dev type rest; do +- [[ -b $dev ]] || continue +- [[ "$type" == "partition" ]] || continue +- +- while read _d _m _t _o _r; do +- [[ "$_d" == \#* ]] && continue +- [[ $_d ]] || continue +- [[ $_t != "swap" ]] && continue +- [[ $_m != "swap" ]] && [[ $_m != "none" ]] && continue +- [[ "$_o" == *noauto* ]] && continue +- _d=$(expand_persistent_dev "$_d") +- [[ "$_d" -ef "$dev" ]] || continue +- +- if [[ -f /etc/crypttab ]]; then +- while read _mapper _a _p _o; do +- [[ $_mapper = \#* ]] && continue +- [[ "$_d" -ef /dev/mapper/"$_mapper" ]] || continue +- [[ "$_o" ]] || _o="$_p" +- # skip entries with password files +- [[ "$_p" == /* ]] && [[ -f $_p ]] && continue 2 +- # skip mkswap swap +- [[ $_o == *swap* ]] && continue 2 +- done < /etc/crypttab +- fi +- +- push host_devs "$(readlink -f "$dev")" +- break +- done < /etc/fstab +- done < /proc/swaps +- fi + # record all host modaliases + declare -A host_modalias + find /sys/devices/ -name uevent -print > "$initdir/.modalias" +-- +1.8.4.5 + diff --git a/0047-95resume-skip-module-for-s390-x.patch b/0047-95resume-skip-module-for-s390-x.patch new file mode 100644 index 0000000..62dc23d --- /dev/null +++ b/0047-95resume-skip-module-for-s390-x.patch @@ -0,0 +1,31 @@ +From e7d92a233044614bc6eed412abd05dc99432a455 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Mon, 2 Jun 2014 14:46:55 +0200 +Subject: [PATCH] 95resume: skip module for s390(x) + +s390(x) kernels do not support suspend, so there is no need +to include this module. + +Signed-off-by: Thomas Renninger +--- + modules.d/95resume/module-setup.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh +index b1b4684..7f3cf24 100755 +--- a/modules.d/95resume/module-setup.sh ++++ b/modules.d/95resume/module-setup.sh +@@ -4,6 +4,10 @@ + + # called by dracut + check() { ++ local _arch=$(uname -m) ++ # No suspend support on s390(x) ++ [ "$_arch" = "s390" -o "$_arch" = "s390x" ] && return 1 ++ + # No point trying to support resume, if no swap partition exist + [[ $hostonly ]] || [[ $mount_needs ]] && { + for fs in "${host_fs_types[@]}"; do +-- +1.8.4.5 + diff --git a/0048-40network-Only-enable-network-interfaces-if-explicit.patch b/0048-40network-Only-enable-network-interfaces-if-explicit.patch index 360316c..4b4a7d7 100644 --- a/0048-40network-Only-enable-network-interfaces-if-explicit.patch +++ b/0048-40network-Only-enable-network-interfaces-if-explicit.patch @@ -16,11 +16,11 @@ Signed-off-by: Pawel Wieczorkiewicz modules.d/40network/net-genrules.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: dracut-041/modules.d/40network/net-genrules.sh -=================================================================== ---- dracut-041.orig/modules.d/40network/net-genrules.sh 2015-03-24 15:07:37.138255549 +0100 -+++ dracut-041/modules.d/40network/net-genrules.sh 2015-03-24 15:09:13.415662323 +0100 -@@ -95,8 +95,8 @@ +diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh +index 6ec9239..2fd8c6b 100755 +--- a/modules.d/40network/net-genrules.sh ++++ b/modules.d/40network/net-genrules.sh +@@ -97,8 +97,8 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh else cond='ACTION=="add", SUBSYSTEM=="net"' # if you change the name of "91-default-net.rules", also change modules.d/80cms/cmssetup.sh @@ -30,3 +30,6 @@ Index: dracut-041/modules.d/40network/net-genrules.sh echo "[ -f /tmp/net.*.did-setup ]" >$hookdir/initqueue/finished/wait-network.sh fi fi +-- +1.8.4.5 + diff --git a/0049-95iscsi-Use-ip-ibft-for-ibft-autoconfiguration.patch b/0049-95iscsi-Use-ip-ibft-for-ibft-autoconfiguration.patch new file mode 100644 index 0000000..809d0e3 --- /dev/null +++ b/0049-95iscsi-Use-ip-ibft-for-ibft-autoconfiguration.patch @@ -0,0 +1,40 @@ +From a857924cc5eaf57b1f8c6ae469fefa4ee03cf6cf Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Tue, 27 May 2014 12:07:35 +0200 +Subject: [PATCH] 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 + +Signed-off-by: Hannes Reinecke +--- + modules.d/95iscsi/module-setup.sh | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index 97e6e81..634c72e 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -41,12 +41,14 @@ installkernel() { + + install_ibft() { + # When iBFT / iscsi_boot is detected: +- # - mark network as mandatory ++ # - 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 +- echo "rd.neednet=1" >> "${initdir}/etc/cmdline.d/95iscsi.conf" ++ if [ ${d##*/} = "ibft" ] ; then ++ echo "ip=ibft" >> "${initdir}/etc/cmdline.d/95iscsi.conf" ++ fi + echo "rd.iscsi.firmware=1" >> "${initdir}/etc/cmdline.d/95iscsi.conf" + fi + done +-- +1.8.4.5 + diff --git a/0050-95iscsi-strip-one-set-of-quotes-when-calling-initque.patch b/0050-95iscsi-strip-one-set-of-quotes-when-calling-initque.patch new file mode 100644 index 0000000..754a6dc --- /dev/null +++ b/0050-95iscsi-strip-one-set-of-quotes-when-calling-initque.patch @@ -0,0 +1,46 @@ +From 55817d44cd85733072d61e20ed6c790f8252b00f Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Tue, 27 May 2014 13:30:17 +0200 +Subject: [PATCH] 95iscsi: strip one set of quotes when calling initqueue + +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 +--- + 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 9651a20..3a572f7 100755 +--- a/modules.d/95iscsi/parse-iscsiroot.sh ++++ b/modules.d/95iscsi/parse-iscsiroot.sh +@@ -61,10 +61,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 +@@ -88,7 +88,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 + +-- +1.8.4.5 + diff --git a/0051-mkinitrd-suse-add-update-bootloader-message.patch b/0051-mkinitrd-suse-add-update-bootloader-message.patch new file mode 100644 index 0000000..0c7ccce --- /dev/null +++ b/0051-mkinitrd-suse-add-update-bootloader-message.patch @@ -0,0 +1,24 @@ +From 9a27c641994d83947057a7dc4dcf8886c0764091 Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Mon, 2 Jun 2014 14:50:14 +0200 +Subject: [PATCH] mkinitrd-suse: add 'update bootloader' message + +Signed-off-by: Thomas Renninger +--- + mkinitrd-suse.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/mkinitrd-suse.sh b/mkinitrd-suse.sh +index 1750b62..bf10a9d 100755 +--- a/mkinitrd-suse.sh ++++ b/mkinitrd-suse.sh +@@ -346,5 +346,6 @@ done + if [ "$skip_update_bootloader" ] ; then + echo 2>&1 "Did not refresh the bootloader. You might need to refresh it manually." + else ++ echo "Update bootloader..." + update-bootloader --refresh + fi +-- +1.8.4.5 + diff --git a/0052-99base-Add-chown-binary.patch b/0052-99base-Add-chown-binary.patch new file mode 100644 index 0000000..8779e18 --- /dev/null +++ b/0052-99base-Add-chown-binary.patch @@ -0,0 +1,32 @@ +From fad493626ae0d6118d4efc164151d4fe8937682b Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Mon, 2 Jun 2014 14:52:23 +0200 +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 13fbee2..359db22 100755 +--- a/modules.d/99base/module-setup.sh ++++ b/modules.d/99base/module-setup.sh +@@ -17,7 +17,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 + +-- +1.8.4.5 + diff --git a/0053-01fips-fixup-loading-issues.patch b/0053-01fips-fixup-loading-issues.patch index 0d308f4..c49e126 100644 --- a/0053-01fips-fixup-loading-issues.patch +++ b/0053-01fips-fixup-loading-issues.patch @@ -13,11 +13,11 @@ Signed-off-by: Marcus Meissner modules.d/01fips/module-setup.sh | 12 +++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) -Index: dracut-041/modules.d/01fips/fips.sh -=================================================================== ---- dracut-041.orig/modules.d/01fips/fips.sh 2015-01-31 12:54:52.000000000 +0100 -+++ dracut-041/modules.d/01fips/fips.sh 2015-03-17 12:57:54.755887866 +0100 -@@ -98,6 +98,18 @@ +diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh +index 7fa48f1..07bd1da 100755 +--- a/modules.d/01fips/fips.sh ++++ b/modules.d/01fips/fips.sh +@@ -100,6 +100,18 @@ do_fips() _found=1 break done +Date: Fri, 30 May 2014 10:34:03 +0200 +Subject: [PATCH] 95iscsi: update commandline printing + +dracut has a separate callout 'cmdline' which should be used +for printing out the generated commandline. + +Signed-off-by: Hannes Reinecke +--- + modules.d/95iscsi/module-setup.sh | 40 +++++++++++++++++++++++---------------- + 1 file changed, 24 insertions(+), 16 deletions(-) + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index 634c72e..52fac5c 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -2,6 +2,21 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + ++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 + check() { + local _rootdev +@@ -39,23 +54,11 @@ depends() { + installkernel() { + local _arch=$(uname -m) + +- 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 "ip=ibft" >> "${initdir}/etc/cmdline.d/95iscsi.conf" +- fi +- echo "rd.iscsi.firmware=1" >> "${initdir}/etc/cmdline.d/95iscsi.conf" +- fi +- done +- } +- + # Detect iBFT and perform mandatory steps +- install_ibft ++ 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 +@@ -97,6 +100,11 @@ installkernel() { + } + + # called by dracut ++cmdline() { ++ install_ibft ++} ++ ++# called by dracut + install() { + inst_multiple umount iscsistart hostname iscsi-iname + inst_multiple -o iscsiuio +-- +1.8.4.5 + diff --git a/0055-95fcoe-Only-install-fcoe-module-if-required.patch b/0055-95fcoe-Only-install-fcoe-module-if-required.patch new file mode 100644 index 0000000..5f4233e --- /dev/null +++ b/0055-95fcoe-Only-install-fcoe-module-if-required.patch @@ -0,0 +1,38 @@ +From bdf48e8e59056ccd44b3df2f53d298a74cabfab7 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Fri, 30 May 2014 11:00:59 +0200 +Subject: [PATCH] 95fcoe: Only install fcoe module if required + +When called with '--hostonly' we need to check if +any FCoE controllers are present. Otherwise we don't +need to include the module. + +Signed-off-by: Hannes Reinecke +--- + modules.d/95fcoe/module-setup.sh | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index 9af8c71..7abfb01 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -43,7 +43,16 @@ cmdline() { + + # called by dracut + check() { ++ [[ $hostonly ]] || [[ $mount_needs ]] && { ++ for c in /sys/bus/fcoe/devices/ctlr_* ; do ++ [ -L $c ] || continue ++ break; ++ done ++ return 255 ++ } ++ + require_binaries dcbtool fipvlan lldpad ip readlink || return 1 ++ + return 0 + } + +-- +1.8.4.5 + diff --git a/0056-81cio_ignore-handle-cio_ignore-commandline.patch b/0056-81cio_ignore-handle-cio_ignore-commandline.patch index e8f99a9..96c5495 100644 --- a/0056-81cio_ignore-handle-cio_ignore-commandline.patch +++ b/0056-81cio_ignore-handle-cio_ignore-commandline.patch @@ -1,69 +1,24 @@ +From 3e263f6bfa21d9b5b102dfa73d0bdf2c17de41dc Mon Sep 17 00:00:00 2001 From: Hannes Reinecke - -81cio_ignore: handle cio_ignore commandline +Date: Wed, 4 Jun 2014 13:27:41 +0200 +Subject: [PATCH] 81cio_ignore: handle cio_ignore commandline References: bnc#874902 -Incorporates following on-top patches/fixes: ----------------------------- -Subject: 81cio_ignore: skip module if cio_ignore is not active - -When cio_ignore is not active we should skip the entire module -during boot; otherwise it'll lead to adverse effects. - -References: bnc#882685 ----------------------------- -Subject: 81cio_ignore: rewrite module - -Rewrite cio_ignore module to rely on the dracut commandline -parameter 'rd.cio_accept', which takes a comma-separated list -of CCW IDs. Each of those IDs are being removed from the -list of devices from cio_ignore. - -The default values for rd.cio_accept are taken from -/boot/zipl/active_devices.txt. - -References: bnc#882685 ------------------------------ -Subject: More empty cmdline fixes - -This fixes up some more modules which might print out empty -commandline files. - - Signed-off-by: Thomas Renninger -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index e51fd1b..0e3e5a0 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -857,6 +857,21 @@ NOTE: There must be enough free RAM available to hold the complete image. - This method is very suitable for diskless boots. - - -+CIO_IGNORE -+~~~~~~~~~~ -+**rd.cio_accept=**____:: -+ Remove the devices listed in from the default -+ cio_ignore kernel command-line settings. -+ is a list of comma-separated CCW device ids. -+ The default for this value is taken from the -+ _/boot/zipl/active_devices.txt_ file. -++ -+[listing] -+.Example -+-- -+rd.cio_accept=0.0.0180,0.0.0800,0.0.0801,0.0.0802 -+-- -+ - Plymouth Boot Splash - ~~~~~~~~~~~~~~~~~~~~ - **plymouth.enable=0**:: +--- + modules.d/81cio_ignore/module-setup.sh | 39 ++++++++++++++++++++++++++++++++++ + modules.d/81cio_ignore/parse-zipl.sh | 29 +++++++++++++++++++++++++ + 2 files changed, 68 insertions(+) + create mode 100644 modules.d/81cio_ignore/module-setup.sh + create mode 100644 modules.d/81cio_ignore/parse-zipl.sh + diff --git a/modules.d/81cio_ignore/module-setup.sh b/modules.d/81cio_ignore/module-setup.sh new file mode 100644 -index 0000000..37b414b +index 0000000..a812649 --- /dev/null +++ b/modules.d/81cio_ignore/module-setup.sh -@@ -0,0 +1,40 @@ +@@ -0,0 +1,39 @@ +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh @@ -71,64 +26,73 @@ index 0000000..37b414b +# called by dracut +check() { +# do not add this module by default -+ local arch=$(uname -m) -+ [ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1 -+ return 0 ++ local arch=$(uname -m) ++ [ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1 ++ return 0 ++} ++ ++find_mount() { ++ local dev mnt etc wanted_dev ++ wanted_dev="$(readlink -e -q $1)" ++ while read dev mnt etc; do ++ [ "$mnt" = "$wanted_dev" ] && echo "$dev" && return 0 ++ done < /proc/mounts ++ return 1 +} + +cmdline() { -+ local cio_accept -+ -+ if [ -e /boot/zipl/active_devices.txt ] ; then -+ while read dev etc ; do -+ [ "$dev" = "#" -o "$dev" = "" ] && continue; -+ if [ -z "$cio_accept" ] ; then -+ cio_accept="$dev" -+ else -+ cio_accept="${cio_accept},${dev}" -+ fi -+ done < /boot/zipl/active_devices.txt -+ fi -+ if [ -n "$cio_accept" ] ; then -+ echo "rd.cio_accept=${cio_accept}" -+ fi ++ local zipl_dasd ++ zipl_dasd=`find_mount /boot/zipl` ++ printf " rd.zipl_dasd=%s\n" "$zipl_dasd " +} + +# called by dracut +install() { -+ if [[ $hostonly_cmdline == "yes" ]] ; then -+ local _cio_accept=$(cmdline) -+ [[ $_cio_accept ]] && printf "%s\n" "$_cio_accept" >> "${initdir}/etc/cmdline.d/01cio_accept.conf" -+ fi ++ if [[ $hostonly_cmdline == "yes" ]];then ++ echo $(cmdline) >"${initdir}/etc/cmdline.d/01zipl_dasd.conf" ++ fi + -+ inst_hook cmdline 20 "$moddir/parse-cio_accept.sh" -+ inst_multiple cio_ignore ++ inst_hook pre-mount 10 "$moddir/parse-zipl.sh" ++ inst_multiple cio_ignore mount umount mkdir +} -diff --git a/modules.d/81cio_ignore/parse-cio_accept.sh b/modules.d/81cio_ignore/parse-cio_accept.sh ++installkernel() { ++ instmods ext4 ++} +diff --git a/modules.d/81cio_ignore/parse-zipl.sh b/modules.d/81cio_ignore/parse-zipl.sh new file mode 100644 -index 0000000..4f899d2 +index 0000000..5f7aa58 --- /dev/null -+++ b/modules.d/81cio_ignore/parse-cio_accept.sh -@@ -0,0 +1,22 @@ ++++ b/modules.d/81cio_ignore/parse-zipl.sh +@@ -0,0 +1,29 @@ +#!/bin/sh +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + -+CIO_IGNORE=$(getarg cio_ignore) -+CIO_ACCEPT=$(getarg rd.cio_accept) ++ZIPL_DEV="$(getarg rd.zipl_dasd)" ++ZIPL_DIR=/tmp/zipl ++CIO_REMOVE_LIST=$ZIPL_DIR/active_devices.txt + -+if [ -z $CIO_IGNORE ] ; then -+ info "cio_ignored disabled on commandline" -+ return -+fi -+if [ -n "$CIO_ACCEPT" ] ; then -+ OLDIFS="$IFS" -+ IFS=, -+ set -- $CIO_ACCEPT -+ while (($# > 0)) ; do -+ info "Enabling device $1" -+ cio_ignore --remove $1 -+ shift -+ done -+ IFS="$OLDIFS" ++if [ -n $ZIPL_DEV ];then ++ info "Waiting for zipl device $ZIPL_DEV" ++ wait_for_dev -n "$ZIPL_DEV" ++# ++# mount device and read devices ++# ++ [ -d $ZIPL_DIR ] || mkdir $ZIPL_DIR ++ mount -t ext2 -o ro $ZIPL_DEV $ZIPL_DIR ++ if [ -f $CIO_REMOVE_LIST ] ; then ++# ++# File exist ++# ++ while read dev etc; do ++ [ "$dev" = "#" -o "$dev" = "" ] && continue ++ cio_ignore --remove $dev ++ done < $CIO_REMOVE_LIST ++ fi ++ umount $ZIPL_DIR ++else ++ warn "No rd.zipl_dasd boot parameter found" +fi +-- +1.8.4.5 + diff --git a/0057-01fips-Include-some-more-hmacs.patch b/0057-01fips-Include-some-more-hmacs.patch index 2a12d7e..60e099a 100644 --- a/0057-01fips-Include-some-more-hmacs.patch +++ b/0057-01fips-Include-some-more-hmacs.patch @@ -12,18 +12,23 @@ Signed-off-by: Marcus Meissner modules.d/01fips/module-setup.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -Index: dracut-041/modules.d/01fips/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/01fips/module-setup.sh 2015-03-17 13:00:19.375997364 +0100 -+++ dracut-041/modules.d/01fips/module-setup.sh 2015-03-17 13:02:40.739924966 +0100 -@@ -45,6 +45,10 @@ +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index aa56fcf..d6907a3 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -46,7 +46,11 @@ 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 ++ libssl.so 'hmaccalc/sha512hmac.hmac' libssl.so.10 \ + .libcrypto.so.1.0.0.hmac .libssl.so.1.0.0.hmac \ + .libcryptsetup.so.4.5.0.hmac .libcryptsetup.so.4.hmac \ + .libgcrypt.so.20.hmac \ + .libfipscheck.so.1.hmac .libfipscheck.so.1.1.0.hmac - libfreeblpriv3.so libfreeblpriv3.chk # we do not use prelink at SUSE + #inst_multiple -o prelink +-- +1.8.4.5 + diff --git a/0058-dracut-add-warning-when-including-unsupported-module.patch b/0058-dracut-add-warning-when-including-unsupported-module.patch index c65222b..d3ecfe5 100644 --- a/0058-dracut-add-warning-when-including-unsupported-module.patch +++ b/0058-dracut-add-warning-when-including-unsupported-module.patch @@ -25,11 +25,11 @@ Signed-off-by: Jeff Mahoney dracut.sh | 5 +++++ 3 files changed, 37 insertions(+) -Index: dracut-041/dracut-functions.sh -=================================================================== ---- dracut-041.orig/dracut-functions.sh 2015-03-17 13:03:05.977340283 +0100 -+++ dracut-041/dracut-functions.sh 2015-03-17 13:04:36.570421062 +0100 -@@ -1436,6 +1436,17 @@ +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 5b3b1fb..1e0779a 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -1400,6 +1400,17 @@ for_each_module_dir() { done } @@ -47,7 +47,7 @@ Index: dracut-041/dracut-functions.sh # Install a single kernel module along with any firmware it may require. # $1 = full path to kernel module to install install_kmod_with_fw() { -@@ -1498,6 +1509,10 @@ +@@ -1462,6 +1473,10 @@ install_kmod_with_fw() { fi fi done @@ -58,7 +58,7 @@ Index: dracut-041/dracut-functions.sh return 0 } -@@ -1544,6 +1559,12 @@ +@@ -1508,6 +1523,12 @@ dracut_kernel_post() { inst_simple "$_modpath" "/lib/modules/$kernel/${_destpath}" || exit $? done < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep" fi @@ -71,13 +71,13 @@ Index: dracut-041/dracut-functions.sh ) & _pid=$(jobs -p | while read a ; do printf ":$a";done) _pid=${_pid##*:} -Index: dracut-041/dracut.8.asc -=================================================================== ---- dracut-041.orig/dracut.8.asc 2015-03-17 13:03:05.985340731 +0100 -+++ dracut-041/dracut.8.asc 2015-03-17 13:04:36.574421286 +0100 -@@ -465,6 +465,17 @@ - **--loginstall __:: - Log all files installed from the host to __. +diff --git a/dracut.8.asc b/dracut.8.asc +index 5ff0e82..39cbb98 100644 +--- a/dracut.8.asc ++++ b/dracut.8.asc +@@ -456,6 +456,17 @@ will not be able to boot. + Regenerate all initramfs images at the default location with the kernel + versions found on the system. Additional parameters are passed through. +**--check-supported**:: + The kernel may be configured to check whether a module is @@ -93,33 +93,36 @@ Index: dracut-041/dracut.8.asc FILES ----- _/var/log/dracut.log_:: -Index: dracut-041/dracut.sh -=================================================================== ---- dracut-041.orig/dracut.sh 2015-03-17 13:04:36.578421510 +0100 -+++ dracut-041/dracut.sh 2015-03-17 13:05:51.022596862 +0100 -@@ -193,6 +193,9 @@ +diff --git a/dracut.sh b/dracut.sh +index 79a6840..a58e134 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -193,6 +193,9 @@ Creates initial ramdisk images for preloading modules --printsize Print out the module install size --sshkey [SSHKEY] Add ssh key to initramfs (use with ssh-client module) --logfile [FILE] Logfile to use (overrides configuration setting) + --check-supported Check to ensure that modules are marked supported when + using a kernel that is configured to check the + support status of a module before loading. - --reproducible Create reproducible images - --loginstall [DIR] Log all files installed from the host to [DIR] -@@ -387,6 +390,7 @@ + If [LIST] has multiple arguments, then you have to put these in quotes. + +@@ -374,6 +377,7 @@ rearrange_params() --long noimageifnotneeded \ --long early-microcode \ --long no-early-microcode \ + --long check-supported \ - --long reproducible \ - --long loginstall: \ -- "$@") -@@ -576,6 +580,7 @@ + + if (( $? != 0 )); then +@@ -557,6 +561,7 @@ while :; do --printsize) printsize="yes";; --regenerate-all) regenerate_all="yes";; --noimageifnotneeded) noimageifnotneeded="yes";; + --check-supported) check_supported="yes" ;; - --reproducible) reproducible_l="yes";; + --) shift; break;; +-- +1.8.4.5 + diff --git a/0062-95iscsi-Install-libgcc_s-library.patch b/0062-95iscsi-Install-libgcc_s-library.patch new file mode 100644 index 0000000..9f8e1df --- /dev/null +++ b/0062-95iscsi-Install-libgcc_s-library.patch @@ -0,0 +1,31 @@ +From 3dc545f7525dd340edbc0dfa88ee331d77b23dee Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Wed, 11 Jun 2014 10:13:13 +0200 +Subject: 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 +--- + 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 52fac5c..41785e1 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -108,6 +108,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" +-- +1.8.4.5 + diff --git a/0063-90multipath-Install-libgcc_s-library.patch b/0063-90multipath-Install-libgcc_s-library.patch new file mode 100644 index 0000000..e306d80 --- /dev/null +++ b/0063-90multipath-Install-libgcc_s-library.patch @@ -0,0 +1,29 @@ +From 5663e58535567b1566f17b316fab77b467de21e0 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Wed, 11 Jun 2014 10:16:46 +0200 +Subject: 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 +--- + 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 0149df9..7b20709 100755 +--- a/modules.d/90multipath/module-setup.sh ++++ b/modules.d/90multipath/module-setup.sh +@@ -89,6 +89,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_simple "${moddir}/multipathd.service" "${systemdsystemunitdir}/multipathd.service" +-- +1.8.4.5 + diff --git a/0064-90kernel-modules-install-scsi_dh_alua.patch b/0064-90kernel-modules-install-scsi_dh_alua.patch new file mode 100644 index 0000000..828e0cb --- /dev/null +++ b/0064-90kernel-modules-install-scsi_dh_alua.patch @@ -0,0 +1,30 @@ +From 390605b9be082a2b5ed0ecee6a60ceadf6e7b788 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Thu, 12 Jun 2014 11:45:09 +0200 +Subject: 90kernel-modules: install scsi_dh_alua + +Install the missing scsi_dh_alua module, too. + +References: bnc#871617 + +Signed-off-by: Hannes Reinecke +--- + 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 2378663..7ee73ad 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -43,7 +43,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 firewire-ohci \ + pcmcia usb_storage nvme hid-hyperv hv-vmbus \ +-- +1.8.4.5 + diff --git a/0065-95iscsi-Fixup-bnx2i-offload-booting.patch b/0065-95iscsi-Fixup-bnx2i-offload-booting.patch new file mode 100644 index 0000000..c731fec --- /dev/null +++ b/0065-95iscsi-Fixup-bnx2i-offload-booting.patch @@ -0,0 +1,69 @@ +From 4c9b6f84183857781f93fba3ae75cbce2e0dcbd3 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Fri, 13 Jun 2014 12:30:11 +0200 +Subject: 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 +--- + 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 41785e1..e94e913 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -2,14 +2,38 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + ++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" +-- +1.8.4.5 + diff --git a/0066-40network-always-start-netroot-in-ifup.sh.patch b/0066-40network-always-start-netroot-in-ifup.sh.patch index d13cea9..37fca52 100644 --- a/0066-40network-always-start-netroot-in-ifup.sh.patch +++ b/0066-40network-always-start-netroot-in-ifup.sh.patch @@ -16,13 +16,13 @@ Signed-off-by: Hannes Reinecke modules.d/40network/ifup.sh | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) -Index: dracut-041/modules.d/40network/ifup.sh -=================================================================== ---- dracut-041.orig/modules.d/40network/ifup.sh 2015-01-31 12:54:52.000000000 +0100 -+++ dracut-041/modules.d/40network/ifup.sh 2015-03-24 15:07:37.946300922 +0100 -@@ -338,21 +338,15 @@ - esac - done +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 934c61e..494017b 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -420,21 +420,15 @@ for p in $(getargs ip=); do + do_static ;; + esac - > /tmp/net.${netif}.up + if [ $? -eq 0 ]; then @@ -50,3 +50,6 @@ Index: dracut-041/modules.d/40network/ifup.sh exit 0 done +-- +1.8.4.5 + diff --git a/0067-95fcoe-check-always-returns-255.patch b/0067-95fcoe-check-always-returns-255.patch new file mode 100644 index 0000000..3560aa9 --- /dev/null +++ b/0067-95fcoe-check-always-returns-255.patch @@ -0,0 +1,32 @@ +From c6cadbd3ea9abf5dd92172c27e1f06611d5a0185 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Mon, 16 Jun 2014 14:08:38 +0200 +Subject: 95fcoe: check() always returns 255 + +There is a typo in the 'check' function in module_setup.sh, causing +it always to return 255. + +Signed-off-by: Hannes Reinecke +--- + modules.d/95fcoe/module-setup.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index 7abfb01..57d5c1e 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -46,9 +46,9 @@ check() { + [[ $hostonly ]] || [[ $mount_needs ]] && { + for c in /sys/bus/fcoe/devices/ctlr_* ; do + [ -L $c ] || continue +- break; ++ fcoe_ctlr=$c + done +- return 255 ++ [ -z "$fcoe_ctlr" ] && return 255 + } + + require_binaries dcbtool fipvlan lldpad ip readlink || return 1 +-- +1.8.4.5 + diff --git a/0068-95fcoe-uefi-Test-for-EFI-firmware.patch b/0068-95fcoe-uefi-Test-for-EFI-firmware.patch index 0791a7e..23f367c 100644 --- a/0068-95fcoe-uefi-Test-for-EFI-firmware.patch +++ b/0068-95fcoe-uefi-Test-for-EFI-firmware.patch @@ -14,11 +14,11 @@ Signed-off-by: Hannes Reinecke modules.d/95fcoe-uefi/module-setup.sh | 3 +++ 1 file changed, 3 insertions(+) -Index: dracut-041/modules.d/95fcoe-uefi/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/95fcoe-uefi/module-setup.sh 2015-01-31 12:54:52.000000000 +0100 -+++ dracut-041/modules.d/95fcoe-uefi/module-setup.sh 2015-03-24 15:07:41.762515236 +0100 -@@ -2,6 +2,9 @@ +diff --git a/modules.d/95fcoe-uefi/module-setup.sh b/modules.d/95fcoe-uefi/module-setup.sh +index 0fb06e2..f5277f4 100755 +--- a/modules.d/95fcoe-uefi/module-setup.sh ++++ b/modules.d/95fcoe-uefi/module-setup.sh +@@ -4,6 +4,9 @@ # called by dracut check() { @@ -28,3 +28,6 @@ Index: dracut-041/modules.d/95fcoe-uefi/module-setup.sh require_binaries dcbtool fipvlan lldpad ip readlink || return 1 return 0 } +-- +1.8.4.5 + diff --git a/0069-81cio_ignore-skip-module-if-cio_ignore-is-not-active.patch b/0069-81cio_ignore-skip-module-if-cio_ignore-is-not-active.patch new file mode 100644 index 0000000..9f3536e --- /dev/null +++ b/0069-81cio_ignore-skip-module-if-cio_ignore-is-not-active.patch @@ -0,0 +1,115 @@ +From d5bbccaaff904eb0dbbd2e5407278e69436e559b Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Tue, 17 Jun 2014 11:09:59 +0200 +Subject: 81cio_ignore: skip module if cio_ignore is not active + +When cio_ignore is not active we should skip the entire module +during boot; otherwise it'll lead to adverse effects. + +References: bnc#882685 + +Signed-off-by: Hannes Reinecke +--- + modules.d/81cio_ignore/module-setup.sh | 45 ++++++++++++++++++++-------------- + modules.d/81cio_ignore/parse-zipl.sh | 11 ++++++--- + 2 files changed, 34 insertions(+), 22 deletions(-) + +diff --git a/modules.d/81cio_ignore/module-setup.sh b/modules.d/81cio_ignore/module-setup.sh +index a812649..52cb188 100644 +--- a/modules.d/81cio_ignore/module-setup.sh ++++ b/modules.d/81cio_ignore/module-setup.sh +@@ -5,35 +5,44 @@ + # called by dracut + check() { + # do not add this module by default +- local arch=$(uname -m) +- [ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1 +- return 0 ++ local arch=$(uname -m) ++ [ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1 ++ return 0 + } + + find_mount() { +- local dev mnt etc wanted_dev +- wanted_dev="$(readlink -e -q $1)" +- while read dev mnt etc; do +- [ "$mnt" = "$wanted_dev" ] && echo "$dev" && return 0 +- done < /proc/mounts +- return 1 ++ local dev mnt etc wanted_dev zipl_dev ++ wanted_dev="$(readlink -e -q $1)" ++ while read dev mnt etc; do ++ [ "$mnt" = "$wanted_dev" ] && zipl_dev="$dev" && break ++ done < /etc/fstab ++ if [ -z "$zipl_dev" ] ; then ++ return 1 ++ fi ++ if [ -e ${wanted_dev}/active_devices.txt ] ; then ++ echo "$zipl_dev" ++ return 0 ++ fi ++ return 1 + } + + cmdline() { +- local zipl_dasd +- zipl_dasd=`find_mount /boot/zipl` +- printf " rd.zipl_dasd=%s\n" "$zipl_dasd " ++ local zipl_dasd ++ zipl_dasd=`find_mount /boot/zipl` ++ if [ -n "$zipl_dasd" ] ; then ++ printf " rd.zipl_dasd=%s " $zipl_dasd ++ fi + } + + # called by dracut + install() { +- if [[ $hostonly_cmdline == "yes" ]];then +- echo $(cmdline) >"${initdir}/etc/cmdline.d/01zipl_dasd.conf" +- fi ++ if [[ $hostonly_cmdline == "yes" ]];then ++ echo $(cmdline) >"${initdir}/etc/cmdline.d/01zipl_dasd.conf" ++ fi + +- inst_hook pre-mount 10 "$moddir/parse-zipl.sh" +- inst_multiple cio_ignore mount umount mkdir ++ inst_hook pre-mount 10 "$moddir/parse-zipl.sh" ++ inst_multiple cio_ignore mount umount mkdir + } + installkernel() { +- instmods ext4 ++ instmods ext4 + } +diff --git a/modules.d/81cio_ignore/parse-zipl.sh b/modules.d/81cio_ignore/parse-zipl.sh +index 5f7aa58..9d68c52 100644 +--- a/modules.d/81cio_ignore/parse-zipl.sh ++++ b/modules.d/81cio_ignore/parse-zipl.sh +@@ -2,17 +2,20 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + +-ZIPL_DEV="$(getarg rd.zipl_dasd)" +-ZIPL_DIR=/tmp/zipl ++ZIPL_DEV=$(getarg rd.zipl_dasd) ++ZIPL_DIR=/boot/zipl + CIO_REMOVE_LIST=$ZIPL_DIR/active_devices.txt + +-if [ -n $ZIPL_DEV ];then ++if ! getarg cio_ignore ; then ++ return ++fi ++if [ -n "$ZIPL_DEV" ];then + info "Waiting for zipl device $ZIPL_DEV" + wait_for_dev -n "$ZIPL_DEV" + # + # mount device and read devices + # +- [ -d $ZIPL_DIR ] || mkdir $ZIPL_DIR ++ [ -d $ZIPL_DIR ] || mkdir -p $ZIPL_DIR + mount -t ext2 -o ro $ZIPL_DEV $ZIPL_DIR + if [ -f $CIO_REMOVE_LIST ] ; then + # +-- +1.8.4.5 + diff --git a/0070-81cio_ignore-rewrite-module.patch b/0070-81cio_ignore-rewrite-module.patch new file mode 100644 index 0000000..a0278f1 --- /dev/null +++ b/0070-81cio_ignore-rewrite-module.patch @@ -0,0 +1,180 @@ +From 137090516e1c48ef134209c2ed4f625799691090 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Tue, 17 Jun 2014 16:45:06 +0200 +Subject: 81cio_ignore: rewrite module + +Rewrite cio_ignore module to rely on the dracut commandline +parameter 'rd.cio_accept', which takes a comma-separated list +of CCW IDs. Each of those IDs are being removed from the +list of devices from cio_ignore. + +The default values for rd.cio_accept are taken from +/boot/zipl/active_devices.txt. + +References: bnc#882685 + +Signed-off-by: Hannes Reinecke +--- + dracut.cmdline.7.asc | 15 +++++++++++ + modules.d/81cio_ignore/module-setup.sh | 43 ++++++++++++------------------ + modules.d/81cio_ignore/parse-cio_accept.sh | 21 +++++++++++++++ + modules.d/81cio_ignore/parse-zipl.sh | 32 ---------------------- + 4 files changed, 53 insertions(+), 58 deletions(-) + create mode 100644 modules.d/81cio_ignore/parse-cio_accept.sh + delete mode 100644 modules.d/81cio_ignore/parse-zipl.sh + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 985285b..bd8e4ce 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -711,6 +711,21 @@ rd.znet=qeth,0.0.0600,0.0.0601,0.0.0602,layer2=1,portname=foo + rd.znet=ctc,0.0.0600,0.0.0601,protocol=bar + -- + ++CIO_IGNORE ++~~~~~~~~~~ ++**rd.cio_accept=**____:: ++ Remove the devices listed in from the default ++ cio_ignore kernel command-line settings. ++ is a list of comma-separated CCW device ids. ++ The default for this value is taken from the ++ _/boot/zipl/active_devices.txt_ file. +++ ++[listing] ++.Example ++-- ++rd.cio_accept=0.0.0180,0.0.0800,0.0.0801,0.0.0802 ++-- ++ + Plymouth Boot Splash + ~~~~~~~~~~~~~~~~~~~~ + **plymouth.enable=0**:: +diff --git a/modules.d/81cio_ignore/module-setup.sh b/modules.d/81cio_ignore/module-setup.sh +index 52cb188..42ae2f9 100644 +--- a/modules.d/81cio_ignore/module-setup.sh ++++ b/modules.d/81cio_ignore/module-setup.sh +@@ -10,39 +10,30 @@ check() { + return 0 + } + +-find_mount() { +- local dev mnt etc wanted_dev zipl_dev +- wanted_dev="$(readlink -e -q $1)" +- while read dev mnt etc; do +- [ "$mnt" = "$wanted_dev" ] && zipl_dev="$dev" && break +- done < /etc/fstab +- if [ -z "$zipl_dev" ] ; then +- return 1 +- fi +- if [ -e ${wanted_dev}/active_devices.txt ] ; then +- echo "$zipl_dev" +- return 0 +- fi +- return 1 +-} +- + cmdline() { +- local zipl_dasd +- zipl_dasd=`find_mount /boot/zipl` +- if [ -n "$zipl_dasd" ] ; then +- printf " rd.zipl_dasd=%s " $zipl_dasd ++ local cio_accept ++ ++ if [ -e /boot/zipl/active_devices.txt ] ; then ++ while read dev etc ; do ++ [ "$dev" = "#" -o "$dev" = "" ] && continue; ++ if [ -z "$cio_accept" ] ; then ++ cio_accept="$dev" ++ else ++ cio_accept="${cio_accept},${dev}" ++ fi ++ done < /boot/zipl/active_devices.txt ++ fi ++ if [ -n "$cio_accept" ] ; then ++ echo "rd.cio_accept=${cio_accept}" + fi + } + + # called by dracut + install() { + if [[ $hostonly_cmdline == "yes" ]];then +- echo $(cmdline) >"${initdir}/etc/cmdline.d/01zipl_dasd.conf" ++ cmdline >> "${initdir}/etc/cmdline.d/01cio_accept.conf" + fi + +- inst_hook pre-mount 10 "$moddir/parse-zipl.sh" +- inst_multiple cio_ignore mount umount mkdir +-} +-installkernel() { +- instmods ext4 ++ inst_hook cmdline 20 "$moddir/parse-cio_accept.sh" ++ inst_multiple cio_ignore + } +diff --git a/modules.d/81cio_ignore/parse-cio_accept.sh b/modules.d/81cio_ignore/parse-cio_accept.sh +new file mode 100644 +index 0000000..fec8a92 +--- /dev/null ++++ b/modules.d/81cio_ignore/parse-cio_accept.sh +@@ -0,0 +1,21 @@ ++#!/bin/sh ++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- ++# ex: ts=8 sw=4 sts=4 et filetype=sh ++ ++CIO_IGNORE=$(getarg cio_ignore) ++CIO_ACCEPT=$(getarg rd.cio_accept) ++ ++if [ -z $CIO_IGNORE ] ; then ++ info "cio_ignored disabled on commandline" ++ return ++fi ++if [ -n "$CIO_ACCEPT" ] ; then ++ IFS=, ++ set -- $CIO_ACCEPT ++ while (($# > 0)) ; do ++ info "Enabling device $1" ++ cio_ignore --remove $1 ++ shift ++ done ++ unset IFS ++fi +diff --git a/modules.d/81cio_ignore/parse-zipl.sh b/modules.d/81cio_ignore/parse-zipl.sh +deleted file mode 100644 +index 9d68c52..0000000 +--- a/modules.d/81cio_ignore/parse-zipl.sh ++++ /dev/null +@@ -1,32 +0,0 @@ +-#!/bin/sh +-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +-# ex: ts=8 sw=4 sts=4 et filetype=sh +- +-ZIPL_DEV=$(getarg rd.zipl_dasd) +-ZIPL_DIR=/boot/zipl +-CIO_REMOVE_LIST=$ZIPL_DIR/active_devices.txt +- +-if ! getarg cio_ignore ; then +- return +-fi +-if [ -n "$ZIPL_DEV" ];then +- info "Waiting for zipl device $ZIPL_DEV" +- wait_for_dev -n "$ZIPL_DEV" +-# +-# mount device and read devices +-# +- [ -d $ZIPL_DIR ] || mkdir -p $ZIPL_DIR +- mount -t ext2 -o ro $ZIPL_DEV $ZIPL_DIR +- if [ -f $CIO_REMOVE_LIST ] ; then +-# +-# File exist +-# +- while read dev etc; do +- [ "$dev" = "#" -o "$dev" = "" ] && continue +- cio_ignore --remove $dev +- done < $CIO_REMOVE_LIST +- fi +- umount $ZIPL_DIR +-else +- warn "No rd.zipl_dasd boot parameter found" +-fi +-- +1.7.12.4 + diff --git a/0071-Fix-non-export-of-journal-dev-boot-options.patch b/0071-Fix-non-export-of-journal-dev-boot-options.patch new file mode 100644 index 0000000..ad0bf4a --- /dev/null +++ b/0071-Fix-non-export-of-journal-dev-boot-options.patch @@ -0,0 +1,32 @@ +From f483c78483992a7778751f9a01bbf09feb2b5bbe Mon Sep 17 00:00:00 2001 +From: Thorsten Behrens +Date: Wed, 18 Jun 2014 01:57:29 +0200 +Subject: 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 +--- + 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 b209ab6..5f1b826 100755 +--- a/modules.d/95rootfs-block/module-setup.sh ++++ b/modules.d/95rootfs-block/module-setup.sh +@@ -45,9 +45,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 +-- +1.8.4.5 + diff --git a/0072-Also-export-root-boot-param-for-hostonly-cmdline-cas.patch b/0072-Also-export-root-boot-param-for-hostonly-cmdline-cas.patch new file mode 100644 index 0000000..f0927bb --- /dev/null +++ b/0072-Also-export-root-boot-param-for-hostonly-cmdline-cas.patch @@ -0,0 +1,50 @@ +From df582ab4c05fc417ce9b6b8a8bed4e259041013b Mon Sep 17 00:00:00 2001 +From: Thorsten Behrens +Date: Wed, 18 Jun 2014 02:00:28 +0200 +Subject: 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 +--- + 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 5f1b826..b868d0b 100755 +--- a/modules.d/95rootfs-block/module-setup.sh ++++ b/modules.d/95rootfs-block/module-setup.sh +@@ -31,14 +31,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 + } + +@@ -47,6 +51,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 +-- +1.8.4.5 + diff --git a/0073-Don-t-create-lots-of-empty-cmdline-files-for-hostonl.patch b/0073-Don-t-create-lots-of-empty-cmdline-files-for-hostonl.patch new file mode 100644 index 0000000..6f09d07 --- /dev/null +++ b/0073-Don-t-create-lots-of-empty-cmdline-files-for-hostonl.patch @@ -0,0 +1,96 @@ +From 706f28a7bc193455fcd0656f70adaee442f12ff8 Mon Sep 17 00:00:00 2001 +From: Thorsten Behrens +Date: Wed, 18 Jun 2014 02:09:38 +0200 +Subject: 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 +--- + 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 | 5 ++--- + 5 files changed, 10 insertions(+), 11 deletions(-) + +diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh +index 5707404..e423a95 100755 +--- a/modules.d/90crypt/module-setup.sh ++++ b/modules.d/90crypt/module-setup.sh +@@ -52,8 +52,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 aebb28d..3769dd0 100755 +--- a/modules.d/90dmraid/module-setup.sh ++++ b/modules.d/90dmraid/module-setup.sh +@@ -66,8 +66,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 5b810b9..2a5b392 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -51,8 +51,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 4963537..da464b8 100755 +--- a/modules.d/90mdraid/module-setup.sh ++++ b/modules.d/90mdraid/module-setup.sh +@@ -73,8 +73,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" + + # Optional uswsusp support + for _bin in /usr/sbin/resume /usr/lib/suspend/resume /usr/lib/uswsusp/resume +-- +1.8.4.5 + diff --git a/0074-More-empty-cmdline-fixes.patch b/0074-More-empty-cmdline-fixes.patch new file mode 100644 index 0000000..d9050c1 --- /dev/null +++ b/0074-More-empty-cmdline-fixes.patch @@ -0,0 +1,80 @@ +From c323ff844931d7b9d171d3c11f8c3152c346a62a Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Wed, 18 Jun 2014 09:59:22 +0200 +Subject: More empty cmdline fixes + +This fixes up some more modules which might print out empty +commandline files. + +Signed-off-by: Hannes Reinecke +--- + modules.d/81cio_ignore/module-setup.sh | 5 +++-- + modules.d/95fcoe/module-setup.sh | 4 ++-- + modules.d/95iscsi/module-setup.sh | 13 +++++++------ + 3 files changed, 12 insertions(+), 10 deletions(-) + +diff --git a/modules.d/81cio_ignore/module-setup.sh b/modules.d/81cio_ignore/module-setup.sh +index 42ae2f9..37b414b 100644 +--- a/modules.d/81cio_ignore/module-setup.sh ++++ b/modules.d/81cio_ignore/module-setup.sh +@@ -30,8 +30,9 @@ cmdline() { + + # called by dracut + install() { +- if [[ $hostonly_cmdline == "yes" ]];then +- cmdline >> "${initdir}/etc/cmdline.d/01cio_accept.conf" ++ if [[ $hostonly_cmdline == "yes" ]] ; then ++ local _cio_accept=$(cmdline) ++ [[ $_cio_accept ]] && printf "%s\n" "$_cio_accept" >> "${initdir}/etc/cmdline.d/01cio_accept.conf" + fi + + inst_hook cmdline 20 "$moddir/parse-cio_accept.sh" +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index 57d5c1e..9ca4c67 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -74,8 +74,8 @@ install() { + mkdir -m 0755 -p "$initdir/var/lib/lldpad" + + if [[ $hostonly_cmdline == "yes" ]] ; then +- cmdline >> "${initdir}/etc/cmdline.d/95fcoe.conf" +- echo >> "${initdir}/etc/cmdline.d/95fcoe.conf" ++ 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" +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index e94e913..b90e298 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -78,12 +78,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() { +@@ -133,6 +127,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" +-- +1.8.4.5 + diff --git a/0075-95dasd_rules-enable-parsing-of-rd.dasd-commandline-p.patch b/0075-95dasd_rules-enable-parsing-of-rd.dasd-commandline-p.patch index 6edb943..7e0bf4c 100644 --- a/0075-95dasd_rules-enable-parsing-of-rd.dasd-commandline-p.patch +++ b/0075-95dasd_rules-enable-parsing-of-rd.dasd-commandline-p.patch @@ -11,11 +11,11 @@ Signed-off-by: Hannes Reinecke modules.d/95dasd_rules/parse-dasd.sh | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) -Index: dracut-041/modules.d/95dasd_rules/parse-dasd.sh -=================================================================== ---- dracut-041.orig/modules.d/95dasd_rules/parse-dasd.sh 2015-03-24 15:13:29.674054260 +0100 -+++ dracut-041/modules.d/95dasd_rules/parse-dasd.sh 2015-03-24 15:13:36.566441368 +0100 -@@ -52,3 +52,40 @@ +diff --git a/modules.d/95dasd_rules/parse-dasd.sh b/modules.d/95dasd_rules/parse-dasd.sh +index 9389c44..a0ba1ff 100755 +--- a/modules.d/95dasd_rules/parse-dasd.sh ++++ b/modules.d/95dasd_rules/parse-dasd.sh +@@ -54,3 +54,40 @@ for dasd_arg in $(getargs root=) $(getargs resume=); do fi ) done @@ -56,3 +56,6 @@ Index: dracut-041/modules.d/95dasd_rules/parse-dasd.sh + done + ) +done +-- +1.8.4.5 + diff --git a/0076-Correctly-set-cio_ignore-for-dynamic-s390-rules.patch b/0076-Correctly-set-cio_ignore-for-dynamic-s390-rules.patch index c18f868..5b8beda 100644 --- a/0076-Correctly-set-cio_ignore-for-dynamic-s390-rules.patch +++ b/0076-Correctly-set-cio_ignore-for-dynamic-s390-rules.patch @@ -13,11 +13,11 @@ Signed-off-by: Hannes Reinecke modules.d/95zfcp_rules/parse-zfcp.sh | 3 +++ 2 files changed, 6 insertions(+) -Index: dracut-041/modules.d/95dasd_rules/parse-dasd.sh -=================================================================== ---- dracut-041.orig/modules.d/95dasd_rules/parse-dasd.sh 2015-03-24 15:13:36.566441368 +0100 -+++ dracut-041/modules.d/95dasd_rules/parse-dasd.sh 2015-03-24 15:13:39.238591451 +0100 -@@ -36,6 +36,9 @@ +diff --git a/modules.d/95dasd_rules/parse-dasd.sh b/modules.d/95dasd_rules/parse-dasd.sh +index a0ba1ff..94a4b30 100755 +--- a/modules.d/95dasd_rules/parse-dasd.sh ++++ b/modules.d/95dasd_rules/parse-dasd.sh +@@ -38,6 +38,9 @@ ACTION=="add", SUBSYSTEM=="ccw", KERNEL=="$ccw", IMPORT{program}="collect $ccw % ACTION=="add", SUBSYSTEM=="drivers", KERNEL=="$_drv", IMPORT{program}="collect $ccw %k ${ccw} $_drv" ACTION=="add", ENV{COLLECT_$ccw}=="0", ATTR{[ccw/$ccw]online}="1" EOF @@ -27,11 +27,11 @@ Index: dracut-041/modules.d/95dasd_rules/parse-dasd.sh } for dasd_arg in $(getargs root=) $(getargs resume=); do -Index: dracut-041/modules.d/95zfcp_rules/parse-zfcp.sh -=================================================================== ---- dracut-041.orig/modules.d/95zfcp_rules/parse-zfcp.sh 2015-03-24 15:13:26.593881271 +0100 -+++ dracut-041/modules.d/95zfcp_rules/parse-zfcp.sh 2015-03-24 15:13:39.238591451 +0100 -@@ -35,6 +35,9 @@ +diff --git a/modules.d/95zfcp_rules/parse-zfcp.sh b/modules.d/95zfcp_rules/parse-zfcp.sh +index 24dbdd3..8538ae3 100755 +--- a/modules.d/95zfcp_rules/parse-zfcp.sh ++++ b/modules.d/95zfcp_rules/parse-zfcp.sh +@@ -37,6 +37,9 @@ EOF ACTION=="add", KERNEL=="rport-*", ATTR{port_name}=="$wwpn", SUBSYSTEMS=="ccw", KERNELS=="$ccw", ATTR{[ccw/$ccw]$wwpn/unit_add}="$lun" EOF fi @@ -41,3 +41,6 @@ Index: dracut-041/modules.d/95zfcp_rules/parse-zfcp.sh } for zfcp_arg in $(getargs rd.zfcp); do +-- +1.8.4.5 + diff --git a/0077-90multipath-add-missing-11-dm-mpath.rules-file.patch b/0077-90multipath-add-missing-11-dm-mpath.rules-file.patch new file mode 100644 index 0000000..11711bf --- /dev/null +++ b/0077-90multipath-add-missing-11-dm-mpath.rules-file.patch @@ -0,0 +1,31 @@ +From 3d4030e354b12686cb91d41a1ec8bc00df37ea5f Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Wed, 18 Jun 2014 17:48:16 +0200 +Subject: 90multipath: add missing 11-dm-mpath.rules file + +The 11-dm-mpath.rules file had been missing, causing +blacklisting to not work properly. + +References: bnc#883149 + +Signed-off-by: Hannes Reinecke +--- + modules.d/90multipath/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh +index 7b20709..22ff580 100755 +--- a/modules.d/90multipath/module-setup.sh ++++ b/modules.d/90multipath/module-setup.sh +@@ -102,7 +102,7 @@ install() { + + inst_hook cleanup 80 "$moddir/multipathd-needshutdown.sh" + +- inst_rules 56-multipath.rules \ ++ inst_rules 11-dm-mpath.rules 56-multipath.rules \ + 66-kpartx.rules 67-kpartx-compat.rules + } + +-- +1.8.4.5 + diff --git a/0078-Restore-original-IFS-value.patch b/0078-Restore-original-IFS-value.patch new file mode 100644 index 0000000..747a073 --- /dev/null +++ b/0078-Restore-original-IFS-value.patch @@ -0,0 +1,227 @@ +From 3ad963984b30a990c1ac94c81deb410322daafb6 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Mon, 23 Jun 2014 14:06:47 +0200 +Subject: Restore original IFS value + +Whenever the IFS setting is modified it needs to be restored to +its original value. Otherwise it'll lead to unexpected results. + +References: bnc#883770 + +Signed-off-by: Hannes Reinecke +--- + modules.d/81cio_ignore/parse-cio_accept.sh | 3 ++- + modules.d/90kernel-modules/insmodpost.sh | 2 +- + modules.d/90kernel-modules/parse-kernel.sh | 4 ++++ + modules.d/95dasd/parse-dasd.sh | 2 +- + modules.d/95dasd_rules/parse-dasd.sh | 8 +++++--- + modules.d/95iscsi/module-setup.sh | 6 ++++-- + modules.d/95zfcp/parse-zfcp.sh | 2 +- + modules.d/95zfcp_rules/parse-zfcp.sh | 4 +++- + modules.d/98systemd/dracut-pre-udev.sh | 4 ++-- + 9 files changed, 23 insertions(+), 12 deletions(-) + +diff --git a/modules.d/81cio_ignore/parse-cio_accept.sh b/modules.d/81cio_ignore/parse-cio_accept.sh +index fec8a92..4f899d2 100644 +--- a/modules.d/81cio_ignore/parse-cio_accept.sh ++++ b/modules.d/81cio_ignore/parse-cio_accept.sh +@@ -10,6 +10,7 @@ if [ -z $CIO_IGNORE ] ; then + return + fi + if [ -n "$CIO_ACCEPT" ] ; then ++ OLDIFS="$IFS" + IFS=, + set -- $CIO_ACCEPT + while (($# > 0)) ; do +@@ -17,5 +18,5 @@ if [ -n "$CIO_ACCEPT" ] ; then + cio_ignore --remove $1 + shift + done +- unset IFS ++ IFS="$OLDIFS" + fi +diff --git a/modules.d/90kernel-modules/insmodpost.sh b/modules.d/90kernel-modules/insmodpost.sh +index d2b8723..141f091 100755 +--- a/modules.d/90kernel-modules/insmodpost.sh ++++ b/modules.d/90kernel-modules/insmodpost.sh +@@ -6,7 +6,7 @@ + + for modlist in $(getargs rd.driver.post -d rdinsmodpost=); do + ( +- IFS=, ++ local IFS=, + for m in $modlist; do + modprobe $m + done +diff --git a/modules.d/90kernel-modules/parse-kernel.sh b/modules.d/90kernel-modules/parse-kernel.sh +index fa891bf..e012e52 100755 +--- a/modules.d/90kernel-modules/parse-kernel.sh ++++ b/modules.d/90kernel-modules/parse-kernel.sh +@@ -13,10 +13,12 @@ fi + + for i in $(getargs rd.driver.pre -d rdloaddriver=); do + ( ++ OLDIFS="$IFS" + IFS=, + for p in $i; do + modprobe $p 2>&1 | vinfo + done ++ IFS="$OLDIFS" + ) + done + +@@ -25,10 +27,12 @@ done + + for i in $(getargs rd.driver.blacklist -d rdblacklist=); do + ( ++ OLDIFS="$IFS" + IFS=, + for p in $i; do + echo "blacklist $p" >> $_modprobe_d/initramfsblacklist.conf + done ++ IFS="$OLDIFS" + ) + done + +diff --git a/modules.d/95dasd/parse-dasd.sh b/modules.d/95dasd/parse-dasd.sh +index 1aa1455..aba720b 100755 +--- a/modules.d/95dasd/parse-dasd.sh ++++ b/modules.d/95dasd/parse-dasd.sh +@@ -3,7 +3,7 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + for dasd_arg in $(getargs rd.dasd= -d rd_DASD= DASD=); do + ( +- IFS="," ++ local IFS="," + set -- $dasd_arg + echo "$@" | normalize_dasd_arg >> /etc/dasd.conf + ) +diff --git a/modules.d/95dasd_rules/parse-dasd.sh b/modules.d/95dasd_rules/parse-dasd.sh +index 94a4b30..02b4aea 100755 +--- a/modules.d/95dasd_rules/parse-dasd.sh ++++ b/modules.d/95dasd_rules/parse-dasd.sh +@@ -51,8 +51,10 @@ for dasd_arg in $(getargs root=) $(getargs resume=); do + break; + esac + if [ -n "$ccw_arg" ] ; then ++ OLDIFS="$IFS" + IFS="-" + set -- $ccw_arg ++ IFS="$OLDIFS" + create_udev_rule $2 + fi + ) +@@ -60,9 +62,8 @@ done + + for dasd_arg in $(getargs rd.dasd=); do + ( +- IFS="," ++ local IFS="," + set -- $dasd_arg +- unset IFS + while (($# > 0)); do + case $1 in + autodetect|probeonly) +@@ -70,13 +71,14 @@ for dasd_arg in $(getargs rd.dasd=); do + ;; + *-*) + range=$1 ++ OLDIFS="$IFS" + IFS="-" + set -- $range + start=${1#0.0.} + shift + end=${1#0.0.} + shift +- unset IFS ++ IFS="$OLDIFS" + for dev in $(seq $(( 10#$start )) $(( 10#$end )) ) ; do + create_udev_rule $(printf "0.0.%04d" "$dev") + done +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index b90e298..cfa6f39 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -3,16 +3,18 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + + get_ibft_mod() { +- local ibft_mac=$1 ++ local ibft_mac=$1 IFS + # Return the iSCSI offload module for a given MAC address + iscsiadm -m iface | while read iface_name iface_desc ; do ++ OLDIFS="$IFS" + IFS=$',' + set -- $iface_desc ++ IFS="$OLDIFS" + if [ "$ibft_mac" = "$2" ] ; then + echo $1 + return 0 + fi +- unset IFS ++ + done + } + +diff --git a/modules.d/95zfcp/parse-zfcp.sh b/modules.d/95zfcp/parse-zfcp.sh +index 9b22d93..1d21472 100755 +--- a/modules.d/95zfcp/parse-zfcp.sh ++++ b/modules.d/95zfcp/parse-zfcp.sh +@@ -6,7 +6,7 @@ getargbool 1 rd.zfcp.conf -d -n rd_NO_ZFCPCONF || rm /etc/zfcp.conf + + for zfcp_arg in $(getargs rd.zfcp -d 'rd_ZFCP='); do + ( +- IFS="," ++ local IFS="," + set $zfcp_arg + echo "$@" >> /etc/zfcp.conf + ) +diff --git a/modules.d/95zfcp_rules/parse-zfcp.sh b/modules.d/95zfcp_rules/parse-zfcp.sh +index 8538ae3..56152da 100755 +--- a/modules.d/95zfcp_rules/parse-zfcp.sh ++++ b/modules.d/95zfcp_rules/parse-zfcp.sh +@@ -44,7 +44,7 @@ EOF + + for zfcp_arg in $(getargs rd.zfcp); do + ( +- IFS="," ++ local IFS="," + set $zfcp_arg + create_udev_rule $1 $2 $3 + ) +@@ -58,8 +58,10 @@ for zfcp_arg in $(getargs root=) $(getargs resume=); do + break; + esac + if [ -n "$ccw_arg" ] ; then ++ OLDIFS="$IFS" + IFS="-" + set -- $ccw_arg ++ IFS="$OLDIFS" + wwpn=${4%:*} + lun=${4#*:} + create_udev_rule $2 $wwpn $lun +diff --git a/modules.d/98systemd/dracut-pre-udev.sh b/modules.d/98systemd/dracut-pre-udev.sh +index 638da40..77977d2 100755 +--- a/modules.d/98systemd/dracut-pre-udev.sh ++++ b/modules.d/98systemd/dracut-pre-udev.sh +@@ -26,7 +26,7 @@ fi + + for i in $(getargs rd.driver.pre -d rdloaddriver=); do + ( +- IFS=, ++ local IFS=, + for p in $i; do + modprobe $p 2>&1 | vinfo + done +@@ -38,7 +38,7 @@ done + + for i in $(getargs rd.driver.blacklist -d rdblacklist=); do + ( +- IFS=, ++ local IFS=, + for p in $i; do + echo "blacklist $p" >> $_modprobe_d/initramfsblacklist.conf + done +-- +1.8.4.5 + diff --git a/0079-95dasd_rules-fixup-rd.dasd-parsing.patch b/0079-95dasd_rules-fixup-rd.dasd-parsing.patch index 4cb4260..55f696d 100644 --- a/0079-95dasd_rules-fixup-rd.dasd-parsing.patch +++ b/0079-95dasd_rules-fixup-rd.dasd-parsing.patch @@ -12,11 +12,11 @@ Signed-off-by: Hannes Reinecke modules.d/95dasd_rules/parse-dasd.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) -Index: dracut-041/modules.d/95dasd_rules/parse-dasd.sh -=================================================================== ---- dracut-041.orig/modules.d/95dasd_rules/parse-dasd.sh 2015-03-17 13:19:07.747002492 +0100 -+++ dracut-041/modules.d/95dasd_rules/parse-dasd.sh 2015-03-17 13:19:29.908237657 +0100 -@@ -29,6 +29,10 @@ +diff --git a/modules.d/95dasd_rules/parse-dasd.sh b/modules.d/95dasd_rules/parse-dasd.sh +index 02b4aea..43ca87a 100755 +--- a/modules.d/95dasd_rules/parse-dasd.sh ++++ b/modules.d/95dasd_rules/parse-dasd.sh +@@ -31,6 +31,10 @@ create_udev_rule() { esac [ -z "${_drv}" ] && return 0 @@ -27,7 +27,7 @@ Index: dracut-041/modules.d/95dasd_rules/parse-dasd.sh [ -e ${_rule} ] && return 0 cat > $_rule < modules.d/95dasd_rules/module-setup.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) -Index: dracut-041/modules.d/95dasd_rules/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/95dasd_rules/module-setup.sh 2015-03-17 13:19:49.341320467 +0100 -+++ dracut-041/modules.d/95dasd_rules/module-setup.sh 2015-03-17 13:19:49.873350116 +0100 -@@ -1,10 +1,39 @@ - #!/bin/bash +diff --git a/modules.d/95dasd_rules/module-setup.sh b/modules.d/95dasd_rules/module-setup.sh +index 451fc25..e4736a2 100755 +--- a/modules.d/95dasd_rules/module-setup.sh ++++ b/modules.d/95dasd_rules/module-setup.sh +@@ -3,10 +3,39 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh # called by dracut +cmdline() { @@ -58,7 +58,7 @@ Index: dracut-041/modules.d/95dasd_rules/module-setup.sh return 0 } -@@ -17,6 +46,10 @@ +@@ -19,6 +48,10 @@ depends() { # called by dracut install() { inst_hook cmdline 30 "$moddir/parse-dasd.sh" @@ -69,3 +69,6 @@ Index: dracut-041/modules.d/95dasd_rules/module-setup.sh if [[ $hostonly ]] ; then inst_rules_wildcard 51-dasd-*.rules inst_rules_wildcard 41-s390x-dasd-*.rules +-- +1.8.4.5 + diff --git a/0081-95dasd_mod-do-not-set-module-parameters-if-dasd_cio_.patch b/0081-95dasd_mod-do-not-set-module-parameters-if-dasd_cio_.patch index 1914672..888bc5c 100644 --- a/0081-95dasd_mod-do-not-set-module-parameters-if-dasd_cio_.patch +++ b/0081-95dasd_mod-do-not-set-module-parameters-if-dasd_cio_.patch @@ -12,11 +12,11 @@ Signed-off-by: Hannes Reinecke modules.d/95dasd_mod/parse-dasd-mod.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: dracut-041/modules.d/95dasd_mod/parse-dasd-mod.sh -=================================================================== ---- dracut-041.orig/modules.d/95dasd_mod/parse-dasd-mod.sh 2015-03-24 15:14:11.284391294 +0100 -+++ dracut-041/modules.d/95dasd_mod/parse-dasd-mod.sh 2015-03-24 15:14:27.173283690 +0100 -@@ -7,7 +7,7 @@ +diff --git a/modules.d/95dasd_mod/parse-dasd-mod.sh b/modules.d/95dasd_mod/parse-dasd-mod.sh +index 0236d12..0b8adef 100755 +--- a/modules.d/95dasd_mod/parse-dasd-mod.sh ++++ b/modules.d/95dasd_mod/parse-dasd-mod.sh +@@ -9,7 +9,7 @@ done mod_args="${mod_args#*,}" @@ -25,3 +25,6 @@ Index: dracut-041/modules.d/95dasd_mod/parse-dasd-mod.sh [ -d /etc/modprobe.d ] || mkdir -m 0755 -p /etc/modprobe.d echo "options dasd_mod dasd=$mod_args" >> /etc/modprobe.d/dasd_mod.conf fi +-- +1.8.4.5 + diff --git a/0082-00warpclock-check-for-sbin-hwclock.patch b/0082-00warpclock-check-for-sbin-hwclock.patch new file mode 100644 index 0000000..cdc2a4e --- /dev/null +++ b/0082-00warpclock-check-for-sbin-hwclock.patch @@ -0,0 +1,32 @@ +From 354e32e863a19d3539c3bf1b6affc98630b0003d Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Thu, 26 Jun 2014 10:44:42 +0200 +Subject: 00warpclock: check for /sbin/hwclock + +We need to check if /sbin/hwclock exists to avoid error messages +when running dracut. + +References: bnc#884513 + +Signed-off-by: Hannes Reinecke +--- + modules.d/00warpclock/module-setup.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/00warpclock/module-setup.sh b/modules.d/00warpclock/module-setup.sh +index 4d18795..5aec4eb 100755 +--- a/modules.d/00warpclock/module-setup.sh ++++ b/modules.d/00warpclock/module-setup.sh +@@ -4,7 +4,8 @@ + + # called by dracut + check() { +- [ -e /etc/localtime -a -e /etc/adjtime ] ++ [ -e /etc/localtime -a -e /etc/adjtime ] || return 1 ++ require_binaries /sbin/hwclock || return 1 + } + + # called by dracut +-- +1.8.4.5 + diff --git a/0083-95zfcp_rules-Fixup-rd.zfcp-parsing.patch b/0083-95zfcp_rules-Fixup-rd.zfcp-parsing.patch index 1d04eeb..6548896 100644 --- a/0083-95zfcp_rules-Fixup-rd.zfcp-parsing.patch +++ b/0083-95zfcp_rules-Fixup-rd.zfcp-parsing.patch @@ -11,11 +11,11 @@ Signed-off-by: Hannes Reinecke modules.d/95zfcp_rules/parse-zfcp.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) -Index: dracut-041/modules.d/95zfcp_rules/parse-zfcp.sh -=================================================================== ---- dracut-041.orig/modules.d/95zfcp_rules/parse-zfcp.sh 2015-03-17 13:20:19.735014330 +0100 -+++ dracut-041/modules.d/95zfcp_rules/parse-zfcp.sh 2015-03-17 13:20:19.835019903 +0100 -@@ -5,9 +5,7 @@ +diff --git a/modules.d/95zfcp_rules/parse-zfcp.sh b/modules.d/95zfcp_rules/parse-zfcp.sh +index 56152da..bb5cd3a 100755 +--- a/modules.d/95zfcp_rules/parse-zfcp.sh ++++ b/modules.d/95zfcp_rules/parse-zfcp.sh +@@ -7,9 +7,7 @@ create_udev_rule() { local wwpn=$2 local lun=$3 local _rule=/etc/udev/rules.d/51-zfcp-${ccw}.rules @@ -25,7 +25,7 @@ Index: dracut-041/modules.d/95zfcp_rules/parse-zfcp.sh if [ -e /sys/bus/ccw/devices/${ccw} ] ; then read _cu_type < /sys/bus/ccw/devices/${ccw}/cutype -@@ -20,6 +18,10 @@ +@@ -22,6 +20,10 @@ create_udev_rule() { return 0; fi @@ -36,7 +36,7 @@ Index: dracut-041/modules.d/95zfcp_rules/parse-zfcp.sh [ -e ${_rule} ] && return 0 if [ ! -f "$_rule" ] ; then -@@ -35,9 +37,6 @@ +@@ -37,9 +39,6 @@ EOF ACTION=="add", KERNEL=="rport-*", ATTR{port_name}=="$wwpn", SUBSYSTEMS=="ccw", KERNELS=="$ccw", ATTR{[ccw/$ccw]$wwpn/unit_add}="$lun" EOF fi @@ -46,7 +46,7 @@ Index: dracut-041/modules.d/95zfcp_rules/parse-zfcp.sh } for zfcp_arg in $(getargs rd.zfcp); do -@@ -53,7 +52,7 @@ +@@ -55,7 +54,7 @@ for zfcp_arg in $(getargs root=) $(getargs resume=); do case $zfcp_arg in /dev/disk/by-path/ccw-*) ccw_arg=${zfcp_arg##*/} @@ -54,4 +54,7 @@ Index: dracut-041/modules.d/95zfcp_rules/parse-zfcp.sh + ;; esac if [ -n "$ccw_arg" ] ; then - IFS="-" + OLDIFS="$IFS" +-- +1.8.4.5 + diff --git a/0084-95rootfs-block-Correctly-terminate-commandline-param.patch b/0084-95rootfs-block-Correctly-terminate-commandline-param.patch new file mode 100644 index 0000000..434a9c1 --- /dev/null +++ b/0084-95rootfs-block-Correctly-terminate-commandline-param.patch @@ -0,0 +1,61 @@ +From 21e4cbee5d852108880cedc9edc619cdd9b296a5 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Thu, 26 Jun 2014 13:41:56 +0200 +Subject: 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 +--- + 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 a58e134..40006e7 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1166,7 +1166,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 b868d0b..a620786 100755 +--- a/modules.d/95rootfs-block/module-setup.sh ++++ b/modules.d/95rootfs-block/module-setup.sh +@@ -24,7 +24,7 @@ cmdline_journal() { + fi + + if [ -n "$journaldev" ]; then +- printf " root.journaldev=%s" "$journaldev" ++ echo "root.journaldev=${journaldev}" + fi + done + fi +@@ -34,9 +34,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 + } + +-- +1.8.4.5 + diff --git a/0085-95zfcp_rules-print-out-rd.zfcp-commandline-parameter.patch b/0085-95zfcp_rules-print-out-rd.zfcp-commandline-parameter.patch index 84d83d9..d8be8f2 100644 --- a/0085-95zfcp_rules-print-out-rd.zfcp-commandline-parameter.patch +++ b/0085-95zfcp_rules-print-out-rd.zfcp-commandline-parameter.patch @@ -11,12 +11,12 @@ Signed-off-by: Hannes Reinecke modules.d/95zfcp_rules/module-setup.sh | 39 +++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) -Index: dracut-041/modules.d/95zfcp_rules/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/95zfcp_rules/module-setup.sh 2015-03-17 13:20:39.928139743 +0100 -+++ dracut-041/modules.d/95zfcp_rules/module-setup.sh 2015-03-17 13:20:40.528173186 +0100 -@@ -1,10 +1,40 @@ - #!/bin/bash +diff --git a/modules.d/95zfcp_rules/module-setup.sh b/modules.d/95zfcp_rules/module-setup.sh +index 849645c..3f80754 100755 +--- a/modules.d/95zfcp_rules/module-setup.sh ++++ b/modules.d/95zfcp_rules/module-setup.sh +@@ -3,10 +3,40 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh # called by dracut +cmdline() { @@ -57,7 +57,7 @@ Index: dracut-041/modules.d/95zfcp_rules/module-setup.sh return 0 } -@@ -17,6 +47,13 @@ +@@ -19,6 +49,13 @@ depends() { install() { inst_multiple /usr/lib/udev/collect inst_hook cmdline 30 "$moddir/parse-zfcp.sh" @@ -71,3 +71,6 @@ Index: dracut-041/modules.d/95zfcp_rules/module-setup.sh if [[ $hostonly ]] ; then inst_rules_wildcard 51-zfcp-*.rules inst_rules_wildcard 41-s390x-zfcp-*.rules +-- +1.8.4.5 + diff --git a/0086-95zfcp_rules-Auto-generate-udev-rule-for-ipl-device.patch b/0086-95zfcp_rules-Auto-generate-udev-rule-for-ipl-device.patch index 9a3b578..f8a04f8 100644 --- a/0086-95zfcp_rules-Auto-generate-udev-rule-for-ipl-device.patch +++ b/0086-95zfcp_rules-Auto-generate-udev-rule-for-ipl-device.patch @@ -11,11 +11,11 @@ Signed-off-by: Hannes Reinecke modules.d/95zfcp_rules/parse-zfcp.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) -Index: dracut-041/modules.d/95zfcp_rules/parse-zfcp.sh -=================================================================== ---- dracut-041.orig/modules.d/95zfcp_rules/parse-zfcp.sh 2015-03-17 13:21:03.397447784 +0100 -+++ dracut-041/modules.d/95zfcp_rules/parse-zfcp.sh 2015-03-17 13:29:52.590839805 +0100 -@@ -39,6 +39,17 @@ +diff --git a/modules.d/95zfcp_rules/parse-zfcp.sh b/modules.d/95zfcp_rules/parse-zfcp.sh +index bb5cd3a..05c1ed0 100755 +--- a/modules.d/95zfcp_rules/parse-zfcp.sh ++++ b/modules.d/95zfcp_rules/parse-zfcp.sh +@@ -41,6 +41,17 @@ EOF fi } @@ -32,8 +32,8 @@ Index: dracut-041/modules.d/95zfcp_rules/parse-zfcp.sh + for zfcp_arg in $(getargs rd.zfcp); do ( - IFS="," -@@ -49,6 +60,9 @@ + local IFS="," +@@ -51,6 +62,9 @@ done for zfcp_arg in $(getargs root=) $(getargs resume=); do ( @@ -43,10 +43,10 @@ Index: dracut-041/modules.d/95zfcp_rules/parse-zfcp.sh case $zfcp_arg in /dev/disk/by-path/ccw-*) ccw_arg=${zfcp_arg##*/} -@@ -57,8 +71,8 @@ - if [ -n "$ccw_arg" ] ; then +@@ -61,8 +75,8 @@ for zfcp_arg in $(getargs root=) $(getargs resume=); do IFS="-" set -- $ccw_arg + IFS="$OLDIFS" - wwpn=${4%:*} - lun=${4#*:} + _wwpn=${4%:*} @@ -54,3 +54,6 @@ Index: dracut-041/modules.d/95zfcp_rules/parse-zfcp.sh create_udev_rule $2 $wwpn $lun fi ) +-- +1.8.4.5 + diff --git a/0087-95dasd_rules-Auto-generate-udev-rule-for-ipl-device.patch b/0087-95dasd_rules-Auto-generate-udev-rule-for-ipl-device.patch index 18b9c63..bd24b5e 100644 --- a/0087-95dasd_rules-Auto-generate-udev-rule-for-ipl-device.patch +++ b/0087-95dasd_rules-Auto-generate-udev-rule-for-ipl-device.patch @@ -11,11 +11,11 @@ Signed-off-by: Hannes Reinecke modules.d/95dasd_rules/parse-dasd.sh | 9 +++++++++ 1 file changed, 9 insertions(+) -Index: dracut-041/modules.d/95dasd_rules/parse-dasd.sh -=================================================================== ---- dracut-041.orig/modules.d/95dasd_rules/parse-dasd.sh 2015-03-24 15:15:10.763731992 +0100 -+++ dracut-041/modules.d/95dasd_rules/parse-dasd.sh 2015-03-24 15:15:19.484221789 +0100 -@@ -42,6 +42,15 @@ +diff --git a/modules.d/95dasd_rules/parse-dasd.sh b/modules.d/95dasd_rules/parse-dasd.sh +index 43ca87a..7b6a3d2 100755 +--- a/modules.d/95dasd_rules/parse-dasd.sh ++++ b/modules.d/95dasd_rules/parse-dasd.sh +@@ -44,6 +44,15 @@ ACTION=="add", ENV{COLLECT_$ccw}=="0", ATTR{[ccw/$ccw]online}="1" EOF } @@ -31,3 +31,6 @@ Index: dracut-041/modules.d/95dasd_rules/parse-dasd.sh for dasd_arg in $(getargs root=) $(getargs resume=); do ( case $dasd_arg in +-- +1.8.4.5 + diff --git a/0088-91zipl-Add-new-module-to-update-s390x-configuration.patch b/0088-91zipl-Add-new-module-to-update-s390x-configuration.patch index d45522a..de6a324 100644 --- a/0088-91zipl-Add-new-module-to-update-s390x-configuration.patch +++ b/0088-91zipl-Add-new-module-to-update-s390x-configuration.patch @@ -19,11 +19,11 @@ Signed-off-by: Hannes Reinecke create mode 100644 modules.d/91zipl/module-setup.sh create mode 100644 modules.d/91zipl/parse-zipl.sh -Index: dracut-041/dracut.cmdline.7.asc -=================================================================== ---- dracut-041.orig/dracut.cmdline.7.asc 2015-03-24 15:15:10.423712894 +0100 -+++ dracut-041/dracut.cmdline.7.asc 2015-03-24 15:15:22.356383108 +0100 -@@ -872,6 +872,20 @@ +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 0f1ef82..c7508ca 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -726,6 +726,20 @@ CIO_IGNORE rd.cio_accept=0.0.0180,0.0.0800,0.0.0801,0.0.0802 -- @@ -44,10 +44,11 @@ Index: dracut-041/dracut.cmdline.7.asc Plymouth Boot Splash ~~~~~~~~~~~~~~~~~~~~ **plymouth.enable=0**:: -Index: dracut-041/modules.d/91zipl/install_zipl_cmdline.sh -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ dracut-041/modules.d/91zipl/install_zipl_cmdline.sh 2015-03-24 15:15:22.356383108 +0100 +diff --git a/modules.d/91zipl/install_zipl_cmdline.sh b/modules.d/91zipl/install_zipl_cmdline.sh +new file mode 100644 +index 0000000..8b454b8 +--- /dev/null ++++ b/modules.d/91zipl/install_zipl_cmdline.sh @@ -0,0 +1,33 @@ +#!/bin/bash + @@ -82,10 +83,11 @@ Index: dracut-041/modules.d/91zipl/install_zipl_cmdline.sh +> /tmp/install.zipl.cmdline-done + +exit 0 -Index: dracut-041/modules.d/91zipl/module-setup.sh -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ dracut-041/modules.d/91zipl/module-setup.sh 2015-03-24 15:15:22.356383108 +0100 +diff --git a/modules.d/91zipl/module-setup.sh b/modules.d/91zipl/module-setup.sh +new file mode 100644 +index 0000000..a8d95c5 +--- /dev/null ++++ b/modules.d/91zipl/module-setup.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- @@ -132,10 +134,11 @@ Index: dracut-041/modules.d/91zipl/module-setup.sh + fi + dracut_need_initqueue +} -Index: dracut-041/modules.d/91zipl/parse-zipl.sh -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ dracut-041/modules.d/91zipl/parse-zipl.sh 2015-03-24 15:15:22.356383108 +0100 +diff --git a/modules.d/91zipl/parse-zipl.sh b/modules.d/91zipl/parse-zipl.sh +new file mode 100644 +index 0000000..f8c2ca4 +--- /dev/null ++++ b/modules.d/91zipl/parse-zipl.sh @@ -0,0 +1,41 @@ +#!/bin/sh +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- @@ -178,3 +181,6 @@ Index: dracut-041/modules.d/91zipl/parse-zipl.sh + fi + wait_for_dev -n "$zipl_arg" +fi +-- +1.8.4.5 + diff --git a/0089-40network-create-var-lib-wicked-in-ifup.sh.patch b/0089-40network-create-var-lib-wicked-in-ifup.sh.patch index 5b85ab3..58345ba 100644 --- a/0089-40network-create-var-lib-wicked-in-ifup.sh.patch +++ b/0089-40network-create-var-lib-wicked-in-ifup.sh.patch @@ -13,11 +13,11 @@ Signed-off-by: Hannes Reinecke modules.d/40network/ifup.sh | 2 ++ 1 file changed, 2 insertions(+) -Index: dracut-041/modules.d/40network/ifup.sh -=================================================================== ---- dracut-041.orig/modules.d/40network/ifup.sh 2015-03-24 15:15:10.003689302 +0100 -+++ dracut-041/modules.d/40network/ifup.sh 2015-03-24 15:15:25.332550269 +0100 -@@ -18,6 +18,8 @@ +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 494017b..6f279a4 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -20,6 +20,8 @@ netif=$1 use_bridge='false' use_vlan='false' @@ -26,3 +26,6 @@ Index: dracut-041/modules.d/40network/ifup.sh # enslave this interface to bond? for i in /tmp/bond.*.info; do [ -e "$i" ] || continue +-- +1.8.4.5 + diff --git a/0090-dracut-caps-Remove-whole-caps-module.patch b/0090-dracut-caps-Remove-whole-caps-module.patch index fda038e..268ea7a 100644 --- a/0090-dracut-caps-Remove-whole-caps-module.patch +++ b/0090-dracut-caps-Remove-whole-caps-module.patch @@ -17,10 +17,11 @@ Signed-off-by: Thomas Renninger delete mode 100755 modules.d/02caps/caps.sh delete mode 100755 modules.d/02caps/module-setup.sh -Index: dracut-041/modules.d/02caps/README -=================================================================== ---- dracut-041.orig/modules.d/02caps/README 2015-01-31 12:54:52.000000000 +0100 -+++ /dev/null 1970-01-01 00:00:00.000000000 +0000 +diff --git a/modules.d/02caps/README b/modules.d/02caps/README +deleted file mode 100644 +index 34e0f02..0000000 +--- a/modules.d/02caps/README ++++ /dev/null @@ -1,33 +0,0 @@ -This adds the following parameters: -rd.caps=1 @@ -55,12 +56,15 @@ Index: dracut-041/modules.d/02caps/README - jbd mbcache sd_mod crc_t10dif sr_mod cdrom ata_generic pata_acpi ata_piix - dm_mod" \ - /boot/initramfs-caps.img -Index: dracut-041/modules.d/02caps/caps.sh -=================================================================== ---- dracut-041.orig/modules.d/02caps/caps.sh 2015-03-17 13:30:53.230199929 +0100 -+++ /dev/null 1970-01-01 00:00:00.000000000 +0000 -@@ -1,34 +0,0 @@ +diff --git a/modules.d/02caps/caps.sh b/modules.d/02caps/caps.sh +deleted file mode 100755 +index 6a8fe5d..0000000 +--- a/modules.d/02caps/caps.sh ++++ /dev/null +@@ -1,36 +0,0 @@ -#!/bin/bash +-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +-# ex: ts=8 sw=4 sts=4 et filetype=sh - -capsmode=$(getarg rd.caps) - @@ -94,12 +98,15 @@ Index: dracut-041/modules.d/02caps/caps.sh - info "Will drop capabilities $CAPS_INIT_DROP from init." -fi - -Index: dracut-041/modules.d/02caps/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/02caps/module-setup.sh 2015-03-17 13:30:53.238200386 +0100 -+++ /dev/null 1970-01-01 00:00:00.000000000 +0000 -@@ -1,24 +0,0 @@ +diff --git a/modules.d/02caps/module-setup.sh b/modules.d/02caps/module-setup.sh +deleted file mode 100755 +index 46e35a0..0000000 +--- a/modules.d/02caps/module-setup.sh ++++ /dev/null +@@ -1,26 +0,0 @@ -#!/bin/bash +-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +-# ex: ts=8 sw=4 sts=4 et filetype=sh - -# called by dracut -check() { @@ -123,3 +130,6 @@ Index: dracut-041/modules.d/02caps/module-setup.sh - fi -} - +-- +1.8.4.5 + diff --git a/0091-dracut-biosdevname-In-SUSE-biosdevname-package-is-in.patch b/0091-dracut-biosdevname-In-SUSE-biosdevname-package-is-in.patch index 69d6476..ac52377 100644 --- a/0091-dracut-biosdevname-In-SUSE-biosdevname-package-is-in.patch +++ b/0091-dracut-biosdevname-In-SUSE-biosdevname-package-is-in.patch @@ -12,11 +12,11 @@ Signed-off-by: Thomas Renninger modules.d/97biosdevname/module-setup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -Index: dracut-041/modules.d/97biosdevname/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/97biosdevname/module-setup.sh 2015-01-31 12:54:52.000000000 +0100 -+++ dracut-041/modules.d/97biosdevname/module-setup.sh 2015-03-24 15:15:31.680906812 +0100 -@@ -3,7 +3,8 @@ +diff --git a/modules.d/97biosdevname/module-setup.sh b/modules.d/97biosdevname/module-setup.sh +index e285a7f..41ee39f 100755 +--- a/modules.d/97biosdevname/module-setup.sh ++++ b/modules.d/97biosdevname/module-setup.sh +@@ -5,7 +5,8 @@ # called by dracut check() { [[ "$mount_needs" ]] && return 1 @@ -26,3 +26,6 @@ Index: dracut-041/modules.d/97biosdevname/module-setup.sh return 0 } +-- +1.8.4.5 + diff --git a/0092-dracut-nbd-Only-complain-of-missing-binary-in-hoston.patch b/0092-dracut-nbd-Only-complain-of-missing-binary-in-hoston.patch new file mode 100644 index 0000000..878749f --- /dev/null +++ b/0092-dracut-nbd-Only-complain-of-missing-binary-in-hoston.patch @@ -0,0 +1,40 @@ +From e4e24c1e841f91987561c1970148872214bbaaf8 Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Tue, 1 Jul 2014 13:54:04 +0200 +Subject: 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 e62f290..dc5102e 100755 +--- a/modules.d/95nbd/module-setup.sh ++++ b/modules.d/95nbd/module-setup.sh +@@ -5,8 +5,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. +@@ -17,6 +15,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 + } +-- +1.8.4.5 + diff --git a/0093-95iscsi-generate-commandline-for-software-iscsi.patch b/0093-95iscsi-generate-commandline-for-software-iscsi.patch new file mode 100644 index 0000000..c421606 --- /dev/null +++ b/0093-95iscsi-generate-commandline-for-software-iscsi.patch @@ -0,0 +1,123 @@ +From a7bac2f8271ff195fa0a5c021f40b7eeb48b3681 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Wed, 2 Jul 2014 10:36:50 +0200 +Subject: 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 + +Signed-off-by: Hannes Reinecke +--- + modules.d/95iscsi/module-setup.sh | 80 +++++++++++++++++++++++++++++++++++++-- + 1 file changed, 77 insertions(+), 3 deletions(-) + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index cfa6f39..e9bed24 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -43,6 +43,75 @@ 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 ++ ++ local_address=$(ip -o route get to $iscsi_address | cut -f 1 -d ' ') ++ ifname=$(ip addr show to $local_address | head -1 | sed -n 's/[0-9]*: \(.*\): .*/\1/p') ++ if [ -d /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 ++ 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 is_softiscsi || return 255 ++ return 0 ++} ++ + # called by dracut + check() { + local _rootdev +@@ -121,7 +190,12 @@ installkernel() { + + # called by dracut + cmdline() { +- install_ibft ++ local _iscsiconf=$(install_ibft) ++ if [ "$_iscsiconf" ] ; then ++ echo ${_iscsiconf} ++ else ++ install_softiscsi ++ fi + } + + # called by dracut +@@ -132,8 +206,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" +-- +1.8.4.5 + diff --git a/0094-Implement-shortcut-ip-ifname-static-for-static-confi.patch b/0094-Implement-shortcut-ip-ifname-static-for-static-confi.patch index 5fe6267..b29b68d 100644 --- a/0094-Implement-shortcut-ip-ifname-static-for-static-confi.patch +++ b/0094-Implement-shortcut-ip-ifname-static-for-static-confi.patch @@ -15,11 +15,11 @@ Signed-off-by: Hannes Reinecke modules.d/40network/parse-ip-opts.sh | 8 +++++++- 3 files changed, 24 insertions(+), 2 deletions(-) -Index: dracut-041/modules.d/40network/ifup.sh -=================================================================== ---- dracut-041.orig/modules.d/40network/ifup.sh 2015-03-17 17:19:54.375944711 +0100 -+++ dracut-041/modules.d/40network/ifup.sh 2015-03-17 17:24:27.803263036 +0100 -@@ -399,6 +399,18 @@ +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 6f279a4..f3e07a6 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -399,6 +399,18 @@ for p in $(getargs ip=); do [ "$use_bridge" != 'true' ] && \ [ "$use_vlan" != 'true' ] && continue @@ -38,20 +38,20 @@ Index: dracut-041/modules.d/40network/ifup.sh # setup nameserver namesrv="$dns1 $dns2 $(getargs nameserver)" for s in $namesrv; do -@@ -412,7 +424,7 @@ +@@ -411,7 +423,7 @@ for p in $(getargs ip=); do + done > /tmp/net.$netif.override - for autoopt in $(str_replace "$autoconf" "," " "); do - case $autoopt in -- dhcp|on|any) -+ dhcp4|dhcp|on|any) - do_dhcp -4 ;; - dhcp6) - load_ipv6 -Index: dracut-041/modules.d/40network/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/40network/module-setup.sh 2015-03-17 17:19:54.383945160 +0100 -+++ dracut-041/modules.d/40network/module-setup.sh 2015-03-17 17:24:05.189997137 +0100 -@@ -99,6 +99,10 @@ + case $autoconf in +- dhcp|on|any) ++ dhcp4|dhcp|on|any) + do_dhcp -4 ;; + dhcp6) + load_ipv6 +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index 7e7f087..690ff08 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -101,6 +101,10 @@ install() { _arch=$(uname -m) @@ -62,22 +62,25 @@ Index: dracut-041/modules.d/40network/module-setup.sh inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \ {"tls/$_arch/",tls/,"$_arch/",}"libnss_mdns4_minimal.so.*" -Index: dracut-041/modules.d/40network/parse-ip-opts.sh -=================================================================== ---- dracut-041.orig/modules.d/40network/parse-ip-opts.sh 2015-03-17 17:24:05.193997361 +0100 -+++ dracut-041/modules.d/40network/parse-ip-opts.sh 2015-03-17 17:26:56.711605514 +0100 -@@ -67,7 +67,13 @@ - for autoopt in $(str_replace "$autoconf" "," " "); do - case $autoopt in - error) die "Error parsing option 'ip=$p'";; -- bootp|rarp|both) die "Sorry, ip=$autoopt is currenty unsupported";; -+ bootp|rarp|both) die "Sorry, ip=$autoopt is currently unsupported";; -+ static) -+ if [ ! -e /etc/sysconfig/network/ifcfg-${dev} ] ; then -+ warn "No ifcfg configuration present for interface $dev, skipping" -+ continue -+ fi +diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh +index 7e73574..e48b0f3 100755 +--- a/modules.d/40network/parse-ip-opts.sh ++++ b/modules.d/40network/parse-ip-opts.sh +@@ -64,7 +64,13 @@ for p in $(getargs ip=); do + # Error checking for autoconf in combination with other values + case $autoconf in + error) die "Error parsing option 'ip=$p'";; +- bootp|rarp|both) die "Sorry, ip=$autoconf is currenty unsupported";; ++ bootp|rarp|both) die "Sorry, ip=$autoconf is currently unsupported";; ++ static) ++ if [ ! -e /etc/sysconfig/network/ifcfg-${dev} ] ; then ++ warn "No ifcfg configuration present for interface $dev, skipping" ++ continue ++ fi + ;; - none|off) - [ -z "$ip" ] && \ - die "For argument 'ip=$p'\nValue '$autoopt' without static configuration does not make sense" + none|off) + [ -z "$ip" ] && \ + die "For argument 'ip=$p'\nValue '$autoconf' without static configuration does not make sense" +-- +1.8.4.5 + diff --git a/0095-95iscsi-use-static-configuration-for-software-iscsi.patch b/0095-95iscsi-use-static-configuration-for-software-iscsi.patch new file mode 100644 index 0000000..8109e84 --- /dev/null +++ b/0095-95iscsi-use-static-configuration-for-software-iscsi.patch @@ -0,0 +1,37 @@ +From d62ee7be6309c4f5e3f8b0d3c6e825da03095ed7 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Wed, 2 Jul 2014 11:56:29 +0200 +Subject: 95iscsi: use static configuration for software iscsi + +When using software iscsi we should be using the existing +configuration from the system for the time being. + +References: bnc#884768 + +Signed-off-by: Hannes Reinecke +--- + modules.d/95iscsi/module-setup.sh | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index e9bed24..81ffb18 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -76,9 +76,11 @@ install_iscsiroot() { + esac + done + +- local_address=$(ip -o route get to $iscsi_address | cut -f 1 -d ' ') +- ifname=$(ip addr show to $local_address | head -1 | sed -n 's/[0-9]*: \(.*\): .*/\1/p') +- if [ -d /sys/class/net/$ifname/address ] ; then ++ 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 +-- +1.8.4.5 + diff --git a/0096-dracut-Fix-error-local-can-only-be-used-in-a-functio.patch b/0096-dracut-Fix-error-local-can-only-be-used-in-a-functio.patch new file mode 100644 index 0000000..dca1d7c --- /dev/null +++ b/0096-dracut-Fix-error-local-can-only-be-used-in-a-functio.patch @@ -0,0 +1,45 @@ +From 3dc48f4ee656529936a6021fb0f0885ece2dc26e Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Thu, 3 Jul 2014 15:16:42 +0200 +Subject: dracut: Fix error: local: can only be used in a function + +Signed-off-by: Thomas Renninger +--- + modules.d/98systemd/dracut-pre-udev.sh | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/modules.d/98systemd/dracut-pre-udev.sh b/modules.d/98systemd/dracut-pre-udev.sh +index 77977d2..68021aa 100755 +--- a/modules.d/98systemd/dracut-pre-udev.sh ++++ b/modules.d/98systemd/dracut-pre-udev.sh +@@ -26,10 +26,12 @@ fi + + for i in $(getargs rd.driver.pre -d rdloaddriver=); do + ( +- local IFS=, ++ _IFS="$IFS" ++ IFS=, + for p in $i; do + modprobe $p 2>&1 | vinfo + done ++ IFS="$_IFS" + ) + done + +@@ -38,10 +40,12 @@ done + + for i in $(getargs rd.driver.blacklist -d rdblacklist=); do + ( +- local IFS=, ++ _IFS="$IFS" ++ IFS=, + for p in $i; do + echo "blacklist $p" >> $_modprobe_d/initramfsblacklist.conf + done ++ IFS="$_IFS" + ) + done + +-- +1.8.4.5 + diff --git a/0097-Implement-rd.timeout-to-modify-the-device-timeout.patch b/0097-Implement-rd.timeout-to-modify-the-device-timeout.patch new file mode 100644 index 0000000..2802ad1 --- /dev/null +++ b/0097-Implement-rd.timeout-to-modify-the-device-timeout.patch @@ -0,0 +1,106 @@ +From 59be707744473b82f2ae6d14a159fbf94834d4b6 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Thu, 3 Jul 2014 11:21:29 +0200 +Subject: 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 +--- + 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 84fe794..2dc795b 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -117,11 +117,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 2c09895..a2b71ff 100755 +--- a/modules.d/98systemd/rootfs-generator.sh ++++ b/modules.d/98systemd/rootfs-generator.sh +@@ -7,8 +7,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 + +@@ -29,7 +32,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 + } +@@ -60,6 +63,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 33f7678..5a867b8 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -876,12 +876,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')" + + [ -e "${PREFIX}$hookdir/initqueue/finished/devexists-${_name}.sh" ] && return 0 +@@ -905,7 +909,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 + _needreload=1 + fi +-- +1.8.4.5 + diff --git a/0098-Do-not-call-lvm-for-non-LVM-device-mapper-devices.patch b/0098-Do-not-call-lvm-for-non-LVM-device-mapper-devices.patch new file mode 100644 index 0000000..e8365e6 --- /dev/null +++ b/0098-Do-not-call-lvm-for-non-LVM-device-mapper-devices.patch @@ -0,0 +1,37 @@ +From 438b80786d2d3f729620bcf73d65732e9e84c52e Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Thu, 3 Jul 2014 14:44:22 +0200 +Subject: 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 +--- + dracut-functions.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 1e0779a..b6247f5 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -700,10 +700,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 +-- +1.8.4.5 + diff --git a/0099-90multipath-Load-device_handler-modules-early-during.patch b/0099-90multipath-Load-device_handler-modules-early-during.patch new file mode 100644 index 0000000..5bb3dd2 --- /dev/null +++ b/0099-90multipath-Load-device_handler-modules-early-during.patch @@ -0,0 +1,50 @@ +From 760bf001b3941f52451c148f3b3d66a38d4ef457 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Thu, 3 Jul 2014 15:29:59 +0200 +Subject: 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 +--- + 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 22ff580..6ac8534 100755 +--- a/modules.d/90multipath/module-setup.sh ++++ b/modules.d/90multipath/module-setup.sh +@@ -30,6 +30,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) +@@ -91,6 +100,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_simple "${moddir}/multipathd.service" "${systemdsystemunitdir}/multipathd.service" + mkdir -p "${initdir}${systemdsystemunitdir}/sysinit.target.wants" +-- +1.8.4.5 + diff --git a/0100-Add-btrfs-rescue-utilities.patch b/0100-Add-btrfs-rescue-utilities.patch new file mode 100644 index 0000000..51c4955 --- /dev/null +++ b/0100-Add-btrfs-rescue-utilities.patch @@ -0,0 +1,28 @@ +From b809bebcb9a32330e050fdaac0653379cbe4d01a Mon Sep 17 00:00:00 2001 +From: David Sterba +Date: Fri, 4 Jul 2014 10:22:59 +0200 +Subject: Add btrfs rescue utilities + +Signed-off-by: David Sterba +--- + modules.d/90btrfs/module-setup.sh | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh +index 406fd6d..d76e767 100755 +--- a/modules.d/90btrfs/module-setup.sh ++++ b/modules.d/90btrfs/module-setup.sh +@@ -46,7 +46,8 @@ install() { + inst_hook initqueue/timeout 10 "$moddir/btrfs_timeout.sh" + fi + +- inst_multiple -o btrfsck btrfs-zero-log ++ # rescue utilities ++ inst_multiple btrfs-zero-log btrfs-image btrfs-dump-super ++ inst_multiple btrfs-debug-tree mkfs.btrfs btrfstune btrfs-select-super + inst $(command -v btrfs) /sbin/btrfs + } +- +-- +1.8.4.5 + diff --git a/0101-Print-stored-dracut-commandline-during-initramfs-bui.patch b/0101-Print-stored-dracut-commandline-during-initramfs-bui.patch new file mode 100644 index 0000000..9510f61 --- /dev/null +++ b/0101-Print-stored-dracut-commandline-during-initramfs-bui.patch @@ -0,0 +1,34 @@ +From 390474e70238c6585976bab3d37b0f82e5f1a417 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Fri, 4 Jul 2014 12:31:24 +0200 +Subject: 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 +--- + dracut.sh | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/dracut.sh b/dracut.sh +index 40006e7..a166cb6 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1479,6 +1479,12 @@ if ! ( echo $PARMS_TO_STORE > $initdir/lib/dracut/build-parameter.txt ); then + exit 1 + fi + ++if [[ $hostonly_cmdline ]] ; then ++ dinfo "Stored kernel commandline:" ++ for conf in $initdir/etc/cmdline.d/*.conf ; do ++ dinfo "$(< $conf)" ++ done ++fi + rm -f -- "$outfile" + dinfo "*** Creating image file ***" + +-- +1.8.4.5 + diff --git a/0102-Align-dev_unit_name-with-systemd-s-function.patch b/0102-Align-dev_unit_name-with-systemd-s-function.patch new file mode 100644 index 0000000..2a039b8 --- /dev/null +++ b/0102-Align-dev_unit_name-with-systemd-s-function.patch @@ -0,0 +1,51 @@ +From ad1acb808e5c7695cb54af7b449db11afd710f21 Mon Sep 17 00:00:00 2001 +From: Thorsten Behrens +Date: Sun, 22 Jun 2014 03:19:51 +0200 +Subject: 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 +--- + modules.d/99base/dracut-lib.sh | 22 +++++++++++++++++----- + 1 file changed, 17 insertions(+), 5 deletions(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 5a867b8..e201af8 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -857,13 +857,25 @@ 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() + { +- _name="${1%%/}" +- _name="${_name##/}" +- _name="$(str_replace "$_name" '-' '\x2d')" +- _name="$(str_replace "$_name" '/' '-')" +- echo "$_name" ++ local dev="$1" ++ ++ 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 +-- +1.8.4.5 + diff --git a/0103-Fixup-missing-separators-in-rootfs-block-cmdline.patch b/0103-Fixup-missing-separators-in-rootfs-block-cmdline.patch new file mode 100644 index 0000000..7c64f17 --- /dev/null +++ b/0103-Fixup-missing-separators-in-rootfs-block-cmdline.patch @@ -0,0 +1,50 @@ +From 827e7c0e82c5ae7d0ddebc5b67a1c767d39eded6 Mon Sep 17 00:00:00 2001 +From: Thorsten Behrens +Date: Mon, 7 Jul 2014 01:13:40 +0200 +Subject: Fixup missing separators in rootfs-block cmdline + +This fixes up 21e4cbee5d852108880cedc9edc619cdd9b296a5 by +re-introducing the spaces between the arguments. +[hare: moving printf statement into one line] + +Signed-off-by: Thorsten Behrens +Signed-off-by: Hannes Reinecke +--- + dracut.cmdline.7.asc | 3 +++ + modules.d/95rootfs-block/module-setup.sh | 6 +++--- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 2dc795b..228d571 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -134,6 +134,9 @@ Misc + specify the controlling terminal for the console. + This is useful, if you have multiple "console=" arguments. + ++**rd.nocmdline**:: ++ Skip built-in commandline arguments ++ + [[dracutkerneldebug]] + Debug + ~~~~~ +diff --git a/modules.d/95rootfs-block/module-setup.sh b/modules.d/95rootfs-block/module-setup.sh +index a620786..7f3b156 100755 +--- a/modules.d/95rootfs-block/module-setup.sh ++++ b/modules.d/95rootfs-block/module-setup.sh +@@ -34,9 +34,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 rootflags=%s rootfstype=%s\n" \ ++ "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")" \ ++ "$(find_mp_fsopts /)" "$(find_mp_fstype /)" + fi + } + +-- +1.8.4.5 + diff --git a/0104-Generate-fallback-mount-unit-for-root-filesystem.patch b/0104-Generate-fallback-mount-unit-for-root-filesystem.patch new file mode 100644 index 0000000..804c7f1 --- /dev/null +++ b/0104-Generate-fallback-mount-unit-for-root-filesystem.patch @@ -0,0 +1,70 @@ +From 7bbe5a2608be72ecc51c3a28f0da1ddaf522e293 Mon Sep 17 00:00:00 2001 +From: Thorsten Behrens +Date: Mon, 7 Jul 2014 01:14:45 +0200 +Subject: 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 +--- + 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 a2b71ff..13428da 100755 +--- a/modules.d/98systemd/rootfs-generator.sh ++++ b/modules.d/98systemd/rootfs-generator.sh +@@ -37,6 +37,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=*) +@@ -63,6 +92,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 +-- +1.8.4.5 + diff --git a/0105-95iscsi-parse-output-from-iscsiadm-correctly.patch b/0105-95iscsi-parse-output-from-iscsiadm-correctly.patch new file mode 100644 index 0000000..9e817d7 --- /dev/null +++ b/0105-95iscsi-parse-output-from-iscsiadm-correctly.patch @@ -0,0 +1,47 @@ +From a852317e8338ffb94fa1ac9512d465ac8c72cdc0 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Tue, 8 Jul 2014 13:16:41 +0200 +Subject: 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 +--- + modules.d/95iscsi/module-setup.sh | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index 81ffb18..f63634a 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -3,15 +3,15 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + + get_ibft_mod() { +- local ibft_mac=$1 IFS ++ 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 +- OLDIFS="$IFS" +- IFS=$',' +- set -- $iface_desc +- IFS="$OLDIFS" +- 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 + +-- +1.8.4.5 + diff --git a/0106-dracut-Enable-converting-of-directory-var-run-var-lo.patch b/0106-dracut-Enable-converting-of-directory-var-run-var-lo.patch index 776a05b..8fee481 100644 --- a/0106-dracut-Enable-converting-of-directory-var-run-var-lo.patch +++ b/0106-dracut-Enable-converting-of-directory-var-run-var-lo.patch @@ -19,11 +19,11 @@ Signed-off-by: Thomas Renninger 4 files changed, 79 insertions(+), 11 deletions(-) create mode 100755 modules.d/30convertfs/convertrunfs.sh -Index: dracut-041/modules.d/30convertfs/convertfs.sh -=================================================================== ---- dracut-041.orig/modules.d/30convertfs/convertfs.sh 2015-01-31 12:54:52.000000000 +0100 -+++ dracut-041/modules.d/30convertfs/convertfs.sh 2015-03-17 17:37:15.774237322 +0100 -@@ -62,15 +62,6 @@ +diff --git a/modules.d/30convertfs/convertfs.sh b/modules.d/30convertfs/convertfs.sh +index d717c69..525b1e7 100755 +--- a/modules.d/30convertfs/convertfs.sh ++++ b/modules.d/30convertfs/convertfs.sh +@@ -64,15 +64,6 @@ if [[ ! -e "$testfile" ]]; then fi rm -f -- "$testfile" @@ -39,10 +39,11 @@ Index: dracut-041/modules.d/30convertfs/convertfs.sh find_mount() { local dev mnt etc wanted_dev wanted_dev="$(readlink -e -q $1)" -Index: dracut-041/modules.d/30convertfs/convertrunfs.sh -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ dracut-041/modules.d/30convertfs/convertrunfs.sh 2015-03-17 17:37:15.778237383 +0100 +diff --git a/modules.d/30convertfs/convertrunfs.sh b/modules.d/30convertfs/convertrunfs.sh +new file mode 100755 +index 0000000..52700cd +--- /dev/null ++++ b/modules.d/30convertfs/convertrunfs.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- @@ -95,15 +96,16 @@ Index: dracut-041/modules.d/30convertfs/convertrunfs.sh + ln -sfn ../run/lock $ROOT/var/lock +fi + -+if [ $WAS_RO -eq 1 ];then ++if [ $WAR_RO -eq 1 ];then + mount $ROOT -o remount,ro +fi -Index: dracut-041/modules.d/30convertfs/do-convertfs.sh -=================================================================== ---- dracut-041.orig/modules.d/30convertfs/do-convertfs.sh 2015-03-17 17:31:01.441312547 +0100 -+++ dracut-041/modules.d/30convertfs/do-convertfs.sh 2015-03-17 17:37:15.786237620 +0100 -@@ -1,9 +1,26 @@ - #!/bin/bash +diff --git a/modules.d/30convertfs/do-convertfs.sh b/modules.d/30convertfs/do-convertfs.sh +index 99738e3..ef05a06 100755 +--- a/modules.d/30convertfs/do-convertfs.sh ++++ b/modules.d/30convertfs/do-convertfs.sh +@@ -2,10 +2,27 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh +# This converts all, /usr/bin -> /bin, ... and /var/run -> /run +# Do not enable by default! @@ -129,11 +131,11 @@ Index: dracut-041/modules.d/30convertfs/do-convertfs.sh + exit 0 fi fi -Index: dracut-041/modules.d/30convertfs/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/30convertfs/module-setup.sh 2015-03-17 17:31:01.445312770 +0100 -+++ dracut-041/modules.d/30convertfs/module-setup.sh 2015-03-17 17:37:15.786237620 +0100 -@@ -2,8 +2,13 @@ +diff --git a/modules.d/30convertfs/module-setup.sh b/modules.d/30convertfs/module-setup.sh +index 1e73455..5fead45 100755 +--- a/modules.d/30convertfs/module-setup.sh ++++ b/modules.d/30convertfs/module-setup.sh +@@ -4,8 +4,13 @@ # called by dracut check() { @@ -149,10 +151,13 @@ Index: dracut-041/modules.d/30convertfs/module-setup.sh } # called by dracut -@@ -16,5 +21,6 @@ +@@ -18,5 +23,6 @@ install() { inst_multiple bash find ldconfig mv rm cp ln inst_hook pre-pivot 99 "$moddir/do-convertfs.sh" inst_script "$moddir/convertfs.sh" /usr/bin/convertfs + inst_script "$moddir/convertrunfs.sh" /usr/bin/convertrunfs } +-- +1.8.4.5 + diff --git a/0107-Fixup-typo-firmare-instead-of-firmware.patch b/0107-Fixup-typo-firmare-instead-of-firmware.patch index bc75c4b..e59ad54 100644 --- a/0107-Fixup-typo-firmare-instead-of-firmware.patch +++ b/0107-Fixup-typo-firmare-instead-of-firmware.patch @@ -9,11 +9,11 @@ Signed-off-by: Hannes Reinecke modules.d/95zfcp_rules/parse-zfcp.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -Index: dracut-041/modules.d/95dasd_rules/parse-dasd.sh -=================================================================== ---- dracut-041.orig/modules.d/95dasd_rules/parse-dasd.sh 2015-03-24 15:15:19.484221789 +0100 -+++ dracut-041/modules.d/95dasd_rules/parse-dasd.sh 2015-03-24 15:15:36.577181837 +0100 -@@ -43,7 +43,7 @@ +diff --git a/modules.d/95dasd_rules/parse-dasd.sh b/modules.d/95dasd_rules/parse-dasd.sh +index 7b6a3d2..bafd053 100755 +--- a/modules.d/95dasd_rules/parse-dasd.sh ++++ b/modules.d/95dasd_rules/parse-dasd.sh +@@ -45,7 +45,7 @@ EOF } if [[ -f /sys/firmware/ipl/ipl_type && @@ -22,11 +22,11 @@ Index: dracut-041/modules.d/95dasd_rules/parse-dasd.sh ( local _ccw=$(cat /sys/firmware/ipl/device) -Index: dracut-041/modules.d/95zfcp_rules/parse-zfcp.sh -=================================================================== ---- dracut-041.orig/modules.d/95zfcp_rules/parse-zfcp.sh 2015-03-24 15:15:16.804071255 +0100 -+++ dracut-041/modules.d/95zfcp_rules/parse-zfcp.sh 2015-03-24 15:15:36.577181837 +0100 -@@ -40,7 +40,7 @@ +diff --git a/modules.d/95zfcp_rules/parse-zfcp.sh b/modules.d/95zfcp_rules/parse-zfcp.sh +index 05c1ed0..00f530f 100755 +--- a/modules.d/95zfcp_rules/parse-zfcp.sh ++++ b/modules.d/95zfcp_rules/parse-zfcp.sh +@@ -42,7 +42,7 @@ EOF } if [[ -f /sys/firmware/ipl/ipl_type && @@ -35,3 +35,6 @@ Index: dracut-041/modules.d/95zfcp_rules/parse-zfcp.sh ( local _wwpn=$(cat /sys/firmware/ipl/wwpn) local _lun=$(cat /sys/firmware/ipl/lun) +-- +1.8.4.5 + diff --git a/0109-95dasd_rules-Store-all-devices-in-commandline.patch b/0109-95dasd_rules-Store-all-devices-in-commandline.patch index 4c3003f..8394098 100644 --- a/0109-95dasd_rules-Store-all-devices-in-commandline.patch +++ b/0109-95dasd_rules-Store-all-devices-in-commandline.patch @@ -13,11 +13,11 @@ Signed-off-by: Hannes Reinecke modules.d/95dasd_rules/module-setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -Index: dracut-041/modules.d/95dasd_rules/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/95dasd_rules/module-setup.sh 2015-03-24 15:14:26.249231803 +0100 -+++ dracut-041/modules.d/95dasd_rules/module-setup.sh 2015-03-24 15:15:39.977372818 +0100 -@@ -12,8 +12,8 @@ +diff --git a/modules.d/95dasd_rules/module-setup.sh b/modules.d/95dasd_rules/module-setup.sh +index e4736a2..78a7a66 100755 +--- a/modules.d/95dasd_rules/module-setup.sh ++++ b/modules.d/95dasd_rules/module-setup.sh +@@ -14,8 +14,8 @@ cmdline() { return 0 } [[ $hostonly ]] || [[ $mount_needs ]] && { @@ -28,3 +28,6 @@ Index: dracut-041/modules.d/95dasd_rules/module-setup.sh } # called by dracut +-- +1.8.4.5 + diff --git a/0110-95zfcp_rules-Store-all-devices-in-commandline.patch b/0110-95zfcp_rules-Store-all-devices-in-commandline.patch index 70c56d7..6326196 100644 --- a/0110-95zfcp_rules-Store-all-devices-in-commandline.patch +++ b/0110-95zfcp_rules-Store-all-devices-in-commandline.patch @@ -13,11 +13,11 @@ Signed-off-by: Hannes Reinecke modules.d/95zfcp_rules/module-setup.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -Index: dracut-041/modules.d/95zfcp_rules/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/95zfcp_rules/module-setup.sh 2015-03-24 15:15:15.552000930 +0100 -+++ dracut-041/modules.d/95zfcp_rules/module-setup.sh 2015-03-24 15:15:43.249556607 +0100 -@@ -14,11 +14,11 @@ +diff --git a/modules.d/95zfcp_rules/module-setup.sh b/modules.d/95zfcp_rules/module-setup.sh +index 3f80754..df13fa1 100755 +--- a/modules.d/95zfcp_rules/module-setup.sh ++++ b/modules.d/95zfcp_rules/module-setup.sh +@@ -16,11 +16,11 @@ cmdline() { _wwpn=$(cat ${_sdev}/wwpn) _ccw=$(cat ${_sdev}/hba_id) echo "rd.zfcp=${_ccw},${_wwpn},${_lun}" @@ -32,7 +32,7 @@ Index: dracut-041/modules.d/95zfcp_rules/module-setup.sh } # called by dracut -@@ -29,6 +29,7 @@ +@@ -31,6 +31,7 @@ check() { require_binaries /usr/lib/udev/collect || return 1 [[ $hostonly ]] || [[ $mount_needs ]] && { @@ -40,3 +40,6 @@ Index: dracut-041/modules.d/95zfcp_rules/module-setup.sh for _ccw in /sys/bus/ccw/devices/*/host* ; do [ -d "$_ccw" ] || continue found=$(($found+1)); +-- +1.8.4.5 + diff --git a/0111-90mdraid-Remove-line-for-offroot-detection.patch b/0111-90mdraid-Remove-line-for-offroot-detection.patch new file mode 100644 index 0000000..b72a4fb --- /dev/null +++ b/0111-90mdraid-Remove-line-for-offroot-detection.patch @@ -0,0 +1,25 @@ +From 73c11cd35b563f94b65058aa8b4e01ce3ff6ef8a Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Thu, 10 Jul 2014 15:52:37 +0200 +Subject: 90mdraid: Remove line for 'offroot' detection + +Feature is not present in SLE12, so remove this line. + +Signed-off-by: Hannes Reinecke +--- + modules.d/90mdraid/parse-md.sh | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/modules.d/90mdraid/parse-md.sh b/modules.d/90mdraid/parse-md.sh +index dd7bda2..947dbd4 100755 +--- a/modules.d/90mdraid/parse-md.sh ++++ b/modules.d/90mdraid/parse-md.sh +@@ -52,5 +52,3 @@ if ! getargbool 1 rd.md.ddf -n rd_NO_MDDDF -n noddfmd -n nodmraid; then + info "no MD RAID for SNIA ddf raids" + udevproperty rd_NO_MDDDF=1 + fi +- +-strstr "$(mdadm --help-options 2>&1)" offroot && udevproperty rd_MD_OFFROOT=--offroot +-- +1.8.4.5 + diff --git a/0112-99base-warn-on-invalid-command-for-initqueue.patch b/0112-99base-warn-on-invalid-command-for-initqueue.patch new file mode 100644 index 0000000..9bf89f3 --- /dev/null +++ b/0112-99base-warn-on-invalid-command-for-initqueue.patch @@ -0,0 +1,33 @@ +From 6d4c7a328cab1c6cda1aedb4a2149e9227c108f0 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Thu, 10 Jul 2014 15:56:53 +0200 +Subject: 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 +--- + 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 854a36a..cbf6fa2 100755 +--- a/modules.d/99base/initqueue.sh ++++ b/modules.d/99base/initqueue.sh +@@ -44,6 +44,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"' +-- +1.8.4.5 + diff --git a/0115-Handle-module-alias-properly.patch b/0115-Handle-module-alias-properly.patch new file mode 100644 index 0000000..e270134 --- /dev/null +++ b/0115-Handle-module-alias-properly.patch @@ -0,0 +1,38 @@ +From 40556c48da1f7f15ad0eb727013589f6f45596f8 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Sat, 12 Jul 2014 14:53:00 +0200 +Subject: 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 +--- + dracut-functions.sh | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index b6247f5..22e16ff 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -1666,6 +1666,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 ]] && \ +-- +1.8.4.5 + diff --git a/0117-95dasd_rules-Enable-the-device-before-checking-devic.patch b/0117-95dasd_rules-Enable-the-device-before-checking-devic.patch index 004c7e5..bb21f5c 100644 --- a/0117-95dasd_rules-Enable-the-device-before-checking-devic.patch +++ b/0117-95dasd_rules-Enable-the-device-before-checking-devic.patch @@ -12,11 +12,11 @@ Signed-off-by: Hannes Reinecke modules.d/95dasd_rules/parse-dasd.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) -Index: dracut-041/modules.d/95dasd_rules/parse-dasd.sh -=================================================================== ---- dracut-041.orig/modules.d/95dasd_rules/parse-dasd.sh 2015-03-24 15:15:36.577181837 +0100 -+++ dracut-041/modules.d/95dasd_rules/parse-dasd.sh 2015-03-24 15:15:50.865984400 +0100 -@@ -5,6 +5,10 @@ +diff --git a/modules.d/95dasd_rules/parse-dasd.sh b/modules.d/95dasd_rules/parse-dasd.sh +index bafd053..0c297e5 100755 +--- a/modules.d/95dasd_rules/parse-dasd.sh ++++ b/modules.d/95dasd_rules/parse-dasd.sh +@@ -7,6 +7,10 @@ create_udev_rule() { local _drv _cu_type _dev_type local _rule=/etc/udev/rules.d/51-dasd-${ccw}.rules @@ -27,7 +27,7 @@ Index: dracut-041/modules.d/95dasd_rules/parse-dasd.sh if [ -e /sys/bus/ccw/devices/${ccw} ] ; then read _cu_type < /sys/bus/ccw/devices/${ccw}/cutype read _dev_type < /sys/bus/ccw/devices/${ccw}/devtype -@@ -29,10 +33,6 @@ +@@ -31,10 +35,6 @@ create_udev_rule() { esac [ -z "${_drv}" ] && return 0 @@ -38,3 +38,17 @@ Index: dracut-041/modules.d/95dasd_rules/parse-dasd.sh [ -e ${_rule} ] && return 0 cat > $_rule < 0)); do + case $1 in + autodetect|probeonly) +-- +1.8.4.5 + diff --git a/0118-95zfcp_rules-Enable-the-device-before-checking-devic.patch b/0118-95zfcp_rules-Enable-the-device-before-checking-devic.patch index 6461c1a..eb04f2c 100644 --- a/0118-95zfcp_rules-Enable-the-device-before-checking-devic.patch +++ b/0118-95zfcp_rules-Enable-the-device-before-checking-devic.patch @@ -12,11 +12,11 @@ Signed-off-by: Hannes Reinecke modules.d/95zfcp_rules/parse-zfcp.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) -Index: dracut-041/modules.d/95zfcp_rules/parse-zfcp.sh -=================================================================== ---- dracut-041.orig/modules.d/95zfcp_rules/parse-zfcp.sh 2015-03-17 17:40:04.923688032 +0100 -+++ dracut-041/modules.d/95zfcp_rules/parse-zfcp.sh 2015-03-17 17:40:05.135699878 +0100 -@@ -7,6 +7,10 @@ +diff --git a/modules.d/95zfcp_rules/parse-zfcp.sh b/modules.d/95zfcp_rules/parse-zfcp.sh +index 00f530f..8db3d9a 100755 +--- a/modules.d/95zfcp_rules/parse-zfcp.sh ++++ b/modules.d/95zfcp_rules/parse-zfcp.sh +@@ -9,6 +9,10 @@ create_udev_rule() { local _rule=/etc/udev/rules.d/51-zfcp-${ccw}.rules local _cu_type _dev_type @@ -27,7 +27,7 @@ Index: dracut-041/modules.d/95zfcp_rules/parse-zfcp.sh if [ -e /sys/bus/ccw/devices/${ccw} ] ; then read _cu_type < /sys/bus/ccw/devices/${ccw}/cutype read _dev_type < /sys/bus/ccw/devices/${ccw}/devtype -@@ -18,10 +22,6 @@ +@@ -20,10 +24,6 @@ create_udev_rule() { return 0; fi @@ -38,3 +38,17 @@ Index: dracut-041/modules.d/95zfcp_rules/parse-zfcp.sh [ -e ${_rule} ] && return 0 if [ ! -f "$_rule" ] ; then +@@ -54,8 +54,10 @@ fi + + for zfcp_arg in $(getargs rd.zfcp); do + ( ++ local OLDIFS="$IFS" + local IFS="," + set $zfcp_arg ++ IFS="$OLDIFS" + create_udev_rule $1 $2 $3 + ) + done +-- +1.8.4.5 + diff --git a/0119-Reset-IFS-variable.patch b/0119-Reset-IFS-variable.patch index 881a6c9..93df261 100644 --- a/0119-Reset-IFS-variable.patch +++ b/0119-Reset-IFS-variable.patch @@ -14,11 +14,26 @@ Signed-off-by: Hannes Reinecke modules.d/95zfcp/parse-zfcp.sh | 2 ++ 3 files changed, 6 insertions(+) -Index: dracut-041/modules.d/95fcoe/parse-fcoe.sh -=================================================================== ---- dracut-041.orig/modules.d/95fcoe/parse-fcoe.sh 2015-01-31 12:54:52.000000000 +0100 -+++ dracut-041/modules.d/95fcoe/parse-fcoe.sh 2015-03-24 15:15:55.474243227 +0100 -@@ -26,8 +26,10 @@ +diff --git a/modules.d/95dasd/parse-dasd.sh b/modules.d/95dasd/parse-dasd.sh +index aba720b..e0d4a9c 100755 +--- a/modules.d/95dasd/parse-dasd.sh ++++ b/modules.d/95dasd/parse-dasd.sh +@@ -3,8 +3,10 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + for dasd_arg in $(getargs rd.dasd= -d rd_DASD= DASD=); do + ( ++ local OLDIFS="$IFS" + local IFS="," + set -- $dasd_arg ++ IFS="$OLDIFS" + echo "$@" | normalize_dasd_arg >> /etc/dasd.conf + ) + done +diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh +index 8e08303..4ee13cb 100755 +--- a/modules.d/95fcoe/parse-fcoe.sh ++++ b/modules.d/95fcoe/parse-fcoe.sh +@@ -28,8 +28,10 @@ modprobe bnx2fc >/dev/null 2>&1 udevadm settle --timeout=30 parse_fcoe_opts() { @@ -29,3 +44,21 @@ Index: dracut-041/modules.d/95fcoe/parse-fcoe.sh case $# in 2) +diff --git a/modules.d/95zfcp/parse-zfcp.sh b/modules.d/95zfcp/parse-zfcp.sh +index 1d21472..df29fb2 100755 +--- a/modules.d/95zfcp/parse-zfcp.sh ++++ b/modules.d/95zfcp/parse-zfcp.sh +@@ -6,8 +6,10 @@ getargbool 1 rd.zfcp.conf -d -n rd_NO_ZFCPCONF || rm /etc/zfcp.conf + + for zfcp_arg in $(getargs rd.zfcp -d 'rd_ZFCP='); do + ( ++ local OLDIFS="$IFS" + local IFS="," + set $zfcp_arg ++ IFS="$OLDIFS" + echo "$@" >> /etc/zfcp.conf + ) + done +-- +1.8.4.5 + diff --git a/0120-mkinitrd-suse.sh-Bail-out-with-exit-1-if-initrd-cann.patch b/0120-mkinitrd-suse.sh-Bail-out-with-exit-1-if-initrd-cann.patch index f7660a6..aa635c2 100644 --- a/0120-mkinitrd-suse.sh-Bail-out-with-exit-1-if-initrd-cann.patch +++ b/0120-mkinitrd-suse.sh-Bail-out-with-exit-1-if-initrd-cann.patch @@ -10,11 +10,11 @@ Signed-off-by: Thomas Renninger mkinitrd-suse.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) -Index: dracut-041/mkinitrd-suse.sh -=================================================================== ---- dracut-041.orig/mkinitrd-suse.sh 2015-01-31 12:54:52.000000000 +0100 -+++ dracut-041/mkinitrd-suse.sh 2015-03-17 17:42:12.198799273 +0100 -@@ -280,7 +280,8 @@ +diff --git a/mkinitrd-suse.sh b/mkinitrd-suse.sh +index bf10a9d..5b32e6c 100755 +--- a/mkinitrd-suse.sh ++++ b/mkinitrd-suse.sh +@@ -282,7 +282,8 @@ done [[ $targets && $kernels ]] || default_kernel_images if [[ ! $targets || ! $kernels ]];then @@ -24,7 +24,7 @@ Index: dracut-041/mkinitrd-suse.sh fi # We can have several targets/kernels, transform the list to an array -@@ -301,6 +302,8 @@ +@@ -303,6 +304,8 @@ fi [[ $domu_module_list ]] || domu_module_list="${DOMU_INITRD_MODULES}" shopt -s extglob @@ -33,7 +33,7 @@ Index: dracut-041/mkinitrd-suse.sh for ((i=0 ; $i<${#targets[@]} ; i++)); do if [[ $img_vers ]];then -@@ -329,14 +332,18 @@ +@@ -331,14 +334,18 @@ for ((i=0 ; $i<${#targets[@]} ; i++)); do # expansion magics if [ -n "${modules_all}" ];then $dracut_cmd $dracut_args --force-drivers "${modules_all}" "$target" "$kernel" &>/dev/null @@ -52,9 +52,9 @@ Index: dracut-041/mkinitrd-suse.sh fi fi done -@@ -345,4 +352,12 @@ - echo 2>&1 "Did not refresh the bootloader. You might need to refresh it manually." +@@ -348,4 +355,12 @@ if [ "$skip_update_bootloader" ] ; then else + echo "Update bootloader..." update-bootloader --refresh + [ $? -ne 0 ] && echo "Updating bootloader failed" && exit 1 +fi @@ -65,3 +65,6 @@ Index: dracut-041/mkinitrd-suse.sh fi + +exit 0 +-- +1.8.4.5 + diff --git a/0121-Adjust-initramfs-kernel.img-to-SUSE-default-initrd-k.patch b/0121-Adjust-initramfs-kernel.img-to-SUSE-default-initrd-k.patch index a4e4679..48feff6 100644 --- a/0121-Adjust-initramfs-kernel.img-to-SUSE-default-initrd-k.patch +++ b/0121-Adjust-initramfs-kernel.img-to-SUSE-default-initrd-k.patch @@ -13,11 +13,11 @@ Signed-off-by: Thomas Renninger lsinitrd.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -Index: dracut-041/dracut.sh -=================================================================== ---- dracut-041.orig/dracut.sh 2015-03-24 15:12:43.427456873 +0100 -+++ dracut-041/dracut.sh 2015-03-24 15:16:01.578586094 +0100 -@@ -646,7 +646,7 @@ +diff --git a/dracut.sh b/dracut.sh +index a166cb6..2d8be59 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -627,7 +627,7 @@ if ! [[ $outfile ]]; then if [[ $MACHINE_ID ]] && ( [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]] ); then outfile="/boot/${MACHINE_ID}/$kernel/initrd" else @@ -26,11 +26,11 @@ Index: dracut-041/dracut.sh fi fi -Index: dracut-041/lsinitrd.sh -=================================================================== ---- dracut-041.orig/lsinitrd.sh 2015-01-31 12:54:52.000000000 +0100 -+++ dracut-041/lsinitrd.sh 2015-03-24 15:16:01.578586094 +0100 -@@ -89,7 +89,7 @@ +diff --git a/lsinitrd.sh b/lsinitrd.sh +index a697bc2..b66a653 100755 +--- a/lsinitrd.sh ++++ b/lsinitrd.sh +@@ -87,7 +87,7 @@ else && [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]] ; then image="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd" else @@ -39,3 +39,6 @@ Index: dracut-041/lsinitrd.sh fi fi +-- +1.8.4.5 + diff --git a/0122-btrfs-btrfs-dump-super-and-btrfs-select-super-do-not.patch b/0122-btrfs-btrfs-dump-super-and-btrfs-select-super-do-not.patch new file mode 100644 index 0000000..9ae2907 --- /dev/null +++ b/0122-btrfs-btrfs-dump-super-and-btrfs-select-super-do-not.patch @@ -0,0 +1,32 @@ +From e71e3590c953a02ee1696141ac2f48aa521e7087 Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Thu, 17 Jul 2014 11:23:31 +0200 +Subject: btrfs: btrfs-dump-super and btrfs-select-super do not exist + +I could not find these binaries and as they seem to be very specific +btrfs rescue tools only, better remove them again. + +bnc#886883 + +Signed-off-by: Thomas Renninger +--- + modules.d/90btrfs/module-setup.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh +index d76e767..5598f32 100755 +--- a/modules.d/90btrfs/module-setup.sh ++++ b/modules.d/90btrfs/module-setup.sh +@@ -47,7 +47,7 @@ install() { + fi + + # rescue utilities +- inst_multiple btrfs-zero-log btrfs-image btrfs-dump-super +- inst_multiple btrfs-debug-tree mkfs.btrfs btrfstune btrfs-select-super ++ inst_multiple btrfs-zero-log btrfs-image btrfs-debug-tree \ ++ mkfs.btrfs btrfstune + inst $(command -v btrfs) /sbin/btrfs + } +-- +1.8.4.5 + diff --git a/0123-95zfcp_rules-fix-typo-in-module_setup.patch b/0123-95zfcp_rules-fix-typo-in-module_setup.patch index f2d7b92..078ca1b 100644 --- a/0123-95zfcp_rules-fix-typo-in-module_setup.patch +++ b/0123-95zfcp_rules-fix-typo-in-module_setup.patch @@ -13,11 +13,11 @@ Signed-off-by: Hannes Reinecke modules.d/95zfcp_rules/module-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: dracut-041/modules.d/95zfcp_rules/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/95zfcp_rules/module-setup.sh 2015-03-24 15:15:43.249556607 +0100 -+++ dracut-041/modules.d/95zfcp_rules/module-setup.sh 2015-03-24 15:16:04.250736181 +0100 -@@ -52,7 +52,7 @@ +diff --git a/modules.d/95zfcp_rules/module-setup.sh b/modules.d/95zfcp_rules/module-setup.sh +index df13fa1..2e29ee1 100755 +--- a/modules.d/95zfcp_rules/module-setup.sh ++++ b/modules.d/95zfcp_rules/module-setup.sh +@@ -54,7 +54,7 @@ install() { local _zfcp for _zfcp in $(cmdline) ; do @@ -26,3 +26,6 @@ Index: dracut-041/modules.d/95zfcp_rules/module-setup.sh done fi if [[ $hostonly ]] ; then +-- +1.8.4.5 + diff --git a/0124-40network-Update-iBFT-scanning-code-to-handle-IPv6.patch b/0124-40network-Update-iBFT-scanning-code-to-handle-IPv6.patch index b0d99d0..5a100d4 100644 --- a/0124-40network-Update-iBFT-scanning-code-to-handle-IPv6.patch +++ b/0124-40network-Update-iBFT-scanning-code-to-handle-IPv6.patch @@ -13,11 +13,11 @@ Signed-off-by: Hannes Reinecke modules.d/40network/net-lib.sh | 48 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 5 deletions(-) -Index: dracut-041/modules.d/40network/net-lib.sh -=================================================================== ---- dracut-041.orig/modules.d/40network/net-lib.sh 2015-01-31 12:54:52.000000000 +0100 -+++ dracut-041/modules.d/40network/net-lib.sh 2015-03-24 15:16:07.018891661 +0100 -@@ -213,20 +213,51 @@ +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index a82f1a8..554f723 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -200,20 +200,51 @@ ibft_to_cmdline() { [ -e /tmp/net.${dev}.has_ibft_config ] && continue @@ -27,11 +27,12 @@ Index: dracut-041/modules.d/40network/net-lib.sh + # Skip interfaces not used for booting + (( $flags & 2 )) || continue [ -e ${iface}/dhcp ] && dhcp=$(read a < ${iface}/dhcp; echo $a) -+ [ -e ${iface}/origin ] && origin=$(read a < ${iface}/origin; echo $a) -+ [ -e ${iface}/ip-addr ] && ip=$(read a < ${iface}/ip-addr; echo $a) - +- - if [ -n "$dhcp" ]; then - echo "ip=$dev:dhcp" ++ [ -e ${iface}/origin ] && origin=$(read a < ${iface}/origin; echo $a) ++ [ -e ${iface}/ip-addr ] && ip=$(read a < ${iface}/ip-addr; echo $a) ++ + if [ -n "$ip" ] ; then + case "$ip" in + *.*.*.*) @@ -73,7 +74,7 @@ Index: dracut-041/modules.d/40network/net-lib.sh echo "ip=$ip::$gw:$mask:$hostname:$dev:none${dns1:+:$dns1}${dns2:+:$dns2}" else warn "${iface} does not contain a valid iBFT configuration" -@@ -405,6 +436,13 @@ +@@ -373,6 +404,13 @@ ip_to_var() { esac ;; esac @@ -87,3 +88,6 @@ Index: dracut-041/modules.d/40network/net-lib.sh # ip= means anaconda-style static config argument cluster: # ip= gateway= netmask= hostname= mtu= +-- +1.8.4.5 + diff --git a/0125-40network-separate-mask-and-prefix.patch b/0125-40network-separate-mask-and-prefix.patch index 52c297b..d8dc7c7 100644 --- a/0125-40network-separate-mask-and-prefix.patch +++ b/0125-40network-separate-mask-and-prefix.patch @@ -18,11 +18,11 @@ Signed-off-by: Hannes Reinecke modules.d/40network/parse-ip-opts.sh | 2 +- 3 files changed, 45 insertions(+), 8 deletions(-) -Index: dracut-041/modules.d/40network/ifup.sh -=================================================================== ---- dracut-041.orig/modules.d/40network/ifup.sh 2015-03-18 11:57:28.788553583 +0100 -+++ dracut-041/modules.d/40network/ifup.sh 2015-03-18 11:57:31.032679982 +0100 -@@ -222,13 +222,14 @@ +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index f3e07a6..e0bf035 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -223,13 +223,14 @@ do_static() { linkup $netif [ -n "$macaddr" ] && ip link set address $macaddr dev $netif [ -n "$mtu" ] && ip link set mtu $mtu dev $netif @@ -38,8 +38,8 @@ Index: dracut-041/modules.d/40network/ifup.sh + ip addr add $ip/$prefix ${srv:+peer $srv} brd + dev $netif fi - [ -n "$gw" ] && echo ip route replace default via $gw dev $netif > /tmp/net.$netif.gw -@@ -404,7 +405,7 @@ + [ -n "$gw" ] && echo ip route add default via $gw dev $netif > /tmp/net.$netif.gw +@@ -404,7 +405,7 @@ for p in $(getargs ip=); do # Pull in existing static configuration . /etc/sysconfig/network/ifcfg-${netif} ip=${IPADDR} @@ -48,7 +48,7 @@ Index: dracut-041/modules.d/40network/ifup.sh mtu=${MTU} server=${REMOTE_IPADDR} gw=${GATEWAY} -@@ -418,7 +419,7 @@ +@@ -418,7 +419,7 @@ for p in $(getargs ip=); do done # Store config for later use @@ -57,11 +57,11 @@ Index: dracut-041/modules.d/40network/ifup.sh eval '[ "$'$i'" ] && echo '$i'="$'$i'"' done > /tmp/net.$netif.override -Index: dracut-041/modules.d/40network/net-lib.sh -=================================================================== ---- dracut-041.orig/modules.d/40network/net-lib.sh 2015-03-18 11:57:28.792553808 +0100 -+++ dracut-041/modules.d/40network/net-lib.sh 2015-03-18 11:57:31.036680206 +0100 -@@ -7,6 +7,35 @@ +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 554f723..a3b5030 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -9,6 +9,35 @@ get_ip() { ip=${ip##* } } @@ -97,7 +97,7 @@ Index: dracut-041/modules.d/40network/net-lib.sh iface_for_remote_addr() { set -- $(ip -o route get to $1) echo $5 -@@ -204,7 +233,7 @@ +@@ -191,7 +220,7 @@ ibft_to_cmdline() { for iface in /sys/firmware/ibft/ethernet*; do local mac="" dev="" local dhcp="" ip="" gw="" mask="" hostname="" @@ -106,7 +106,7 @@ Index: dracut-041/modules.d/40network/net-lib.sh [ -e ${iface}/mac ] || continue mac=$(read a < ${iface}/mac; echo $a) -@@ -249,6 +278,7 @@ +@@ -236,6 +265,7 @@ ibft_to_cmdline() { [ -e ${iface}/hostname ] && hostname=$(read a < ${iface}/hostname; echo $a) if [ "$family" = "ipv6" ] ; then if [ -n "$ip" ] ; then @@ -114,7 +114,7 @@ Index: dracut-041/modules.d/40network/net-lib.sh [ -n "$prefix" ] || prefix=64 ip="[${ip}/${prefix}]" mask= -@@ -256,6 +286,11 @@ +@@ -243,6 +273,11 @@ ibft_to_cmdline() { if [ -n "$gw" ] ; then gw="[${gw}]" fi @@ -126,7 +126,7 @@ Index: dracut-041/modules.d/40network/net-lib.sh fi if [ -n "$ip" ] && [ -n "$mask" -o -n "$prefix" ]; then echo "ip=$ip::$gw:$mask:$hostname:$dev:none${dns1:+:$dns1}${dns2:+:$dns2}" -@@ -264,6 +299,7 @@ +@@ -251,6 +286,7 @@ ibft_to_cmdline() { warn "ip-addr=$ip" warn "gateway=$gw" warn "subnet-mask=$mask" @@ -134,7 +134,7 @@ Index: dracut-041/modules.d/40network/net-lib.sh warn "hostname=$hostname" fi else -@@ -411,7 +447,7 @@ +@@ -379,7 +415,7 @@ ip_to_var() { fi done @@ -143,7 +143,7 @@ Index: dracut-041/modules.d/40network/net-lib.sh case $# in 0) autoconf="error" ;; 1) autoconf=$1 ;; -@@ -439,7 +475,7 @@ +@@ -407,7 +443,7 @@ ip_to_var() { # Extract prefix length from CIDR notation case $ip in */*) @@ -152,16 +152,19 @@ Index: dracut-041/modules.d/40network/net-lib.sh ip=${ip%/*} ;; esac -Index: dracut-041/modules.d/40network/parse-ip-opts.sh -=================================================================== ---- dracut-041.orig/modules.d/40network/parse-ip-opts.sh 2015-03-18 11:57:31.044680739 +0100 -+++ dracut-041/modules.d/40network/parse-ip-opts.sh 2015-03-18 11:58:13.727085881 +0100 -@@ -77,7 +77,7 @@ - none|off) - [ -z "$ip" ] && \ - die "For argument 'ip=$p'\nValue '$autoopt' without static configuration does not make sense" -- [ -z "$mask" ] && \ -+ [ -z "$mask" -a -z "$prefix" ] && \ - die "Sorry, automatic calculation of netmask is not yet supported" - ;; - auto6);; +diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh +index e48b0f3..52a1923 100755 +--- a/modules.d/40network/parse-ip-opts.sh ++++ b/modules.d/40network/parse-ip-opts.sh +@@ -74,7 +74,7 @@ for p in $(getargs ip=); do + none|off) + [ -z "$ip" ] && \ + die "For argument 'ip=$p'\nValue '$autoconf' without static configuration does not make sense" +- [ -z "$mask" ] && \ ++ [ -z "$mask" -a -z "$prefix" ] && \ + die "Sorry, automatic calculation of netmask is not yet supported" + ;; + auto6);; +-- +1.8.4.5 + diff --git a/0126-01fips-Add-drbg-module-to-force-loaded-modules.patch b/0126-01fips-Add-drbg-module-to-force-loaded-modules.patch index ecd76ae..14819c1 100644 --- a/0126-01fips-Add-drbg-module-to-force-loaded-modules.patch +++ b/0126-01fips-Add-drbg-module-to-force-loaded-modules.patch @@ -10,11 +10,11 @@ Signed-off-by: Marcus Meissner modules.d/01fips/module-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: dracut-041/modules.d/01fips/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/01fips/module-setup.sh 2015-03-24 15:10:53.469281351 +0100 -+++ dracut-041/modules.d/01fips/module-setup.sh 2015-03-24 15:16:11.787159483 +0100 -@@ -21,7 +21,7 @@ +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index d6907a3..8437e56 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -23,7 +23,7 @@ installkernel() { _fipsmodules+="sha512-ssse3 sha1-ssse3 sha256-ssse3 " _fipsmodules+="ghash-clmulni-intel " @@ -23,3 +23,6 @@ Index: dracut-041/modules.d/01fips/module-setup.sh mkdir -m 0755 -p "${initdir}/etc/modprobe.d" +-- +1.8.4.5 + diff --git a/0127-99base-Increase-initqueue-timeout-in-non-systemd-cas.patch b/0127-99base-Increase-initqueue-timeout-in-non-systemd-cas.patch new file mode 100644 index 0000000..995fd24 --- /dev/null +++ b/0127-99base-Increase-initqueue-timeout-in-non-systemd-cas.patch @@ -0,0 +1,31 @@ +From 756b069dca4ea54265dade3028e2bddca3b90266 Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Wed, 23 Jul 2014 15:34:00 +0200 +Subject: 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 a1232eb..a8ea054 100755 +--- a/modules.d/99base/init.sh ++++ b/modules.d/99base/init.sh +@@ -155,7 +155,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 +-- +1.8.4.5 + diff --git a/0128-90lvm-Install-dm-snapshot-module.patch b/0128-90lvm-Install-dm-snapshot-module.patch new file mode 100644 index 0000000..5bb694f --- /dev/null +++ b/0128-90lvm-Install-dm-snapshot-module.patch @@ -0,0 +1,30 @@ +From afa1ee56c79f45a648406b65d24234a54904f3ce Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Thu, 24 Jul 2014 10:41:14 +0200 +Subject: 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 2a5b392..77f9e9d 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -44,6 +44,10 @@ cmdline() { + done + } + ++installkernel() { ++ instmods dm-snapshot ++} ++ + # called by dracut + install() { + local _i +-- +1.8.4.5 + diff --git a/0129-Revert-commit-6ecab258710d158a7a6-and-only-do-not-wa.patch b/0129-Revert-commit-6ecab258710d158a7a6-and-only-do-not-wa.patch new file mode 100644 index 0000000..3f6f2b0 --- /dev/null +++ b/0129-Revert-commit-6ecab258710d158a7a6-and-only-do-not-wa.patch @@ -0,0 +1,90 @@ +From 1a7b830200bcf2894c2e5a6d656e186bebd457d2 Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Mon, 28 Jul 2014 15:45:22 +0200 +Subject: Revert commit 6ecab258710d158a7a6 and only do not wait for swap via + parameter + +bnc#882812 + +Signed-off-by: Thomas Renninger +--- + dracut.sh | 35 +++++++++++++++++++++++++++++++++++ + 1 file changed, 35 insertions(+) + +diff --git a/dracut.sh b/dracut.sh +index 2d8be59..92b30bb 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -106,6 +106,7 @@ Creates initial ramdisk images for preloading modules + --noprelink Do not prelink binaries in the initramfs + --hardlink Hardlink files in the initramfs + --nohardlink Do not hardlink files in the initramfs ++ --nowaitforswap Do not wait for swap getting active on boot + --prefix [DIR] Prefix initramfs files with [DIR] + --noprefix Do not prefix initramfs files + --mdadmconf Include local /etc/mdadm.conf +@@ -341,6 +342,7 @@ rearrange_params() + --long noprelink \ + --long hardlink \ + --long nohardlink \ ++ --long nowaitforswap \ + --long noprefix \ + --long mdadmconf \ + --long nomdadmconf \ +@@ -516,6 +518,7 @@ while :; do + --noprelink) do_prelink_l="no";; + --hardlink) do_hardlink_l="yes";; + --nohardlink) do_hardlink_l="no";; ++ --nowaitforswap) nowaitforswap_l="yes";; + --noprefix) prefix_l="/";; + --mdadmconf) mdadmconf_l="yes";; + --nomdadmconf) mdadmconf_l="no";; +@@ -776,6 +779,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) + [[ $do_prelink ]] || do_prelink=yes + [[ $do_hardlink_l ]] && do_hardlink=$do_hardlink_l + [[ $do_hardlink ]] || do_hardlink=yes ++[[ $nowaitforswap_l ]] && nowaitforswap="yes" + [[ $prefix_l ]] && prefix=$prefix_l + [[ $prefix = "/" ]] && unset prefix + [[ $hostonly_l ]] && hostonly=$hostonly_l +@@ -1049,6 +1053,37 @@ if [[ $hostonly ]]; then + push host_devs "$_dev" + done + ++ if [[ $nowaitforswap != yes ]] && [[ -f /proc/swaps ]] && [[ -f /etc/fstab ]]; then ++ while read dev type rest; do ++ [[ -b $dev ]] || continue ++ [[ "$type" == "partition" ]] || continue ++ ++ while read _d _m _t _o _r; do ++ [[ "$_d" == \#* ]] && continue ++ [[ $_d ]] || continue ++ [[ $_t != "swap" ]] && continue ++ [[ $_m != "swap" ]] && [[ $_m != "none" ]] && continue ++ [[ "$_o" == *noauto* ]] && continue ++ _d=$(expand_persistent_dev "$_d") ++ [[ "$_d" -ef "$dev" ]] || continue ++ ++ if [[ -f /etc/crypttab ]]; then ++ while read _mapper _a _p _o; do ++ [[ $_mapper = \#* ]] && continue ++ [[ "$_d" -ef /dev/mapper/"$_mapper" ]] || continue ++ [[ "$_o" ]] || _o="$_p" ++ # skip entries with password files ++ [[ "$_p" == /* ]] && [[ -f $_p ]] && continue 2 ++ # skip mkswap swap ++ [[ $_o == *swap* ]] && continue 2 ++ done < /etc/crypttab ++ fi ++ ++ push host_devs "$(readlink -f "$dev")" ++ break ++ done < /etc/fstab ++ done < /proc/swaps ++ fi + # record all host modaliases + declare -A host_modalias + find /sys/devices/ -name uevent -print > "$initdir/.modalias" +-- +1.8.4.5 + diff --git a/0130-nfs-Always-add-all-kernel-modules-for-kdump.patch b/0130-nfs-Always-add-all-kernel-modules-for-kdump.patch index 8ce4b17..7636d07 100644 --- a/0130-nfs-Always-add-all-kernel-modules-for-kdump.patch +++ b/0130-nfs-Always-add-all-kernel-modules-for-kdump.patch @@ -10,11 +10,11 @@ Signed-off-by: Thomas Renninger modules.d/95nfs/module-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: dracut-041/modules.d/95nfs/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/95nfs/module-setup.sh 2015-01-31 12:54:52.000000000 +0100 -+++ dracut-041/modules.d/95nfs/module-setup.sh 2015-03-18 11:58:44.924843754 +0100 -@@ -25,7 +25,7 @@ +diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh +index dabf3b0..c126efc 100755 +--- a/modules.d/95nfs/module-setup.sh ++++ b/modules.d/95nfs/module-setup.sh +@@ -28,7 +28,7 @@ depends() { # called by dracut installkernel() { @@ -22,4 +22,7 @@ Index: dracut-041/modules.d/95nfs/module-setup.sh + hostonly='' instmods nfs sunrpc ipv6 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files lockd rpcsec_gss_krb5 auth_rpcgss } - cmdline() { + # called by dracut +-- +1.8.4.5 + diff --git a/0131-40network-handle-prefixed-IP-addresses-correctly.patch b/0131-40network-handle-prefixed-IP-addresses-correctly.patch index f427d21..2e0296a 100644 --- a/0131-40network-handle-prefixed-IP-addresses-correctly.patch +++ b/0131-40network-handle-prefixed-IP-addresses-correctly.patch @@ -14,11 +14,11 @@ Signed-off-by: Hannes Reinecke modules.d/40network/ifup.sh | 8 ++++++++ 1 file changed, 8 insertions(+) -Index: dracut-041/modules.d/40network/ifup.sh -=================================================================== ---- dracut-041.orig/modules.d/40network/ifup.sh 2015-03-24 15:16:09.539033210 +0100 -+++ dracut-041/modules.d/40network/ifup.sh 2015-03-24 15:16:16.595429551 +0100 -@@ -223,11 +223,19 @@ +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index e0bf035..0a485ec 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -224,11 +224,19 @@ do_static() { [ -n "$macaddr" ] && ip link set address $macaddr dev $netif [ -n "$mtu" ] && ip link set mtu $mtu dev $netif [ -n "$mask" -a -z "$prefix" ] && prefix=$(mask_to_prefix $mask) @@ -38,3 +38,6 @@ Index: dracut-041/modules.d/40network/ifup.sh ip addr flush dev $netif ip addr add $ip/$prefix ${srv:+peer $srv} brd + dev $netif fi +-- +1.8.4.5 + diff --git a/0132-40network-fixup-static-network-configuration.patch b/0132-40network-fixup-static-network-configuration.patch index c642ee1..f7ddccc 100644 --- a/0132-40network-fixup-static-network-configuration.patch +++ b/0132-40network-fixup-static-network-configuration.patch @@ -18,16 +18,16 @@ Signed-off-by: Hannes Reinecke modules.d/40network/net-lib.sh | 6 +++++- 3 files changed, 20 insertions(+), 1 deletion(-) -Index: dracut-041/modules.d/40network/ifup.sh -=================================================================== ---- dracut-041.orig/modules.d/40network/ifup.sh 2015-03-18 12:03:26.848727065 +0100 -+++ dracut-041/modules.d/40network/ifup.sh 2015-03-18 12:04:02.246720640 +0100 -@@ -241,6 +241,19 @@ +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 0a485ec..84dc530 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -242,6 +242,19 @@ do_static() { fi - [ -n "$gw" ] && echo ip route replace default via $gw dev $netif > /tmp/net.$netif.gw + [ -n "$gw" ] && echo ip route add default via $gw dev $netif > /tmp/net.$netif.gw + -+ for ifroute in /etc/sysconfig/network/ifroute-${netif} /etc/sysconfig/netwrk/routes ; do ++ for ifroute in /etc/sysconfig/network/ifroute-${netif} /etc/sysconfig/network/routes ; do + [ -e ${ifroute} ] || continue + # Pull in existing routing configuration + read ifr_dest ifr_gw ifr_mask ifr_if < ${ifroute} @@ -42,11 +42,11 @@ Index: dracut-041/modules.d/40network/ifup.sh [ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname return 0 -Index: dracut-041/modules.d/40network/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/40network/module-setup.sh 2015-03-18 12:03:21.864446201 +0100 -+++ dracut-041/modules.d/40network/module-setup.sh 2015-03-18 12:03:26.856727409 +0100 -@@ -101,6 +101,8 @@ +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index 690ff08..9194b1a 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -103,6 +103,8 @@ install() { [[ $hostonly ]] && { inst_multiple /etc/sysconfig/network/ifcfg-* @@ -55,11 +55,11 @@ Index: dracut-041/modules.d/40network/module-setup.sh } inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \ -Index: dracut-041/modules.d/40network/net-lib.sh -=================================================================== ---- dracut-041.orig/modules.d/40network/net-lib.sh 2015-03-18 12:03:21.872446652 +0100 -+++ dracut-041/modules.d/40network/net-lib.sh 2015-03-18 12:03:26.860727590 +0100 -@@ -123,7 +123,6 @@ +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index a3b5030..fce845a 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -124,7 +124,6 @@ setup_net() { [ -e "/tmp/net.ifaces" ] && read IFACES < /tmp/net.ifaces [ -z "$IFACES" ] && IFACES="$netif" # run the scripts written by ifup @@ -67,7 +67,7 @@ Index: dracut-041/modules.d/40network/net-lib.sh [ -e /tmp/net.$netif.hostname ] && . /tmp/net.$netif.hostname [ -e /tmp/net.$netif.override ] && . /tmp/net.$netif.override [ -e /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts -@@ -150,6 +149,11 @@ +@@ -137,6 +136,11 @@ setup_net() { # Note: This assumes that if no router is present the # root server is on the same subnet. @@ -79,3 +79,6 @@ Index: dracut-041/modules.d/40network/net-lib.sh # Get DHCP-provided router IP, or the cmdline-provided "gw=" argument [ -n "$new_routers" ] && gw_ip=${new_routers%%,*} [ -n "$gw" ] && gw_ip=$gw +-- +1.8.4.5 + diff --git a/0135-lvm-Fix-12819a579900b9691e2-check-for-existance-of-6.patch b/0135-lvm-Fix-12819a579900b9691e2-check-for-existance-of-6.patch new file mode 100644 index 0000000..582bab7 --- /dev/null +++ b/0135-lvm-Fix-12819a579900b9691e2-check-for-existance-of-6.patch @@ -0,0 +1,39 @@ +From 416e3ebbabcf7a7786aeb642f5fcbd62a7850ff0 Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Thu, 14 Aug 2014 15:50:29 +0200 +Subject: lvm: Fix 12819a579900b9691e2 check for existance of + 69-dm-lvm-metad.rules + +Move last sed into if condition that checks for 69-dm-lvm-metad.rules existence + +Signed-off-by: Thomas Renninger +--- + modules.d/90lvm/module-setup.sh | 9 +++++---- + 1 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index 77f9e9d..6fda69e 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -84,13 +84,14 @@ install() { + inst_rules 11-dm-lvm.rules 69-dm-lvm-metad.rules + + # Do not run lvmetad update via pvscan in udev rule - lvmetad is not running yet in dracut! +- if [[ -f ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ]] && \ +- grep -q SYSTEMD_WANTS ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules; then ++ if [[ -f ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ]];then ++ if grep -q SYSTEMD_WANTS ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules; then + sed -i -e 's/^ENV{SYSTEMD_ALIAS}=.*/# No LVM pvscan in dracut - lvmetad is not running yet/' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules + sed -i -e 's/^ENV{ID_MODEL}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules + sed -i -e 's/^ENV{SYSTEMD_WANTS}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules +- else +- sed -i -e 's/.*lvm pvscan.*/# No LVM pvscan for in dracut - lvmetad is not running yet/' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ++ else ++ sed -i -e 's/.*lvm pvscan.*/# No LVM pvscan for in dracut - lvmetad is not running yet/' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ++ fi + fi + + # Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install above rules +-- +1.7.6.1 + diff --git a/0136-Revert-95udev-rules-add-persistent-network-rule.patch b/0136-Revert-95udev-rules-add-persistent-network-rule.patch new file mode 100644 index 0000000..8b3ea03 --- /dev/null +++ b/0136-Revert-95udev-rules-add-persistent-network-rule.patch @@ -0,0 +1,25 @@ +From 200629fb5957d091525057ccde391b8282074ed7 Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Thu, 14 Aug 2014 16:08:23 +0200 +Subject: Revert "95udev-rules: add persistent network rule" + +This reverts commit 577e9e8a0d5e060e14ac1caef28201bfa208275c. +--- + modules.d/95udev-rules/module-setup.sh | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh +index 059ad0d..864897f 100755 +--- a/modules.d/95udev-rules/module-setup.sh ++++ b/modules.d/95udev-rules/module-setup.sh +@@ -34,7 +34,6 @@ install() { + 60-pcmcia.rules \ + 50-udev.rules 95-late.rules \ + 50-firmware.rules \ +- 70-persistent-net.rules \ + 59-scsi-sg3_utils.rules \ + 75-net-description.rules \ + 80-net-name-slot.rules 80-net-setup-link.rules \ +-- +1.7.6.1 + diff --git a/0137-Switch-from-Mozilla-NSS-sha256hmac-checking-to-fipsc.patch b/0137-Switch-from-Mozilla-NSS-sha256hmac-checking-to-fipsc.patch index 59bf817..cdf1b90 100644 --- a/0137-Switch-from-Mozilla-NSS-sha256hmac-checking-to-fipsc.patch +++ b/0137-Switch-from-Mozilla-NSS-sha256hmac-checking-to-fipsc.patch @@ -10,11 +10,11 @@ Signed-off-by: Thomas Renninger modules.d/01fips/module-setup.sh | 13 +++++++------ 2 files changed, 9 insertions(+), 10 deletions(-) -Index: dracut-041/modules.d/01fips/fips.sh -=================================================================== ---- dracut-041.orig/modules.d/01fips/fips.sh 2015-03-18 13:56:05.453753422 +0100 -+++ dracut-041/modules.d/01fips/fips.sh 2015-03-18 13:59:59.386939913 +0100 -@@ -59,9 +59,7 @@ +diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh +index 07bd1da..19a2d8e 100755 +--- a/modules.d/01fips/fips.sh ++++ b/modules.d/01fips/fips.sh +@@ -61,9 +61,7 @@ do_rhevh_check() kpath=${1} # If we're on RHEV-H, the kernel is in /run/initramfs/live/vmlinuz0 @@ -25,7 +25,7 @@ Index: dracut-041/modules.d/01fips/fips.sh warn "HMAC sum mismatch" return 1 fi -@@ -126,7 +124,7 @@ +@@ -128,7 +126,7 @@ do_fips() elif [ -e "/run/initramfs/live/isolinux/vmlinuz0" ]; then do_rhevh_check /run/initramfs/live/isolinux/vmlinuz0 || return 1 else @@ -34,11 +34,11 @@ Index: dracut-041/modules.d/01fips/fips.sh fi info "All initrd crypto checks done" -Index: dracut-041/modules.d/01fips/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/01fips/module-setup.sh 2015-03-18 13:56:05.457753647 +0100 -+++ dracut-041/modules.d/01fips/module-setup.sh 2015-03-18 14:10:06.717187740 +0100 -@@ -21,7 +21,7 @@ +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index 8437e56..009b2ca 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -23,7 +23,7 @@ installkernel() { _fipsmodules+="sha512-ssse3 sha1-ssse3 sha256-ssse3 " _fipsmodules+="ghash-clmulni-intel " @@ -47,12 +47,12 @@ Index: dracut-041/modules.d/01fips/module-setup.sh mkdir -m 0755 -p "${initdir}/etc/modprobe.d" -@@ -40,15 +40,16 @@ +@@ -42,15 +42,16 @@ install() { inst_hook pre-pivot 01 "$moddir/fips-noboot.sh" inst_script "$moddir/fips.sh" /sbin/fips.sh - inst_multiple sha512hmac rmmod insmod mount uname umount fipscheck -+ inst_multiple rmmod insmod mount uname umount fipscheck ++ inst_multiple rmmod insmod mount uname umount fipscheck strace - inst_libdir_file libsoftokn3.so libsoftokn3.so \ - libsoftokn3.chk libfreebl3.so libfreebl3.chk \ @@ -66,6 +66,9 @@ Index: dracut-041/modules.d/01fips/module-setup.sh .libcryptsetup.so.4.5.0.hmac .libcryptsetup.so.4.hmac \ .libgcrypt.so.20.hmac \ - .libfipscheck.so.1.hmac .libfipscheck.so.1.1.0.hmac - libfreeblpriv3.so libfreeblpriv3.chk # we do not use prelink at SUSE + #inst_multiple -o prelink +-- +1.7.6.1 + diff --git a/0138-warpclock-Do-not-use-warpclock-module-on-S390-x-hwcl.patch b/0138-warpclock-Do-not-use-warpclock-module-on-S390-x-hwcl.patch new file mode 100644 index 0000000..2306fe7 --- /dev/null +++ b/0138-warpclock-Do-not-use-warpclock-module-on-S390-x-hwcl.patch @@ -0,0 +1,31 @@ +From 56b5871a7336b1d90c76a282fa3d7f76e7f10769 Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Thu, 14 Aug 2014 16:59:16 +0200 +Subject: warpclock: Do not use warpclock module on S390(x), hwclock does not + exist there + +bnc#884513 + +Signed-off-by: Thomas Renninger +--- + modules.d/00warpclock/module-setup.sh | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/modules.d/00warpclock/module-setup.sh b/modules.d/00warpclock/module-setup.sh +index 5aec4eb..9af1ee7 100755 +--- a/modules.d/00warpclock/module-setup.sh ++++ b/modules.d/00warpclock/module-setup.sh +@@ -4,6 +4,10 @@ + + # called by dracut + check() { ++ # hwclock does not exist on S390(x), bail out silently then ++ local _arch=$(uname -m) ++ [ "$_arch" = "s390" -o "$_arch" = "s390x" ] && return 1 ++ + [ -e /etc/localtime -a -e /etc/adjtime ] || return 1 + require_binaries /sbin/hwclock || return 1 + } +-- +1.7.6.1 + diff --git a/0139-dracut.sh-check-for-logfile-logfile-option-and-creat.patch b/0139-dracut.sh-check-for-logfile-logfile-option-and-creat.patch new file mode 100644 index 0000000..bfded41 --- /dev/null +++ b/0139-dracut.sh-check-for-logfile-logfile-option-and-creat.patch @@ -0,0 +1,35 @@ +From 449f9a748229f78844861194187ee36a4cccd7f2 Mon Sep 17 00:00:00 2001 +From: jloeser +Date: Mon, 18 Aug 2014 16:19:54 +0200 +Subject: dracut.sh: 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 +--- + dracut.sh | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/dracut.sh b/dracut.sh +index 92b30bb..ffe4989 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -803,6 +803,12 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) + # eliminate IFS hackery when messing with fw_dir + fw_dir=${fw_dir//:/ } + ++if [[ ! -f $logfile ]];then ++ if [[ ! `touch $logfile > /dev/null 2>&1` ]];then ++ printf "%s\n" "dracut: touch $logfile failed. Couldn't create logfile." ++ fi ++fi ++ + # handle compression options. + [[ $compress ]] || compress="gzip" + case $compress in +-- +1.8.4.5 + diff --git a/0140-dracut.sh-Avoid-duplicate-devices-in-host_devs.patch b/0140-dracut.sh-Avoid-duplicate-devices-in-host_devs.patch new file mode 100644 index 0000000..bdc317c --- /dev/null +++ b/0140-dracut.sh-Avoid-duplicate-devices-in-host_devs.patch @@ -0,0 +1,94 @@ +From 0151fb96092de63406f78ccfe0c2aa2c5bd04123 Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Mon, 18 Aug 2014 18:30:13 +0200 +Subject: 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 ffe4989..5d3536f 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -221,6 +221,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 +@@ -1007,25 +1017,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 + +@@ -1054,9 +1064,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 [[ $nowaitforswap != yes ]] && [[ -f /proc/swaps ]] && [[ -f /etc/fstab ]]; then +@@ -1085,7 +1095,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 +@@ -1150,7 +1160,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 +-- +1.8.4.5 + diff --git a/0141-iscsi-Avoid-bad-ip-route-call-on-empty-address.patch b/0141-iscsi-Avoid-bad-ip-route-call-on-empty-address.patch new file mode 100644 index 0000000..21e03d1 --- /dev/null +++ b/0141-iscsi-Avoid-bad-ip-route-call-on-empty-address.patch @@ -0,0 +1,29 @@ +From 0314d2a2e1483a6535db88f3038ff5a43259bafd Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Mon, 18 Aug 2014 19:06:13 +0200 +Subject: iscsi: Avoid bad ip route call on empty address + +Without this patch it will lead to: +Command line is not complete. Try option "help" +error messages on specific host devs. + +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 f63634a..94eb023 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -76,6 +76,7 @@ install_iscsiroot() { + 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} +-- +1.8.4.5 + diff --git a/0142-40network-Don-t-report-error-for-etc-sysconfig-netwo.patch b/0142-40network-Don-t-report-error-for-etc-sysconfig-netwo.patch index e3cdfae..271f866 100644 --- a/0142-40network-Don-t-report-error-for-etc-sysconfig-netwo.patch +++ b/0142-40network-Don-t-report-error-for-etc-sysconfig-netwo.patch @@ -9,11 +9,11 @@ Signed-off-by: Julian Wolf modules.d/40network/module-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: dracut-041/modules.d/40network/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/40network/module-setup.sh 2015-03-24 15:16:22.251747251 +0100 -+++ dracut-041/modules.d/40network/module-setup.sh 2015-03-24 15:17:03.618071127 +0100 -@@ -101,7 +101,7 @@ +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index 9194b1a..8d74450 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -103,7 +103,7 @@ install() { [[ $hostonly ]] && { inst_multiple /etc/sysconfig/network/ifcfg-* @@ -22,3 +22,6 @@ Index: dracut-041/modules.d/40network/module-setup.sh inst_simple /etc/sysconfig/network/routes } +-- +1.8.4.5 + diff --git a/0143-iscsi-Fix-up-ipv6-in-brackets-iterate-over-all-possi.patch b/0143-iscsi-Fix-up-ipv6-in-brackets-iterate-over-all-possi.patch new file mode 100644 index 0000000..6cb92eb --- /dev/null +++ b/0143-iscsi-Fix-up-ipv6-in-brackets-iterate-over-all-possi.patch @@ -0,0 +1,71 @@ +From 59ca38d9c6f8e01600c167827df8dc5dd3e140d8 Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Tue, 19 Aug 2014 15:59:21 +0200 +Subject: iscsi: Fix up ipv6 in brackets, iterate over all possible needed + iscsi mounts + +for_each_host_dev_and_slaves only iterates over the rootfs, this one is +successful and then it exits. + +This does not work if the --mount option is passed on a iscsi target. +Now really iterate over all host_devs via: +for_each_host_dev_and_slaves_all + +and set needed iscsi kernel commandline accordingly. +Now also the parent block device, e.g. /dev/sda and /dev/sda4 are iterated +which results in duplicated iscsi parameters. +Avoid this by piping the final iscsi cmdline function through | sort |uniq + +Signed-off-by: Thomas Renninger +--- + modules.d/95iscsi/module-setup.sh | 20 ++++++++++++++------ + 1 file changed, 14 insertions(+), 6 deletions(-) + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index 94eb023..9772210 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -93,6 +93,12 @@ install_iscsiroot() { + 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 +@@ -111,7 +117,7 @@ install_softiscsi() { + install_iscsiroot $iscsi_dev + } + +- for_each_host_dev_and_slaves is_softiscsi || return 255 ++ for_each_host_dev_and_slaves_all is_softiscsi || return 255 + return 0 + } + +@@ -194,11 +200,13 @@ installkernel() { + # called by dracut + cmdline() { + local _iscsiconf=$(install_ibft) +- if [ "$_iscsiconf" ] ; then +- echo ${_iscsiconf} +- else +- install_softiscsi +- fi ++ { ++ if [ "$_iscsiconf" ] ; then ++ echo ${_iscsiconf} ++ else ++ install_softiscsi ++ fi ++ } | sort | uniq + } + + # called by dracut +-- +1.8.4.5 + diff --git a/0144-90crypt-Fixed-crypttab_contains-to-also-work-with-de.patch b/0144-90crypt-Fixed-crypttab_contains-to-also-work-with-de.patch index 473cd58..aa3f392 100644 --- a/0144-90crypt-Fixed-crypttab_contains-to-also-work-with-de.patch +++ b/0144-90crypt-Fixed-crypttab_contains-to-also-work-with-de.patch @@ -17,11 +17,11 @@ Signed-off-by: Julian Wolf modules.d/90crypt/module-setup.sh | 4 ++++ 2 files changed, 13 insertions(+) -Index: dracut-041/modules.d/90crypt/crypt-lib.sh -=================================================================== ---- dracut-041.orig/modules.d/90crypt/crypt-lib.sh 2015-01-31 12:54:52.000000000 +0100 -+++ dracut-041/modules.d/90crypt/crypt-lib.sh 2015-03-24 15:17:12.866590774 +0100 -@@ -5,11 +5,20 @@ +diff --git a/modules.d/90crypt/crypt-lib.sh b/modules.d/90crypt/crypt-lib.sh +index f48397d..fe72914 100755 +--- a/modules.d/90crypt/crypt-lib.sh ++++ b/modules.d/90crypt/crypt-lib.sh +@@ -7,11 +7,20 @@ command -v getarg >/dev/null || . /lib/dracut-lib.sh # check if the crypttab contains an entry for a LUKS UUID crypttab_contains() { local luks="$1" @@ -42,11 +42,11 @@ Index: dracut-041/modules.d/90crypt/crypt-lib.sh done < /etc/crypttab fi return 1 -Index: dracut-041/modules.d/90crypt/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/90crypt/module-setup.sh 2015-01-31 12:54:52.000000000 +0100 -+++ dracut-041/modules.d/90crypt/module-setup.sh 2015-03-24 15:17:12.866590774 +0100 -@@ -63,6 +63,7 @@ +diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh +index e423a95..c79dbb8 100755 +--- a/modules.d/90crypt/module-setup.sh ++++ b/modules.d/90crypt/module-setup.sh +@@ -65,6 +65,7 @@ install() { inst_hook cleanup 30 "$moddir/crypt-cleanup.sh" fi @@ -54,7 +54,7 @@ Index: dracut-041/modules.d/90crypt/module-setup.sh if [[ $hostonly ]] && [[ -f /etc/crypttab ]]; then # filter /etc/crypttab for the devices we need while read _mapper _dev _rest; do -@@ -72,6 +73,8 @@ +@@ -74,6 +75,8 @@ install() { [[ $_dev == UUID=* ]] && \ _dev="/dev/disk/by-uuid/${_dev#UUID=}" @@ -63,7 +63,7 @@ Index: dracut-041/modules.d/90crypt/module-setup.sh for _hdev in "${!host_fs_types[@]}"; do [[ ${host_fs_types[$_hdev]} == "crypto_LUKS" ]] || continue if [[ $_hdev -ef $_dev ]] || [[ /dev/block/$_hdev -ef $_dev ]]; then -@@ -84,6 +87,7 @@ +@@ -85,6 +88,7 @@ install() { fi inst_simple "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh" @@ -71,3 +71,6 @@ Index: dracut-041/modules.d/90crypt/module-setup.sh inst_multiple -o \ $systemdutildir/system-generators/systemd-cryptsetup-generator \ +-- +1.8.4.5 + diff --git a/0146-dracut.sh-corrected-logfile-check.patch b/0146-dracut.sh-corrected-logfile-check.patch new file mode 100644 index 0000000..83f6a41 --- /dev/null +++ b/0146-dracut.sh-corrected-logfile-check.patch @@ -0,0 +1,33 @@ +From 077c4bc889733c6c38b767c99f56ef67a82ef432 Mon Sep 17 00:00:00 2001 +From: jloeser +Date: Fri, 22 Aug 2014 16:31:34 +0200 +Subject: dracut.sh: corrected logfile check + +--- + dracut.sh | 10 +++++++--- + 1 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index ffe4989..5bf41f2 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -803,9 +803,13 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) + # eliminate IFS hackery when messing with fw_dir + fw_dir=${fw_dir//:/ } + +-if [[ ! -f $logfile ]];then +- if [[ ! `touch $logfile > /dev/null 2>&1` ]];then +- printf "%s\n" "dracut: touch $logfile failed. Couldn't create logfile." ++# 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 + +-- +1.7.6.1 + diff --git a/0147-dracut.sh-Fix-UUID-fstab-parsing-in-case-mount-optio.patch b/0147-dracut.sh-Fix-UUID-fstab-parsing-in-case-mount-optio.patch new file mode 100644 index 0000000..4313111 --- /dev/null +++ b/0147-dracut.sh-Fix-UUID-fstab-parsing-in-case-mount-optio.patch @@ -0,0 +1,55 @@ +From be3797f733ad5e956c73d0f17ba8bddc12b7f570 Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Fri, 22 Aug 2014 18:52:22 +0200 +Subject: 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 | 23 +++++++++++++++++++++-- + 1 files changed, 21 insertions(+), 2 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 297c6bf..d087530 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1020,9 +1020,28 @@ 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=/dev/disk/by-uuid/${dev#UUID=*} ++ ;; ++ LABEL=*) ++ dwarn "Not supported fstab line: $@" ++ ;; ++ PARTUUID=*) ++ dwarn "Not supported fstab line: $@" ++ ;; ++ PARTLABEL=*) ++ dwarn "Not supported fstab line: $@" ++ ;; ++ *) ++ dwarn "Not supported fstab line: $@" ++ ;; ++ esac ++ push_host_devs "$dev" ++ echo "$dev" "$3" ++ host_fs_types["$dev"]="$3" + done + + for f in $add_fstab; do +-- +1.7.6.1 + diff --git a/0148-dracut.sh-Fix-LABEL-and-other-fstab-syntax.patch b/0148-dracut.sh-Fix-LABEL-and-other-fstab-syntax.patch new file mode 100644 index 0000000..9746a2d --- /dev/null +++ b/0148-dracut.sh-Fix-LABEL-and-other-fstab-syntax.patch @@ -0,0 +1,45 @@ +From 445d0a70896485991ba8ccc763422eefcda1ba1e Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Mon, 25 Aug 2014 18:04:05 +0200 +Subject: dracut.sh: Fix LABEL= and other fstab syntax + +On my test system I had problem with -o device in combination with -l option, +but this must have been a blkid, or sysfs issue. +Patch should be correct. + +Signed-off-by: Thomas Renninger +--- + dracut.sh | 11 ++++------- + 1 files changed, 4 insertions(+), 7 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index d087530..2baacfd 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1024,19 +1024,16 @@ for line in "${fstab_lines[@]}"; do + #dev mp fs fsopts + case "$dev" in + UUID=*) +- dev=/dev/disk/by-uuid/${dev#UUID=*} ++ dev=$(blkid -l -t PARTLABEL="$dev" -o device) + ;; + LABEL=*) +- dwarn "Not supported fstab line: $@" ++ dev=$(blkid -l -t LABEL="$dev" -o device) + ;; + PARTUUID=*) +- dwarn "Not supported fstab line: $@" ++ dev=$(blkid -l -t PARTUUID="$dev" -o device) + ;; + PARTLABEL=*) +- dwarn "Not supported fstab line: $@" +- ;; +- *) +- dwarn "Not supported fstab line: $@" ++ dev=$(blkid -l -t PARTLABEL="$dev" -o device) + ;; + esac + push_host_devs "$dev" +-- +1.7.6.1 + diff --git a/0149-dracut.sh-Fix-fstab-parsing-again.patch b/0149-dracut.sh-Fix-fstab-parsing-again.patch new file mode 100644 index 0000000..6e40d5e --- /dev/null +++ b/0149-dracut.sh-Fix-fstab-parsing-again.patch @@ -0,0 +1,43 @@ +From b444f676e0c3847a42e7cd360846c8b669b022c3 Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Tue, 26 Aug 2014 17:31:33 +0200 +Subject: dracut.sh: Fix fstab parsing again... + +Signed-off-by: Thomas Renninger +--- + dracut.sh | 10 +++++----- + 1 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 2baacfd..3a0c64b 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1024,20 +1024,20 @@ for line in "${fstab_lines[@]}"; do + #dev mp fs fsopts + case "$dev" in + UUID=*) +- dev=$(blkid -l -t PARTLABEL="$dev" -o device) ++ dev=$(blkid -l -t UUID=${dev#UUID=} -o device) + ;; + LABEL=*) +- dev=$(blkid -l -t LABEL="$dev" -o device) ++ dev=$(blkid -l -t LABEL=${dev#LABEL=} -o device) + ;; + PARTUUID=*) +- dev=$(blkid -l -t PARTUUID="$dev" -o device) ++ dev=$(blkid -l -t PARTUUID=${dev#PARTUUID=} -o device) + ;; + PARTLABEL=*) +- dev=$(blkid -l -t PARTLABEL="$dev" -o device) ++ dev=$(blkid -l -t PARTLABEL=${dev#PARTLABEL=} -o device) + ;; + esac ++ [ -z "$dev" ] && dwarn "Bad fstab entry $@" && continue + push_host_devs "$dev" +- echo "$dev" "$3" + host_fs_types["$dev"]="$3" + done + +-- +1.7.6.1 + diff --git a/0150-Find-kernel-modules-in-extra-and-weak-updates-path-a.patch b/0150-Find-kernel-modules-in-extra-and-weak-updates-path-a.patch index 71330a4..a8b94ca 100644 --- a/0150-Find-kernel-modules-in-extra-and-weak-updates-path-a.patch +++ b/0150-Find-kernel-modules-in-extra-and-weak-updates-path-a.patch @@ -8,11 +8,11 @@ Signed-off-by: Thomas Renninger dracut-functions.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -Index: dracut-041/dracut-functions.sh -=================================================================== ---- dracut-041.orig/dracut-functions.sh 2015-03-24 15:12:43.423456648 +0100 -+++ dracut-041/dracut-functions.sh 2015-03-24 15:17:15.610744959 +0100 -@@ -1657,7 +1657,7 @@ +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 22e16ff..208c295 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -1623,7 +1623,7 @@ find_kernel_modules_by_path () { _OLDIFS=$IFS IFS=: while read a rest; do @@ -21,3 +21,6 @@ Index: dracut-041/dracut-functions.sh printf "%s\n" "$srcmods/$a" done < "$srcmods/modules.dep" IFS=$_OLDIFS +-- +1.7.6.1 + diff --git a/0151-Go-back-to-xz-again-pixz-may-use-too-much-memory-whi.patch b/0151-Go-back-to-xz-again-pixz-may-use-too-much-memory-whi.patch new file mode 100644 index 0000000..d478ab7 --- /dev/null +++ b/0151-Go-back-to-xz-again-pixz-may-use-too-much-memory-whi.patch @@ -0,0 +1,28 @@ +From f25f24d6b13061b952d5420939898fe9d5496804 Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Fri, 29 Aug 2014 16:17:50 +0200 +Subject: Go back to xz again, pixz may use too much memory while compressing. + +bnc#893981 + +Signed-off-by: Thomas Renninger +--- + dracut.conf.d/suse.conf.example | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/dracut.conf.d/suse.conf.example b/dracut.conf.d/suse.conf.example +index 818b59f..b0ef0e5 100644 +--- a/dracut.conf.d/suse.conf.example ++++ b/dracut.conf.d/suse.conf.example +@@ -7,7 +7,7 @@ + hostonly="yes" + hostonly_cmdline="yes" + +-compress="pixz -6" ++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" +-- +1.7.6.1 + diff --git a/0152-Add-a-comment-to-easily-add-debug-modules-also-add-v.patch b/0152-Add-a-comment-to-easily-add-debug-modules-also-add-v.patch new file mode 100644 index 0000000..01c899e --- /dev/null +++ b/0152-Add-a-comment-to-easily-add-debug-modules-also-add-v.patch @@ -0,0 +1,46 @@ +From 9cbbca5888f657833e658fcfe1fc21e74c3a3507 Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Fri, 29 Aug 2014 16:19:33 +0200 +Subject: Add a comment to easily add debug modules, also add vi to debug + module + +Signed-off-by: Thomas Renninger +--- + dracut.conf.d/suse.conf.example | 10 ++++++++++ + modules.d/95debug/module-setup.sh | 2 +- + 2 files changed, 11 insertions(+), 1 deletions(-) + +diff --git a/dracut.conf.d/suse.conf.example b/dracut.conf.d/suse.conf.example +index b0ef0e5..37ffd72 100644 +--- a/dracut.conf.d/suse.conf.example ++++ b/dracut.conf.d/suse.conf.example +@@ -12,3 +12,13 @@ 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 1891fa8..cdc56dc 100755 +--- a/modules.d/95debug/module-setup.sh ++++ b/modules.d/95debug/module-setup.sh +@@ -16,7 +16,7 @@ depends() { + # called by dracut + install() { + inst_multiple -o ps grep more cat rm strace free showmount \ +- ping netstat rpcinfo vi scp ping6 ssh find \ ++ ping netstat rpcinfo vi scp ping6 ssh find vi \ + fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.vfat e2fsck + } + +-- +1.7.6.1 + diff --git a/0153-Only-add-network-module-on-request-and-on-dependenci.patch b/0153-Only-add-network-module-on-request-and-on-dependenci.patch new file mode 100644 index 0000000..7728e88 --- /dev/null +++ b/0153-Only-add-network-module-on-request-and-on-dependenci.patch @@ -0,0 +1,28 @@ +From 8692d504138fdae15a1f94702efe3948917781cf Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Mon, 1 Sep 2014 12:31:26 +0200 +Subject: Only add network module on request (and on dependencies) + +bnc#892851 + +Signed-off-by: Thomas Renninger +--- + modules.d/40network/module-setup.sh | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index 8d74450..886866b 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -11,7 +11,7 @@ check() { + + require_binaries ip arping $WICKEDD_DHCP_PATH/wickedd-dhcp4 $WICKEDD_DHCP_PATH/wickedd-dhcp6 || return 1 + +- return 0 ++ return 255 + } + + # called by dracut +-- +1.7.6.1 + diff --git a/0154-resume-Also-allow-this-module-on-S390-again-s2disk-c.patch b/0154-resume-Also-allow-this-module-on-S390-again-s2disk-c.patch new file mode 100644 index 0000000..c2cd437 --- /dev/null +++ b/0154-resume-Also-allow-this-module-on-S390-again-s2disk-c.patch @@ -0,0 +1,31 @@ +From 30cb6e8070804878a060ffebd685d9a8579c696f Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Wed, 3 Sep 2014 13:49:16 +0200 +Subject: resume: Also allow this module on S390 again -> s2disk can work on + s390(x) + +bnc#889795 + +Signed-off-by: Thomas Renninger +--- + modules.d/95resume/module-setup.sh | 4 ---- + 1 files changed, 0 insertions(+), 4 deletions(-) + +diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh +index b1044ed..108e6ab 100755 +--- a/modules.d/95resume/module-setup.sh ++++ b/modules.d/95resume/module-setup.sh +@@ -4,10 +4,6 @@ + + # called by dracut + check() { +- local _arch=$(uname -m) +- # No suspend support on s390(x) +- [ "$_arch" = "s390" -o "$_arch" = "s390x" ] && return 1 +- + # No point trying to support resume, if no swap partition exist + [[ $hostonly ]] || [[ $mount_needs ]] && { + for fs in "${host_fs_types[@]}"; do +-- +1.7.6.1 + diff --git a/0155-iscsi-iscsi.initiator-and-others-can-and-must-only-s.patch b/0155-iscsi-iscsi.initiator-and-others-can-and-must-only-s.patch new file mode 100644 index 0000000..a82fc20 --- /dev/null +++ b/0155-iscsi-iscsi.initiator-and-others-can-and-must-only-s.patch @@ -0,0 +1,72 @@ +From 26a858af5977a41b21839ce8411024bfe3f63dea Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Thu, 4 Sep 2014 13:36:18 +0200 +Subject: 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 1de6fb7..1c4be4e 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -83,23 +83,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 9772210..4784ea3 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -99,7 +99,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 + } +-- +1.7.6.1 + diff --git a/0156-dracut.usage.asc-Remove-distro-specific-help-from-ma.patch b/0156-dracut.usage.asc-Remove-distro-specific-help-from-ma.patch new file mode 100644 index 0000000..cf5bffc --- /dev/null +++ b/0156-dracut.usage.asc-Remove-distro-specific-help-from-ma.patch @@ -0,0 +1,48 @@ +From 8c53ac66b29e91fa5a6140e7e414ca884032fd11 Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Mon, 8 Sep 2014 16:43:20 +0200 +Subject: dracut.usage.asc: Remove distro specific help from manpage + +Signed-off-by: Thomas Renninger +--- + dracut.usage.asc | 17 +---------------- + 1 files changed, 1 insertions(+), 16 deletions(-) + +diff --git a/dracut.usage.asc b/dracut.usage.asc +index 0787ead..6f3c513 100644 +--- a/dracut.usage.asc ++++ b/dracut.usage.asc +@@ -246,21 +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 Storage Administration Guide]. +- + If you specify ip=auto 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 +@@ -300,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]] +-- +1.7.6.1 + diff --git a/0157-Add-boot-zipl-to-host-devs-if-it-is-a-mount-point.patch b/0157-Add-boot-zipl-to-host-devs-if-it-is-a-mount-point.patch index 5d7e461..3d1d918 100644 --- a/0157-Add-boot-zipl-to-host-devs-if-it-is-a-mount-point.patch +++ b/0157-Add-boot-zipl-to-host-devs-if-it-is-a-mount-point.patch @@ -10,11 +10,11 @@ Signed-off-by: Thomas Renninger dracut.sh | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) -Index: dracut-041/dracut.sh -=================================================================== ---- dracut-041.orig/dracut.sh 2015-03-24 15:16:01.578586094 +0100 -+++ dracut-041/dracut.sh 2015-03-24 15:17:20.507020068 +0100 -@@ -1133,6 +1133,7 @@ +diff --git a/dracut.sh b/dracut.sh +index 3a0c64b..411a972 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1077,6 +1077,7 @@ if [[ $hostonly ]]; then "/usr/lib64" \ "/boot" \ "/boot/efi" \ @@ -22,3 +22,6 @@ Index: dracut-041/dracut.sh ; do mp=$(readlink -f "$mp") +-- +1.7.6.1 + diff --git a/0158-Add-SUSE-kernel-module-dependencies-in-etc-modprobe..patch b/0158-Add-SUSE-kernel-module-dependencies-in-etc-modprobe..patch index 164be45..7e39ec0 100644 --- a/0158-Add-SUSE-kernel-module-dependencies-in-etc-modprobe..patch +++ b/0158-Add-SUSE-kernel-module-dependencies-in-etc-modprobe..patch @@ -11,31 +11,29 @@ CC: Jan Loeser dracut.sh | 12 ++++++++++++ 2 files changed, 17 insertions(+), 1 deletions(-) -Index: dracut-041/dracut-functions.sh -=================================================================== ---- dracut-041.orig/dracut-functions.sh 2015-03-18 15:17:19.164428826 +0100 -+++ dracut-041/dracut-functions.sh 2015-03-18 15:19:21.855346813 +0100 -@@ -1740,8 +1740,14 @@ +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 208c295..7d81f65 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -1706,8 +1706,12 @@ instmods() { --set-version $kernel ${_moddirname} $_mpargs ((_ret+=$?)) else - [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && \ -+ if [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] \ -+ && [ -n "${_mod%.ko*}" ]; then - echo ${_mod%.ko*} >> "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist" -+ for suse_mod_dep in ${suse_mod_deps["${_mod%.ko*}"]}; do ++ if [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && [ -n "$_mod" ]; then + echo $_mod >> "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist" ++ for suse_mod_dep in ${suse_mod_deps["$_mod"]}; do + echo $suse_mod_dep >> "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist" + done + fi -+ fi ;; esac -Index: dracut-041/dracut.sh -=================================================================== ---- dracut-041.orig/dracut.sh 2015-03-18 15:11:37.169146866 +0100 -+++ dracut-041/dracut.sh 2015-03-18 15:17:19.172429202 +0100 -@@ -841,6 +841,18 @@ +diff --git a/dracut.sh b/dracut.sh +index 411a972..c301138 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -823,6 +823,18 @@ if [[ -n "$logfile" ]];then fi fi @@ -54,3 +52,6 @@ Index: dracut-041/dracut.sh # handle compression options. [[ $compress ]] || compress="gzip" case $compress in +-- +1.7.6.1 + diff --git a/0159-network-Try-to-load-xennet.patch b/0159-network-Try-to-load-xennet.patch index e4cbc3d..f46c51c 100644 --- a/0159-network-Try-to-load-xennet.patch +++ b/0159-network-Try-to-load-xennet.patch @@ -10,11 +10,11 @@ Signed-off-by: Thomas Renninger modules.d/40network/module-setup.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -Index: dracut-041/modules.d/40network/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/40network/module-setup.sh 2015-03-24 15:17:03.618071127 +0100 -+++ dracut-041/modules.d/40network/module-setup.sh 2015-03-24 15:17:30.915604891 +0100 -@@ -68,7 +68,7 @@ +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index 886866b..6a7e51a 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -70,7 +70,7 @@ installkernel() { =drivers/net/phy \ =drivers/net/team \ =drivers/net/ethernet \ @@ -23,3 +23,6 @@ Index: dracut-041/modules.d/40network/module-setup.sh } # called by dracut +-- +1.7.6.1 + diff --git a/0160-nfs-Add-ip-.-and-root-nfs.-parameters-to-internal-dr.patch b/0160-nfs-Add-ip-.-and-root-nfs.-parameters-to-internal-dr.patch new file mode 100644 index 0000000..1c6a305 --- /dev/null +++ b/0160-nfs-Add-ip-.-and-root-nfs.-parameters-to-internal-dr.patch @@ -0,0 +1,74 @@ +From 25e7640c04a687f7bbd3ac2416ea2f1fef122c48 Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Wed, 24 Sep 2014 17:23:32 +0200 +Subject: 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 | 39 ++++++++++++++++++++++++++++++++++++++- + 1 files changed, 38 insertions(+), 1 deletions(-) + +diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh +index c126efc..b6ddb21 100755 +--- a/modules.d/95nfs/module-setup.sh ++++ b/modules.d/95nfs/module-setup.sh +@@ -31,14 +31,51 @@ installkernel() { + hostonly='' instmods nfs sunrpc ipv6 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files lockd rpcsec_gss_krb5 auth_rpcgss + } + ++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') ++ printf 'ip=%s:static\n' ${ifname} ++} ++ + # called by dracut + install() { + local _i + local _nsslibs + inst_multiple -o portmap rpcbind rpc.statd mount.nfs \ +- mount.nfs4 umount rpc.idmapd sed /etc/netconfig ++ mount.nfs4 umount rpc.idmapd sed /etc/netconfig host sed + 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 +-- +1.7.6.1 + diff --git a/0161-Fix-error-message-when-there-are-no-internal-kernel-.patch b/0161-Fix-error-message-when-there-are-no-internal-kernel-.patch new file mode 100644 index 0000000..72a2858 --- /dev/null +++ b/0161-Fix-error-message-when-there-are-no-internal-kernel-.patch @@ -0,0 +1,41 @@ +From 044c4999b7791f40c27bb5f92b76f67bbd6cc18a Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Wed, 24 Sep 2014 17:35:28 +0200 +Subject: Fix error message when there are no internal kernel commandline + parameters + +Otherwise you could get messages like that: +Stored kernel commandline: +/usr/bin/dracut: line 1559: /var/tmp/initramfs.psHn4a/etc/cmdline.d/*.conf: No such file or directory + +Signed-off-by: Thomas Renninger +--- + dracut.sh | 12 ++++++++---- + 1 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index c301138..eab56f5 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1564,10 +1564,14 @@ if ! ( echo $PARMS_TO_STORE > $initdir/lib/dracut/build-parameter.txt ); then + fi + + if [[ $hostonly_cmdline ]] ; then +- dinfo "Stored kernel commandline:" +- for conf in $initdir/etc/cmdline.d/*.conf ; do +- dinfo "$(< $conf)" +- done ++ 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 ***" +-- +1.7.6.1 + diff --git a/0163-Install-etc-sysconfig-console-to-see-specific-fonts.patch b/0163-Install-etc-sysconfig-console-to-see-specific-fonts.patch index 897e09d..4a99e7d 100644 --- a/0163-Install-etc-sysconfig-console-to-see-specific-fonts.patch +++ b/0163-Install-etc-sysconfig-console-to-see-specific-fonts.patch @@ -11,11 +11,11 @@ Signed-off-by: Thomas Renninger modules.d/10i18n/module-setup.sh | 4 ++++ 1 file changed, 4 insertions(+) -Index: dracut-041/modules.d/10i18n/module-setup.sh -=================================================================== ---- dracut-041.orig/modules.d/10i18n/module-setup.sh 2015-01-31 12:54:52.000000000 +0100 -+++ dracut-041/modules.d/10i18n/module-setup.sh 2015-03-24 15:17:34.003778419 +0100 -@@ -219,6 +219,10 @@ +diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh +index a091f89..f7ec0d9 100755 +--- a/modules.d/10i18n/module-setup.sh ++++ b/modules.d/10i18n/module-setup.sh +@@ -221,6 +221,10 @@ install() { print_vars KEYMAP EXT_KEYMAPS UNICODE FONT FONT_MAP FONT_UNIMAP >> ${initdir}${VCONFIG_CONF} fi @@ -26,3 +26,6 @@ Index: dracut-041/modules.d/10i18n/module-setup.sh return 0 } +-- +1.8.4.5 + diff --git a/0164-Fix-initramfs-ver.img-vs-initrd-ver-in-dracut-initra.patch b/0164-Fix-initramfs-ver.img-vs-initrd-ver-in-dracut-initra.patch index 4380545..58b3d2f 100644 --- a/0164-Fix-initramfs-ver.img-vs-initrd-ver-in-dracut-initra.patch +++ b/0164-Fix-initramfs-ver.img-vs-initrd-ver-in-dracut-initra.patch @@ -10,11 +10,11 @@ initramfs. dracut-initramfs-restore.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: dracut-041/dracut-initramfs-restore.sh -=================================================================== ---- dracut-041.orig/dracut-initramfs-restore.sh 2015-01-31 12:54:52.000000000 +0100 -+++ dracut-041/dracut-initramfs-restore.sh 2015-03-24 15:17:38.404025658 +0100 -@@ -17,7 +17,7 @@ +diff --git a/dracut-initramfs-restore.sh b/dracut-initramfs-restore.sh +index 0dd1938..a3b7b1b 100644 +--- a/dracut-initramfs-restore.sh ++++ b/dracut-initramfs-restore.sh +@@ -15,7 +15,7 @@ SKIP="$dracutbasedir/skipcpio" if [[ $MACHINE_ID ]] && [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]] ; then IMG="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd" fi @@ -23,3 +23,6 @@ Index: dracut-041/dracut-initramfs-restore.sh cd /run/initramfs +-- +1.8.4.5 + diff --git a/0165-Order-root-fsck-after-pre-mount.patch b/0165-Order-root-fsck-after-pre-mount.patch index 87ff0da..37d4cc3 100644 --- a/0165-Order-root-fsck-after-pre-mount.patch +++ b/0165-Order-root-fsck-after-pre-mount.patch @@ -1,11 +1,11 @@ From: Andrei Borzenkov Subject: ensure pre-mount (and resume) run before root fsck References: bnc#906592 -Index: dracut-041/modules.d/98systemd/rootfs-generator.sh +Index: dracut-037/modules.d/98systemd/rootfs-generator.sh =================================================================== ---- dracut-041.orig/modules.d/98systemd/rootfs-generator.sh 2015-01-31 12:54:52.000000000 +0100 -+++ dracut-041/modules.d/98systemd/rootfs-generator.sh 2015-03-24 15:17:43.364304355 +0100 -@@ -64,6 +64,23 @@ +--- dracut-037.orig/modules.d/98systemd/rootfs-generator.sh ++++ dracut-037/modules.d/98systemd/rootfs-generator.sh +@@ -66,6 +66,23 @@ generator_mount_rootfs() fi } @@ -29,7 +29,7 @@ Index: dracut-041/modules.d/98systemd/rootfs-generator.sh root=$(getarg root=) case "$root" in block:LABEL=*|LABEL=*) -@@ -92,6 +109,7 @@ +@@ -94,6 +111,7 @@ esac if [ "${root%%:*}" = "block" ]; then generator_wait_for_dev "${root#block:}" "$RDRETRY" diff --git a/0166-load-xhci-pci.patch b/0166-load-xhci-pci.patch new file mode 100644 index 0000000..11c9159 --- /dev/null +++ b/0166-load-xhci-pci.patch @@ -0,0 +1,16 @@ +From: Bernhard M. Wiedemann +Subject: load xhci-pci on Linux-3.18+ to allow USB-keyboard to give LUKS PW +References: bnc#911319 +Index: dracut-037/modules.d/90kernel-modules/module-setup.sh +=================================================================== +--- dracut-037.orig/modules.d/90kernel-modules/module-setup.sh ++++ dracut-037/modules.d/90kernel-modules/module-setup.sh +@@ -41,7 +41,7 @@ installkernel() { + ehci-hcd ehci-pci ehci-platform \ + ohci-hcd ohci-pci \ + uhci-hcd \ +- xhci-hcd ++ xhci-hcd xhci-pci + + 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/0167-do-not-symlink-var-log-to-run-log.patch b/0167-do-not-symlink-var-log-to-run-log.patch new file mode 100644 index 0000000..2817d23 --- /dev/null +++ b/0167-do-not-symlink-var-log-to-run-log.patch @@ -0,0 +1,80 @@ +From 00529cd63e2c82660208bdd07f9ce4db206d560c 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. + +(cherry picked from commit 99d4fd6bb791ca8ce07e07e13b58445f3e20894a) +--- + 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 + +Index: dracut-037/dracut.sh +=================================================================== +--- dracut-037.orig/dracut.sh ++++ dracut-037/dracut.sh +@@ -1286,7 +1286,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 +Index: dracut-037/modules.d/98systemd/dracut-tmpfiles.conf +=================================================================== +--- /dev/null ++++ dracut-037/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 +Index: dracut-037/modules.d/98systemd/module-setup.sh +=================================================================== +--- dracut-037.orig/modules.d/98systemd/module-setup.sh ++++ dracut-037/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 \ +@@ -225,6 +227,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 + { +Index: dracut-037/modules.d/99base/dracut-lib.sh +=================================================================== +--- dracut-037.orig/modules.d/99base/dracut-lib.sh ++++ dracut-037/modules.d/99base/dracut-lib.sh +@@ -8,7 +8,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/0168-remove_plymouth_logo_file.patch b/0168-remove_plymouth_logo_file.patch index 95973fc..35f450d 100644 --- a/0168-remove_plymouth_logo_file.patch +++ b/0168-remove_plymouth_logo_file.patch @@ -1,10 +1,11 @@ -Index: dracut-041/modules.d/50plymouth/plymouth-populate-initrd.sh +Index: dracut-037/modules.d/50plymouth/plymouth-populate-initrd.sh =================================================================== ---- dracut-041.orig/modules.d/50plymouth/plymouth-populate-initrd.sh 2015-01-31 12:54:52.000000000 +0100 -+++ dracut-041/modules.d/50plymouth/plymouth-populate-initrd.sh 2015-03-24 15:17:46.828499010 +0100 -@@ -1,10 +1,8 @@ +--- dracut-037.orig/modules.d/50plymouth/plymouth-populate-initrd.sh ++++ dracut-037/modules.d/50plymouth/plymouth-populate-initrd.sh +@@ -1,11 +1,9 @@ #!/bin/bash - + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh -PLYMOUTH_LOGO_FILE="/usr/share/pixmaps/system-logo-white.png" PLYMOUTH_THEME=$(plymouth-set-default-theme) diff --git a/0169-fix-systemd-vconsole.patch b/0169-fix-systemd-vconsole.patch new file mode 100644 index 0000000..6824c08 --- /dev/null +++ b/0169-fix-systemd-vconsole.patch @@ -0,0 +1,26 @@ +commit 027565d0233f76edf434b63a847a717185d267e2 +Author: Harald Hoyer +Date: Thu Nov 6 10:44:33 2014 +0100 + + systemd: add 90-vconsole.rules + + run systemd-vconsole-setup if fbcon device shows up + +Index: dracut-037/modules.d/98systemd/module-setup.sh +=================================================================== +--- dracut-037.orig/modules.d/98systemd/module-setup.sh ++++ dracut-037/modules.d/98systemd/module-setup.sh +@@ -199,7 +199,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/0170-enable-logitech-hidpp.patch b/0170-enable-logitech-hidpp.patch index 09ea38d..a7901b2 100644 --- a/0170-enable-logitech-hidpp.patch +++ b/0170-enable-logitech-hidpp.patch @@ -1,15 +1,13 @@ -Index: dracut-041/modules.d/90kernel-modules/module-setup.sh +Index: dracut-037/modules.d/90kernel-modules/module-setup.sh =================================================================== ---- dracut-041.orig/modules.d/90kernel-modules/module-setup.sh 2015-03-18 15:28:37.954700132 +0100 -+++ dracut-041/modules.d/90kernel-modules/module-setup.sh 2015-03-18 15:29:06.348300969 +0100 -@@ -43,8 +43,8 @@ +--- dracut-037.orig/modules.d/90kernel-modules/module-setup.sh ++++ dracut-037/modules.d/90kernel-modules/module-setup.sh +@@ -45,7 +45,7 @@ installkernel() { 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 -+ hid-logitech-dj hid-logitech-hidpp hid-microsoft hid-lcpower \ -+ firewire-ohci pcmcia hid-hyperv hv-vmbus hyperv-keyboard +- hid-logitech-dj hid-microsoft firewire-ohci \ ++ hid-logitech-dj hid-logitech-hidpp hid-microsoft firewire-ohci \ + pcmcia usb_storage nvme hid-hyperv hv-vmbus \ + sdhci_acpi - if [[ "$(uname -p)" == arm* ]]; then - # arm specific modules diff --git a/dracut-037.tar.xz b/dracut-037.tar.xz new file mode 100644 index 0000000..205f391 --- /dev/null +++ b/dracut-037.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c4c365c8dabc19b66da2972bbed7b983df520481325b8a37d3f620218620d76 +size 256964 diff --git a/dracut-041.tar.xz b/dracut-041.tar.xz deleted file mode 100644 index d8c07bf..0000000 --- a/dracut-041.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8ece6c2240bf0e9283e5f717b65dfcd6830b3ef7f8d1c01b60014052f1063251 -size 268288 diff --git a/dracut.changes b/dracut.changes index 3f2240a..8ee0d7f 100644 --- a/dracut.changes +++ b/dracut.changes @@ -1,119 +1,3 @@ -------------------------------------------------------------------- -Tue Mar 24 15:37:48 UTC 2015 - trenn@suse.de - -- Update to dracut mainline version 041. - Half of the patches got integrated mainline. - Some others have been merged together when it made sense some have - been left out, but are still in the repository as they need some special - treating and mainline discussion whether/how they get added. These are - also not urgently needed, but are debugging patches. - - I broke the rule here to mention every added/deleted/modified patch as - every patch is touched and every 2nd got removed (mainline integrated). - - I also re-ordered the patches in the PatchXY: area for easier merging them - and get them discussed and posted mainline easier, topic by topic. - -- Patches merged in the git tracking repository: - 0065-95iscsi-Fixup-bnx2i-offload-booting.patch - 0028-95udev-rules-Include-correct-sg3_utils-rules.patch - 0135-lvm-Fix-12819a579900b9691e2-check-for-existance-of-6.patch - 0100-Add-btrfs-rescue-utilities.patch - 0067-95fcoe-check-always-returns-255.patch - 0138-warpclock-Do-not-use-warpclock-module-on-S390-x-hwcl.patch - 0077-90multipath-add-missing-11-dm-mpath.rules-file.patch - 0042-Enhance-suse.conf-example-with-SUSE-specific-setting.patch - 0161-Fix-error-message-when-there-are-no-internal-kernel-.patch - 0111-90mdraid-Remove-line-for-offroot-detection.patch - 0129-Revert-commit-6ecab258710d158a7a6-and-only-do-not-wa.patch - 0041-mkinitd-suse-remove-hostonly-and-hostonly-cmdline.patch - 0030-95iscsi-Autodetect-iSCSI-firmware.patch - 0052-99base-Add-chown-binary.patch - 0105-95iscsi-parse-output-from-iscsiadm-correctly.patch - 0101-Print-stored-dracut-commandline-during-initramfs-bui.patch - 0096-dracut-Fix-error-local-can-only-be-used-in-a-functio.patch - 0043-40network-always-add-network-module.patch - 0035-Introduce-force-drivers-parameter-and-force_drivers-.patch - 0136-Revert-95udev-rules-add-persistent-network-rule.patch - 0143-iscsi-Fix-up-ipv6-in-brackets-iterate-over-all-possi.patch - 0167-do-not-symlink-var-log-to-run-log.patch - 0024-Fixup-mdraid-setup.patch - 0032-mkinitrd-suse.sh-Use-hostonly-and-hostonly-cmdline-c.patch - 0022-95udev-rules-add-persistent-network-rule.patch - 0166-load-xhci-pci.patch - 0047-95resume-skip-module-for-s390-x.patch - 0014-Update-dracut-manpage-for-GRUB-Legacy-and-GRUB2.patch - 0055-95fcoe-Only-install-fcoe-module-if-required.patch - 0078-Restore-original-IFS-value.patch - 0046-dracut-Do-not-wait-for-swap-device.patch - 0074-More-empty-cmdline-fixes.patch - 0112-99base-warn-on-invalid-command-for-initqueue.patch - 0034-dracut-Do-not-stop-installing-drivers-if-one-fails.patch - 0139-dracut.sh-check-for-logfile-logfile-option-and-creat.patch - 0127-99base-Increase-initqueue-timeout-in-non-systemd-cas.patch - 0104-Generate-fallback-mount-unit-for-root-filesystem.patch - 0154-resume-Also-allow-this-module-on-S390-again-s2disk-c.patch - 0149-dracut.sh-Fix-fstab-parsing-again.patch - 0027-90multipath-install-dracut-specific-service-file.patch - 0084-95rootfs-block-Correctly-terminate-commandline-param.patch - dracut_v37_to_HEAD.patch - 0128-90lvm-Install-dm-snapshot-module.patch - 0063-90multipath-Install-libgcc_s-library.patch - 0062-95iscsi-Install-libgcc_s-library.patch - 0146-dracut.sh-corrected-logfile-check.patch - 0071-Fix-non-export-of-journal-dev-boot-options.patch - 0044-Add-find-to-debug-binaries.patch - 0039-Remove-force-parameter-from-mkinitrd.patch - 0026-90multipath-add-67-kpartx-compat.rules.patch - 0099-90multipath-Load-device_handler-modules-early-during.patch - 0029-90multipath-install-correct-multipath-rules.patch - 0031-90multipath-Fixup-service-file-for-booting.patch - 0036-95fcoe-Store-current-configuration-in-dracut-cmdline.patch - A patch (dracut_v041_to_HEAD.patch) is being added without being properly referenced from the changelog. - 0151-Go-back-to-xz-again-pixz-may-use-too-much-memory-whi.patch - 0069-81cio_ignore-skip-module-if-cio_ignore-is-not-active.patch - 0070-81cio_ignore-rewrite-module.patch - 0033-95iscsi-Set-correct-iscsi_started-value-for-iSCSI-fi.patch - 0098-Do-not-call-lvm-for-non-LVM-device-mapper-devices.patch - 0023-systemd-always-tries-to-load-autofs4.patch - 0051-mkinitrd-suse-add-update-bootloader-message.patch - 0013-mkinitrd-suse-do-not-update-bootloader-if-no-kernel-.patch - 0115-Handle-module-alias-properly.patch - 0054-95iscsi-update-commandline-printing.patch - 0148-dracut.sh-Fix-LABEL-and-other-fstab-syntax.patch - 0122-btrfs-btrfs-dump-super-and-btrfs-select-super-do-not.patch - 0045-40network-add-missing-_arch-variable-declaration.patch - 0050-95iscsi-strip-one-set-of-quotes-when-calling-initque.patch - 0152-Add-a-comment-to-easily-add-debug-modules-also-add-v.patch - 0147-dracut.sh-Fix-UUID-fstab-parsing-in-case-mount-optio.patch - 0038-95fcoe-start-lldpad-separately.patch - 0082-00warpclock-check-for-sbin-hwclock.patch - 0155-iscsi-iscsi.initiator-and-others-can-and-must-only-s.patch - 0037-95fcoe-update-fcoe-interface-check.patch - 0141-iscsi-Avoid-bad-ip-route-call-on-empty-address.patch - 0049-95iscsi-Use-ip-ibft-for-ibft-autoconfiguration.patch - 0153-Only-add-network-module-on-request-and-on-dependenci.patch - 0097-Implement-rd.timeout-to-modify-the-device-timeout.patch - 0169-fix-systemd-vconsole.patch - 0073-Don-t-create-lots-of-empty-cmdline-files-for-hostonl.patch - 0103-Fixup-missing-separators-in-rootfs-block-cmdline.patch - 0064-90kernel-modules-install-scsi_dh_alua.patch - 0012-Check-for-plymouth-lib-directories.patch - 0092-dracut-nbd-Only-complain-of-missing-binary-in-hoston.patch - 0160-nfs-Add-ip-.-and-root-nfs.-parameters-to-internal-dr.patch - 0093-95iscsi-generate-commandline-for-software-iscsi.patch - 0040-95fcoe-skip-VLAN-devices-in-fcoe-up.patch - 0156-dracut.usage.asc-Remove-distro-specific-help-from-ma.patch - 0018-mkinitrd-suse-Fix-whitespaces-when-adding-drivers.patch - 0140-dracut.sh-Avoid-duplicate-devices-in-host_devs.patch - 0095-95iscsi-use-static-configuration-for-software-iscsi.patch - 0025-95udev-rules-Add-59-scsi-sg_utils.rules.patch - 0072-Also-export-root-boot-param-for-hostonly-cmdline-cas.patch - 0102-Align-dev_unit_name-with-systemd-s-function.patch - 0001-kernel-modules-Fix-storage-module-selection-for-sdhc.patch - -- Added dracut_v041_to_HEAD.patch: new patch from v041 against our git - ------------------------------------------------------------------- Fri Feb 27 18:37:56 UTC 2015 - sfalken@opensuse.org diff --git a/dracut.spec b/dracut.spec index aebd299..6132ec0 100644 --- a/dracut.spec +++ b/dracut.spec @@ -19,7 +19,7 @@ %define dracutlibdir %{_libexecdir}/dracut Name: dracut -Version: 041 +Version: 037 Release: 0 Summary: Initramfs generator using udev License: GPL-2.0+ and LGPL-2.1+ @@ -30,87 +30,171 @@ Source3: mkinitrd_setup_dummy Source4: purge-kernels Source5: purge-kernels.service Source6: dracut-installkernel -Patch1: dracut_v041_to_HEAD.patch - -# Sent mainline +Patch1: dracut_v37_to_HEAD.patch +Patch2: 0001-kernel-modules-Fix-storage-module-selection-for-sdhc.patch Patch11: 0011-Correct-paths-for-openSUSE.patch -Patch12: 0019-40network-Fix-race-condition-when-wait-for-networks.patch -Patch13: 0066-40network-always-start-netroot-in-ifup.sh.patch -Patch14: 0068-95fcoe-uefi-Test-for-EFI-firmware.patch - -#Network: +Patch12: 0012-Check-for-plymouth-lib-directories.patch +Patch13: 0013-mkinitrd-suse-do-not-update-bootloader-if-no-kernel-.patch +Patch14: 0014-Update-dracut-manpage-for-GRUB-Legacy-and-GRUB2.patch Patch15: 0015-40network-replace-dhclient-with-wickedd-dhcp-supplic.patch +Patch16: 0016-Add-new-s390x-specific-rule-files.patch Patch17: 0017-45ifcfg-use-distro-specific-scripts.patch +Patch18: 0018-mkinitrd-suse-Fix-whitespaces-when-adding-drivers.patch +Patch19: 0019-40network-Fix-race-condition-when-wait-for-networks.patch +Patch20: 0020-00warpclock-Set-correct-timezone.patch +Patch21: 0021-95dcssblk-Add-new-module-for-DCSS-block-devices.patch +Patch22: 0022-95udev-rules-add-persistent-network-rule.patch +Patch23: 0023-systemd-always-tries-to-load-autofs4.patch +Patch24: 0024-Fixup-mdraid-setup.patch +Patch25: 0025-95udev-rules-Add-59-scsi-sg_utils.rules.patch +Patch26: 0026-90multipath-add-67-kpartx-compat.rules.patch +Patch27: 0027-90multipath-install-dracut-specific-service-file.patch +Patch28: 0028-95udev-rules-Include-correct-sg3_utils-rules.patch +Patch29: 0029-90multipath-install-correct-multipath-rules.patch +Patch30: 0030-95iscsi-Autodetect-iSCSI-firmware.patch +Patch31: 0031-90multipath-Fixup-service-file-for-booting.patch +Patch32: 0032-mkinitrd-suse.sh-Use-hostonly-and-hostonly-cmdline-c.patch +Patch33: 0033-95iscsi-Set-correct-iscsi_started-value-for-iSCSI-fi.patch +Patch34: 0034-dracut-Do-not-stop-installing-drivers-if-one-fails.patch +Patch35: 0035-Introduce-force-drivers-parameter-and-force_drivers-.patch +Patch36: 0036-95fcoe-Store-current-configuration-in-dracut-cmdline.patch +Patch37: 0037-95fcoe-update-fcoe-interface-check.patch +Patch38: 0038-95fcoe-start-lldpad-separately.patch +Patch39: 0039-Remove-force-parameter-from-mkinitrd.patch +Patch40: 0040-95fcoe-skip-VLAN-devices-in-fcoe-up.patch +Patch41: 0041-mkinitd-suse-remove-hostonly-and-hostonly-cmdline.patch +Patch42: 0042-Enhance-suse.conf-example-with-SUSE-specific-setting.patch +Patch43: 0043-40network-always-add-network-module.patch +Patch44: 0044-Add-find-to-debug-binaries.patch +Patch45: 0045-40network-add-missing-_arch-variable-declaration.patch +Patch46: 0046-dracut-Do-not-wait-for-swap-device.patch +Patch47: 0047-95resume-skip-module-for-s390-x.patch Patch48: 0048-40network-Only-enable-network-interfaces-if-explicit.patch +Patch49: 0049-95iscsi-Use-ip-ibft-for-ibft-autoconfiguration.patch +Patch50: 0050-95iscsi-strip-one-set-of-quotes-when-calling-initque.patch +Patch51: 0051-mkinitrd-suse-add-update-bootloader-message.patch +Patch52: 0052-99base-Add-chown-binary.patch +Patch53: 0053-01fips-fixup-loading-issues.patch +Patch54: 0054-95iscsi-update-commandline-printing.patch +Patch55: 0055-95fcoe-Only-install-fcoe-module-if-required.patch +Patch56: 0056-81cio_ignore-handle-cio_ignore-commandline.patch +Patch57: 0057-01fips-Include-some-more-hmacs.patch +Patch58: 0058-dracut-add-warning-when-including-unsupported-module.patch +Patch59: 0059-99suse-Add-SUSE-specific-initrd-parsing.patch Patch60: 0060-45ifcfg-Add-SUSE-specific-write-ifcfg-file.patch Patch61: 0061-45ifcfg-Fixup-error-message-in-write-ifcfg-suse.patch -Patch89: 0089-40network-create-var-lib-wicked-in-ifup.sh.patch -Patch94: 0094-Implement-shortcut-ip-ifname-static-for-static-confi.patch -Patch124: 0124-40network-Update-iBFT-scanning-code-to-handle-IPv6.patch -Patch125: 0125-40network-separate-mask-and-prefix.patch -Patch131: 0131-40network-handle-prefixed-IP-addresses-correctly.patch -Patch132: 0132-40network-fixup-static-network-configuration.patch -Patch142: 0142-40network-Don-t-report-error-for-etc-sysconfig-netwo.patch -Patch159: 0159-network-Try-to-load-xennet.patch - -#S390 -Patch16: 0016-Add-new-s390x-specific-rule-files.patch -Patch21: 0021-95dcssblk-Add-new-module-for-DCSS-block-devices.patch -Patch56: 0056-81cio_ignore-handle-cio_ignore-commandline.patch +Patch62: 0062-95iscsi-Install-libgcc_s-library.patch +Patch63: 0063-90multipath-Install-libgcc_s-library.patch +Patch64: 0064-90kernel-modules-install-scsi_dh_alua.patch +Patch65: 0065-95iscsi-Fixup-bnx2i-offload-booting.patch +Patch66: 0066-40network-always-start-netroot-in-ifup.sh.patch +Patch67: 0067-95fcoe-check-always-returns-255.patch +Patch68: 0068-95fcoe-uefi-Test-for-EFI-firmware.patch +Patch69: 0069-81cio_ignore-skip-module-if-cio_ignore-is-not-active.patch +Patch70: 0070-81cio_ignore-rewrite-module.patch +Patch71: 0071-Fix-non-export-of-journal-dev-boot-options.patch +Patch72: 0072-Also-export-root-boot-param-for-hostonly-cmdline-cas.patch +Patch73: 0073-Don-t-create-lots-of-empty-cmdline-files-for-hostonl.patch +Patch74: 0074-More-empty-cmdline-fixes.patch Patch75: 0075-95dasd_rules-enable-parsing-of-rd.dasd-commandline-p.patch Patch76: 0076-Correctly-set-cio_ignore-for-dynamic-s390-rules.patch +Patch77: 0077-90multipath-add-missing-11-dm-mpath.rules-file.patch +Patch78: 0078-Restore-original-IFS-value.patch Patch79: 0079-95dasd_rules-fixup-rd.dasd-parsing.patch Patch80: 0080-95dasd_rules-print-out-rd.dasd-commandline.patch Patch81: 0081-95dasd_mod-do-not-set-module-parameters-if-dasd_cio_.patch +Patch82: 0082-00warpclock-check-for-sbin-hwclock.patch Patch83: 0083-95zfcp_rules-Fixup-rd.zfcp-parsing.patch +Patch84: 0084-95rootfs-block-Correctly-terminate-commandline-param.patch Patch85: 0085-95zfcp_rules-print-out-rd.zfcp-commandline-parameter.patch Patch86: 0086-95zfcp_rules-Auto-generate-udev-rule-for-ipl-device.patch Patch87: 0087-95dasd_rules-Auto-generate-udev-rule-for-ipl-device.patch Patch88: 0088-91zipl-Add-new-module-to-update-s390x-configuration.patch +Patch89: 0089-40network-create-var-lib-wicked-in-ifup.sh.patch +Patch90: 0090-dracut-caps-Remove-whole-caps-module.patch +Patch91: 0091-dracut-biosdevname-In-SUSE-biosdevname-package-is-in.patch +Patch92: 0092-dracut-nbd-Only-complain-of-missing-binary-in-hoston.patch +Patch93: 0093-95iscsi-generate-commandline-for-software-iscsi.patch +Patch94: 0094-Implement-shortcut-ip-ifname-static-for-static-confi.patch +Patch95: 0095-95iscsi-use-static-configuration-for-software-iscsi.patch +Patch96: 0096-dracut-Fix-error-local-can-only-be-used-in-a-functio.patch +Patch97: 0097-Implement-rd.timeout-to-modify-the-device-timeout.patch +Patch98: 0098-Do-not-call-lvm-for-non-LVM-device-mapper-devices.patch +Patch99: 0099-90multipath-Load-device_handler-modules-early-during.patch +Patch100: 0100-Add-btrfs-rescue-utilities.patch +Patch101: 0101-Print-stored-dracut-commandline-during-initramfs-bui.patch +Patch102: 0102-Align-dev_unit_name-with-systemd-s-function.patch +Patch103: 0103-Fixup-missing-separators-in-rootfs-block-cmdline.patch +Patch104: 0104-Generate-fallback-mount-unit-for-root-filesystem.patch +Patch105: 0105-95iscsi-parse-output-from-iscsiadm-correctly.patch +Patch106: 0106-dracut-Enable-converting-of-directory-var-run-var-lo.patch Patch107: 0107-Fixup-typo-firmare-instead-of-firmware.patch Patch108: 0108-91zipl-Store-commandline-correctly.patch Patch109: 0109-95dasd_rules-Store-all-devices-in-commandline.patch Patch110: 0110-95zfcp_rules-Store-all-devices-in-commandline.patch +Patch111: 0111-90mdraid-Remove-line-for-offroot-detection.patch +Patch112: 0112-99base-warn-on-invalid-command-for-initqueue.patch Patch113: 0113-91zipl-Install-script-as-executable.patch Patch114: 0114-91zipl-Translate-ext2-3-into-ext4.patch +Patch115: 0115-Handle-module-alias-properly.patch +Patch116: 0116-Mark-scripts-as-executable.patch Patch117: 0117-95dasd_rules-Enable-the-device-before-checking-devic.patch Patch118: 0118-95zfcp_rules-Enable-the-device-before-checking-devic.patch -Patch123: 0123-95zfcp_rules-fix-typo-in-module_setup.patch -Patch157: 0157-Add-boot-zipl-to-host-devs-if-it-is-a-mount-point.patch - -#FIPS -Patch53: 0053-01fips-fixup-loading-issues.patch -Patch57: 0057-01fips-Include-some-more-hmacs.patch -Patch116: 0116-Mark-scripts-as-executable.patch -Patch126: 0126-01fips-Add-drbg-module-to-force-loaded-modules.patch -Patch137: 0137-Switch-from-Mozilla-NSS-sha256hmac-checking-to-fipsc.patch - -# Others -Patch20: 0020-00warpclock-Set-correct-timezone.patch -Patch58: 0058-dracut-add-warning-when-including-unsupported-module.patch -Patch59: 0059-99suse-Add-SUSE-specific-initrd-parsing.patch -Patch90: 0090-dracut-caps-Remove-whole-caps-module.patch -Patch91: 0091-dracut-biosdevname-In-SUSE-biosdevname-package-is-in.patch -Patch106: 0106-dracut-Enable-converting-of-directory-var-run-var-lo.patch Patch119: 0119-Reset-IFS-variable.patch Patch120: 0120-mkinitrd-suse.sh-Bail-out-with-exit-1-if-initrd-cann.patch Patch121: 0121-Adjust-initramfs-kernel.img-to-SUSE-default-initrd-k.patch +Patch122: 0122-btrfs-btrfs-dump-super-and-btrfs-select-super-do-not.patch +Patch123: 0123-95zfcp_rules-fix-typo-in-module_setup.patch +Patch124: 0124-40network-Update-iBFT-scanning-code-to-handle-IPv6.patch +Patch125: 0125-40network-separate-mask-and-prefix.patch +Patch126: 0126-01fips-Add-drbg-module-to-force-loaded-modules.patch +Patch127: 0127-99base-Increase-initqueue-timeout-in-non-systemd-cas.patch +Patch128: 0128-90lvm-Install-dm-snapshot-module.patch +Patch129: 0129-Revert-commit-6ecab258710d158a7a6-and-only-do-not-wa.patch Patch130: 0130-nfs-Always-add-all-kernel-modules-for-kdump.patch +Patch131: 0131-40network-handle-prefixed-IP-addresses-correctly.patch +Patch132: 0132-40network-fixup-static-network-configuration.patch +Patch133: 0133-Allow-multiple-configurations-per-network-interface-.patch +Patch134: 0134-Remove-bootdev-warning-bnc-881112.patch +Patch135: 0135-lvm-Fix-12819a579900b9691e2-check-for-existance-of-6.patch +Patch136: 0136-Revert-95udev-rules-add-persistent-network-rule.patch +Patch137: 0137-Switch-from-Mozilla-NSS-sha256hmac-checking-to-fipsc.patch +Patch138: 0138-warpclock-Do-not-use-warpclock-module-on-S390-x-hwcl.patch +Patch139: 0139-dracut.sh-check-for-logfile-logfile-option-and-creat.patch +Patch140: 0140-dracut.sh-Avoid-duplicate-devices-in-host_devs.patch +Patch141: 0141-iscsi-Avoid-bad-ip-route-call-on-empty-address.patch +Patch142: 0142-40network-Don-t-report-error-for-etc-sysconfig-netwo.patch +Patch143: 0143-iscsi-Fix-up-ipv6-in-brackets-iterate-over-all-possi.patch Patch144: 0144-90crypt-Fixed-crypttab_contains-to-also-work-with-de.patch +Patch145: 0145-40network-handle-ip-ifname-static-correctly.patch +Patch146: 0146-dracut.sh-corrected-logfile-check.patch +Patch147: 0147-dracut.sh-Fix-UUID-fstab-parsing-in-case-mount-optio.patch +Patch148: 0148-dracut.sh-Fix-LABEL-and-other-fstab-syntax.patch +Patch149: 0149-dracut.sh-Fix-fstab-parsing-again.patch Patch150: 0150-Find-kernel-modules-in-extra-and-weak-updates-path-a.patch +Patch151: 0151-Go-back-to-xz-again-pixz-may-use-too-much-memory-whi.patch +Patch152: 0152-Add-a-comment-to-easily-add-debug-modules-also-add-v.patch +Patch153: 0153-Only-add-network-module-on-request-and-on-dependenci.patch +Patch154: 0154-resume-Also-allow-this-module-on-S390-again-s2disk-c.patch +Patch155: 0155-iscsi-iscsi.initiator-and-others-can-and-must-only-s.patch +Patch156: 0156-dracut.usage.asc-Remove-distro-specific-help-from-ma.patch +Patch157: 0157-Add-boot-zipl-to-host-devs-if-it-is-a-mount-point.patch Patch158: 0158-Add-SUSE-kernel-module-dependencies-in-etc-modprobe..patch +Patch159: 0159-network-Try-to-load-xennet.patch +Patch160: 0160-nfs-Add-ip-.-and-root-nfs.-parameters-to-internal-dr.patch +Patch161: 0161-Fix-error-message-when-there-are-no-internal-kernel-.patch +Patch162: 0162-network-Request-DHCP-lease-instead-of-getting-applyi.patch Patch163: 0163-Install-etc-sysconfig-console-to-see-specific-fonts.patch Patch164: 0164-Fix-initramfs-ver.img-vs-initrd-ver-in-dracut-initra.patch Patch165: 0165-Order-root-fsck-after-pre-mount.patch +Patch166: 0166-load-xhci-pci.patch +Patch167: 0167-do-not-symlink-var-log-to-run-log.patch +# PATCH-FIX-OPENSUSE sfalken@opensuse.com -- remove PLYMOUTH_LOGO_FILE from modules.d/50plymouth/plymouth-populate-initrd.sh (bnc#910952) Patch168: 0168-remove_plymouth_logo_file.patch +Patch169: 0169-fix-systemd-vconsole.patch +# PATCH-FIX-UPSTREAM sfalken@opensuse.com -- Add logitech-hidpp module to default initrd, fixes (boo#918938) Patch170: 0170-enable-logitech-hidpp.patch -# Still needed -Patch133: 0133-Allow-multiple-configurations-per-network-interface-.patch -Patch134: 0134-Remove-bootdev-warning-bnc-881112.patch -Patch145: 0145-40network-handle-ip-ifname-static-correctly.patch -Patch162: 0162-network-Request-DHCP-lease-instead-of-getting-applyi.patch - BuildRequires: asciidoc BuildRequires: bash BuildRequires: docbook-xsl-stylesheets @@ -164,6 +248,7 @@ and its cryptography during startup. %prep %setup -q %patch1 -p1 +%patch2 -p1 %patch11 -p1 %patch12 -p1 %patch13 -p1 @@ -171,22 +256,73 @@ and its cryptography during startup. %patch15 -p1 %patch16 -p1 %patch17 -p1 +%patch18 -p1 +%patch19 -p1 %patch20 -p1 %patch21 -p1 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 +%patch26 -p1 +%patch27 -p1 +%patch28 -p1 +%patch29 -p1 +%patch30 -p1 +%patch31 -p1 +%patch32 -p1 +%patch33 -p1 +%patch34 -p1 +%patch35 -p1 +%patch36 -p1 +%patch37 -p1 +%patch38 -p1 +%patch39 -p1 +%patch40 -p1 +%patch41 -p1 +%patch42 -p1 +%patch43 -p1 +%patch44 -p1 +%patch45 -p1 +%patch46 -p1 +%patch47 -p1 %patch48 -p1 +%patch49 -p1 +%patch50 -p1 +%patch51 -p1 +%patch52 -p1 %patch53 -p1 +%patch54 -p1 +%patch55 -p1 %patch56 -p1 %patch57 -p1 %patch58 -p1 %patch59 -p1 %patch60 -p1 %patch61 -p1 +%patch62 -p1 +%patch63 -p1 +%patch64 -p1 +%patch65 -p1 +%patch66 -p1 +%patch67 -p1 +%patch68 -p1 +%patch69 -p1 +%patch70 -p1 +%patch71 -p1 +%patch72 -p1 +%patch73 -p1 +%patch74 -p1 %patch75 -p1 %patch76 -p1 +%patch77 -p1 +%patch78 -p1 %patch79 -p1 %patch80 -p1 %patch81 -p1 +%patch82 -p1 %patch83 -p1 +%patch84 -p1 %patch85 -p1 %patch86 -p1 %patch87 -p1 @@ -194,45 +330,84 @@ and its cryptography during startup. %patch89 -p1 %patch90 -p1 %patch91 -p1 +%patch92 -p1 +%patch93 -p1 %patch94 -p1 +%patch95 -p1 +%patch96 -p1 +%patch97 -p1 +%patch98 -p1 +%patch99 -p1 +%patch100 -p1 +%patch101 -p1 +%patch102 -p1 +%patch103 -p1 +%patch104 -p1 +%patch105 -p1 %patch106 -p1 %patch107 -p1 %patch108 -p1 %patch109 -p1 %patch110 -p1 +%patch111 -p1 +%patch112 -p1 %patch113 -p1 %patch114 -p1 +%patch115 -p1 %patch116 -p1 %patch117 -p1 %patch118 -p1 %patch119 -p1 %patch120 -p1 %patch121 -p1 +%patch122 -p1 %patch123 -p1 %patch124 -p1 %patch125 -p1 %patch126 -p1 +%patch127 -p1 +%patch128 -p1 +%patch129 -p1 %patch130 -p1 %patch131 -p1 %patch132 -p1 - -# Still needed! -#%patch133 -p1 -#%patch134 -p1 -#%patch145 -p1 -#%patch162 -p1 - +%patch133 -p1 +%patch134 -p1 +%patch135 -p1 +%patch136 -p1 %patch137 -p1 +%patch138 -p1 +%patch139 -p1 +%patch140 -p1 +%patch141 -p1 %patch142 -p1 +%patch143 -p1 %patch144 -p1 +%patch145 -p1 +%patch146 -p1 +%patch147 -p1 +%patch148 -p1 +%patch149 -p1 %patch150 -p1 +%patch151 -p1 +%patch152 -p1 +%patch153 -p1 +%patch154 -p1 +%patch155 -p1 +%patch156 -p1 %patch157 -p1 %patch158 -p1 %patch159 -p1 +%patch160 -p1 +%patch161 -p1 +%patch162 -p1 %patch163 -p1 %patch164 -p1 %patch165 -p1 +%patch166 -p1 +%patch167 -p1 %patch168 -p1 +%patch169 -p1 %patch170 -p1 %build diff --git a/dracut_v041_to_HEAD.patch b/dracut_v041_to_HEAD.patch deleted file mode 100644 index 1468f51..0000000 --- a/dracut_v041_to_HEAD.patch +++ /dev/null @@ -1,316 +0,0 @@ -diff --git a/50-dracut.install b/50-dracut.install -index 5ac74f1..d05abb9 100755 ---- a/50-dracut.install -+++ b/50-dracut.install -@@ -20,6 +20,8 @@ case "$COMMAND" in - - if [[ -f /etc/kernel/cmdline ]]; then - readarray -t BOOT_OPTIONS < /etc/kernel/cmdline -+ elif [[ -f /usr/lib/kernel/cmdline ]]; then -+ readarray -t BOOT_OPTIONS < /usr/lib/kernel/cmdline - fi - - if ! [[ "${BOOT_OPTIONS[@]}" ]]; then -diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install -index 9fb0c5d..9abd9d7 100755 ---- a/51-dracut-rescue.install -+++ b/51-dracut-rescue.install -@@ -41,6 +41,8 @@ fi - - if [[ -f /etc/kernel/cmdline ]]; then - readarray -t BOOT_OPTIONS < /etc/kernel/cmdline -+elif [[ -f /usr/lib/kernel/cmdline ]]; then -+ readarray -t BOOT_OPTIONS < /usr/lib/kernel/cmdline - fi - if ! [[ "${BOOT_OPTIONS[@]}" ]]; then - read -ar BOOT_OPTIONS < /proc/cmdline -diff --git a/dracut.8.asc b/dracut.8.asc -index 7d11f43..9aecbfb 100644 ---- a/dracut.8.asc -+++ b/dracut.8.asc -@@ -31,7 +31,7 @@ early userspace. - For a complete list of kernel command line options see *dracut.cmdline*(7). - - If you are dropped to an emergency shell, while booting your initramfs, --the file _/run/initramfs/rdsosreport.txt_ is created, which can be safed to a -+the file _/run/initramfs/rdsosreport.txt_ is created, which can be saved to a - (to be mounted by hand) partition (usually /boot) or a USB stick. - Additional debugging info can be produced by adding **rd.debug** to the kernel - command line. _/run/initramfs/rdsosreport.txt_ contains all logs and the output -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index 5ff84ef..e51fd1b 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -163,7 +163,7 @@ Misc - Debug - ~~~~~ - If you are dropped to an emergency shell, the file --_/run/initramfs/rdsosreport.txt_ is created, which can be safed to a (to be -+_/run/initramfs/rdsosreport.txt_ is created, which can be saved to a (to be - mounted by hand) partition (usually /boot) or a USB stick. Additional debugging - info can be produced by adding **rd.debug** to the kernel command line. - _/run/initramfs/rdsosreport.txt_ contains all logs and the output of some tools. -@@ -834,11 +834,27 @@ Enables debug output from the live boot process. - Specifies the directory within the squashfs where the ext3fs.img or rootfs.img - can be found. By default, this is __LiveOS__. - -+**rd.live.ram=**1:: -+Copy the complete image to RAM and use this for booting. This is useful -+when the image resides on i.e. a DVD which needs to be ejected later on. -+ -+**rd.live.overlay.thin=**1:: -+Enables the usage of thin snapshots instead of classic dm snapshots. -+The advantage of thin snapshots is, that they support discards, and will free -+blocks which are not claimed by the filesystem. In this use case this means, -+that memory is given back to the kernel, when the filesystem does not claim it -+anymore. -+ - **rd.writable.fsimg=**1:: - Enables writable filesystem support. The system will boot with a fully - writable filesystem without snapshots __(see notes above about available live boot options)__. - You can use the **rootflags** option to set mount options for the live - filesystem as well __(see documentation about rootflags in the **Standard** section above)__. -+This implies that the whole image is copied to RAM before the boot continues. -++ -+NOTE: There must be enough free RAM available to hold the complete image. -++ -+This method is very suitable for diskless boots. - - - Plymouth Boot Splash -diff --git a/dracut.conf.d/fedora.conf.example b/dracut.conf.d/fedora.conf.example -index b6c769c..b126b09 100644 ---- a/dracut.conf.d/fedora.conf.example -+++ b/dracut.conf.d/fedora.conf.example -@@ -15,4 +15,5 @@ systemdsystemunitdir=/usr/lib/systemd/system - systemdsystemconfdir=/etc/systemd/system - udevdir=/usr/lib/udev - hostonly="yes" -+hostonly_cmdline="no" - early_microcode="yes" -diff --git a/dracut.sh b/dracut.sh -index 5e2feba..17bf8f2 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/bash --norc - # - # Generator script for a dracut initramfs - # Tries to retain some degree of compatibility with the command line -diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh -index d232d58..aacbc95 100755 ---- a/modules.d/01fips/module-setup.sh -+++ b/modules.d/01fips/module-setup.sh -@@ -14,7 +14,7 @@ depends() { - installkernel() { - local _fipsmodules _mod - _fipsmodules="aead aes_generic aes-x86_64 ansi_cprng arc4 blowfish camellia cast6 cbc ccm " -- _fipsmodules+="chainiv crc32c crct10dif_generic cryptomgr crypto_null ctr cts deflate des des3_ede dm-crypt dm-mod " -+ _fipsmodules+="chainiv crc32c crct10dif_generic cryptomgr crypto_null ctr cts deflate des des3_ede dm-crypt dm-mod drbg " - _fipsmodules+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 " - _fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic " - _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib" -diff --git a/modules.d/90dm/dm-shutdown.sh b/modules.d/90dm/dm-shutdown.sh -index dfdb48b..04c89be 100755 ---- a/modules.d/90dm/dm-shutdown.sh -+++ b/modules.d/90dm/dm-shutdown.sh -@@ -1,11 +1,12 @@ - #!/bin/sh - - _do_dm_shutdown() { -- local ret -+ local ret=0 - local final=$1 - info "Disassembling device-mapper devices" -- dmsetup -v remove_all -- ret=$? -+ for dev in $(dmsetup info -c --noheadings -o name) ; do -+ dmsetup -v --noudevsync remove "$dev" || ret=$? -+ done - if [ "x$final" != "x" ]; then - info "dmsetup ls --tree" - dmsetup ls --tree 2>&1 | vinfo -diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh -index 9c08e94..b632f6a 100755 ---- a/modules.d/90dmsquash-live/dmsquash-live-root.sh -+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh -@@ -30,6 +30,8 @@ getargbool 0 rd.writable.fsimg -d -y writable_fsimg && writable_fsimg="yes" - overlay_size=$(getarg rd.live.overlay.size=) - [ -z "$overlay_size" ] && overlay_size=512 - -+getargbool 0 rd.live.overlay.thin && thin_snapshot="yes" -+ - # CD/DVD media check - [ -b $livedev ] && fs=$(blkid -s TYPE -o value $livedev) - if [ "$fs" = "iso9660" -o "$fs" = "udf" ]; then -@@ -146,7 +148,31 @@ do_live_overlay() { - base=$BASE_LOOPDEV - over=$OVERLAY_LOOPDEV - fi -- echo 0 $sz snapshot $base $over p 8 | dmsetup create live-rw -+ -+ if [ -n "$thin_snapshot" ]; then -+ modprobe dm_thin_pool -+ mkdir /run/initramfs/thin-overlay -+ -+ # In block units (512b) -+ thin_data_sz=$(( $overlay_size * 1024 * 1024 / 512 )) -+ thin_meta_sz=$(( $thin_data_sz / 10 )) -+ -+ # It is important to have the backing file on a tmpfs -+ # this is needed to let the loopdevice support TRIM -+ dd if=/dev/null of=/run/initramfs/thin-overlay/meta bs=1b count=1 seek=$((thin_meta_sz)) 2> /dev/null -+ dd if=/dev/null of=/run/initramfs/thin-overlay/data bs=1b count=1 seek=$((thin_data_sz)) 2> /dev/null -+ -+ THIN_META_LOOPDEV=$( losetup --show -f /run/initramfs/thin-overlay/meta ) -+ THIN_DATA_LOOPDEV=$( losetup --show -f /run/initramfs/thin-overlay/data ) -+ -+ echo 0 $thin_data_sz thin-pool $THIN_META_LOOPDEV $THIN_DATA_LOOPDEV 1024 1024 | dmsetup create live-overlay-pool -+ dmsetup message /dev/mapper/live-overlay-pool 0 "create_thin 0" -+ -+ # Create a snapshot of the base image -+ echo 0 $sz thin /dev/mapper/live-overlay-pool 0 $base | dmsetup create live-rw -+ else -+ echo 0 $sz snapshot $base $over p 8 | dmsetup create live-rw -+ fi - - # Create a device that always points to a ro base image - echo 0 $sz linear $base 0 | dmsetup create --readonly live-base -@@ -174,29 +200,6 @@ if [ -n "$OSMINSQFS" ]; then - umount -l /run/initramfs/squashfs.osmin - fi - --# we might have an embedded fs image to use as rootfs (uncompressed live) --if [ -e /run/initramfs/live/${live_dir}/ext3fs.img ]; then -- FSIMG="/run/initramfs/live/${live_dir}/ext3fs.img" --elif [ -e /run/initramfs/live/${live_dir}/rootfs.img ]; then -- FSIMG="/run/initramfs/live/${live_dir}/rootfs.img" --fi -- --if [ -n "$FSIMG" ] ; then -- BASE_LOOPDEV=$( losetup -f ) -- -- if [ -n "$writable_fsimg" ] ; then -- # mount the provided fileysstem read/write -- echo "Unpacking live filesystem (may take some time)" -- 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 -- losetup -r $BASE_LOOPDEV $FSIMG -- do_live_from_base_loop -- fi --fi -- - # we might have an embedded fs image on squashfs (compressed live) - if [ -e /run/initramfs/live/${live_dir}/${squash_image} ]; then - SQUASHED="/run/initramfs/live/${live_dir}/${squash_image}" -@@ -217,18 +220,42 @@ if [ -e "$SQUASHED" ] ; then - mkdir -m 0755 -p /run/initramfs/squashfs - mount -n -t squashfs -o ro $SQUASHED_LOOPDEV /run/initramfs/squashfs - -- BASE_LOOPDEV=$( losetup -f ) -- if [ -f /run/initramfs/squashfs/LiveOS/ext3fs.img ]; then -- losetup -r $BASE_LOOPDEV /run/initramfs/squashfs/LiveOS/ext3fs.img -- elif [ -f /run/initramfs/squashfs/LiveOS/rootfs.img ]; then -- losetup -r $BASE_LOOPDEV /run/initramfs/squashfs/LiveOS/rootfs.img -- fi -+fi -+ -+# we might have an embedded fs image to use as rootfs (uncompressed live) -+if [ -e /run/initramfs/live/${live_dir}/ext3fs.img ]; then -+ FSIMG="/run/initramfs/live/${live_dir}/ext3fs.img" -+elif [ -e /run/initramfs/live/${live_dir}/rootfs.img ]; then -+ FSIMG="/run/initramfs/live/${live_dir}/rootfs.img" -+elif [ -f /run/initramfs/squashfs/LiveOS/ext3fs.img ]; then -+ FSIMG="/run/initramfs/squashfs/LiveOS/ext3fs.img" -+elif [ -f /run/initramfs/squashfs/LiveOS/rootfs.img ]; then -+ FSIMG="/run/initramfs/squashfs/LiveOS/rootfs.img" -+fi - -- umount -l /run/initramfs/squashfs -+if [ -n "$FSIMG" ] ; then -+ BASE_LOOPDEV=$( losetup -f ) - -- do_live_from_base_loop -+ if [ -n "$writable_fsimg" ] ; then -+ # mount the provided fileysstem read/write -+ echo "Unpacking live filesystem (may take some time)" -+ mkdir /run/initramfs/fsimg/ -+ if [ -n "$SQUASHED" ]; then -+ cp -v $FSIMG /run/initramfs/fsimg/rootfs.img -+ else -+ unpack_archive $FSIMG /run/initramfs/fsimg/ -+ fi -+ 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 -+ losetup -r $BASE_LOOPDEV $FSIMG -+ do_live_from_base_loop -+ fi - fi - -+[ -e "$SQUASHED" ] && umount -l /run/initramfs/squashfs -+ - if [ -b "$OSMIN_LOOPDEV" ]; then - # set up the devicemapper snapshot device, which will merge - # the normal live fs image, and the delta, into a minimzied fs image -diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh -index c799a1c..8269078 100755 ---- a/modules.d/90lvm/module-setup.sh -+++ b/modules.d/90lvm/module-setup.sh -@@ -67,6 +67,20 @@ install() { - sed -i -e 's/\(^[[:space:]]*\)locking_type[[:space:]]*=[[:space:]]*[[:digit:]]/\1locking_type = 4/' ${initdir}/etc/lvm/lvm.conf - sed -i -e 's/\(^[[:space:]]*\)use_lvmetad[[:space:]]*=[[:space:]]*[[:digit:]]/\1use_lvmetad = 0/' ${initdir}/etc/lvm/lvm.conf - fi -+ -+ export LVM_SUPPRESS_FD_WARNINGS=1 -+ # Also install any files needed for LVM system id support. -+ if [ -f /etc/lvm/lvmlocal.conf ]; then -+ inst_simple -H /etc/lvm/lvmlocal.conf -+ fi -+ eval $(lvm dumpconfig global/system_id_source) -+ if [ "$system_id_source" == "file" ]; then -+ eval $(lvm dumpconfig global/system_id_file) -+ if [ -f "$system_id_file" ]; then -+ inst_simple -H $system_id_file -+ fi -+ fi -+ unset LVM_SUPPRESS_FD_WARNINGS - fi - - if ! [[ -e ${initdir}/etc/lvm/lvm.conf ]]; then -diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh -index 51ea288..761349f 100755 ---- a/modules.d/98systemd/module-setup.sh -+++ b/modules.d/98systemd/module-setup.sh -@@ -176,7 +176,11 @@ install() { - # install adm user/group for journald - inst_multiple nologin - egrep '^systemd-journal:' "$initdir/etc/passwd" 2>/dev/null >> "$initdir/etc/passwd" -+ egrep '^wheel:' "$initdir/etc/passwd" 2>/dev/null >> "$initdir/etc/passwd" -+ egrep '^adm:' "$initdir/etc/passwd" 2>/dev/null >> "$initdir/etc/passwd" - egrep '^systemd-journal:' /etc/group >> "$initdir/etc/group" -+ egrep '^wheel:' /etc/group >> "$initdir/etc/group" -+ egrep '^adm:' /etc/group >> "$initdir/etc/group" - - ln_r $systemdutildir/systemd "/init" - ln_r $systemdutildir/systemd "/sbin/init" -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index 5c1504f..079c9a2 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -1286,8 +1286,8 @@ show_memstats() - remove_hostonly_files() { - rm -fr /etc/cmdline /etc/cmdline.d/*.conf - if [ -f /lib/dracut/hostonly-files ]; then -- while read line; do -- [ -e "$line" ] || continue -+ while read -r line; do -+ [ -e "$line" ] || [ -h "$line" ] || continue - rm -f "$line" - done < /lib/dracut/hostonly-files - fi diff --git a/dracut_v37_to_HEAD.patch b/dracut_v37_to_HEAD.patch new file mode 100644 index 0000000..9a4bb25 --- /dev/null +++ b/dracut_v37_to_HEAD.patch @@ -0,0 +1,924 @@ +HEAD is: +commit 0fa5dbedc5b222435f51f7460a81232ee120c4e1 +Date: Tue May 20 13:23:43 2014 +0200 + + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 391b549..ac22b7e 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -33,7 +33,11 @@ if [[ $initdir ]] && ! [[ -d $initdir ]]; then + fi + + # Generic substring function. If $2 is in $1, return 0. +-strstr() { [[ $1 = *$2* ]]; } ++strstr() { [[ $1 = *"$2"* ]]; } ++# Generic glob matching function. If glob pattern $2 matches anywhere in $1, OK ++strglobin() { [[ $1 = *$2* ]]; } ++# Generic glob matching function. If glob pattern $2 matches all of $1, OK ++strglob() { [[ $1 = $2 ]]; } + + # helper function for check() in module-setup.sh + # to check for required installed binaries +@@ -49,7 +53,7 @@ require_binaries() { + + for cmd in "$@"; do + if ! find_binary "$cmd" &>/dev/null; then +- dinfo "$_module_name: Could not find command '$cmd'!" ++ dinfo "dracut module '${_module_name#[0-9][0-9]}' will not be installed, because command '$cmd' could not be found!" + ((_ret++)) + fi + done +@@ -221,7 +225,7 @@ print_vars() { + + for _var in "$@" + do +- eval printf -v _value "%s" "\$$_var" ++ eval printf -v _value "%s" \""\$$_var"\" + [[ ${_value} ]] && printf '%s="%s"\n' "$_var" "$_value" + done + } +diff --git a/dracut-initramfs-restore.sh b/dracut-initramfs-restore.sh +index f29c814..0dd1938 100644 +--- a/dracut-initramfs-restore.sh ++++ b/dracut-initramfs-restore.sh +@@ -6,6 +6,10 @@ set -e + + KERNEL_VERSION="$(uname -r)" + ++[[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut ++SKIP="$dracutbasedir/skipcpio" ++[[ -x $SKIP ]] || SKIP=cat ++ + [[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id + + if [[ $MACHINE_ID ]] && [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]] ; then +@@ -16,11 +20,11 @@ fi + cd /run/initramfs + + [ -f .need_shutdown -a -f "$IMG" ] || exit 1 +-if zcat "$IMG" | cpio -id --quiet >/dev/null; then ++if $SKIP "$IMG" | zcat | cpio -id --no-absolute-filenames --quiet >/dev/null; then + rm -f -- .need_shutdown +-elif xzcat "$IMG" | cpio -id --quiet >/dev/null; then ++elif $SKIP "$IMG" | xzcat | cpio -id --no-absolute-filenames --quiet >/dev/null; then + rm -f -- .need_shutdown +-elif lz4 -d -c "$IMG" | cpio -id --quiet >/dev/null; then ++elif $SKIP "$IMG" | lz4 -d -c | cpio -id --no-absolute-filenames --quiet >/dev/null; then + rm -f -- .need_shutdown + else + # something failed, so we clean up +diff --git a/dracut.sh b/dracut.sh +index c1ef474..c4163bc 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -834,6 +834,13 @@ trap 'exit 1;' SIGINT + export DRACUT_KERNEL_LAZY="1" + export DRACUT_RESOLVE_LAZY="1" + ++if [[ $print_cmdline ]]; then ++ stdloglvl=0 ++ sysloglvl=0 ++ fileloglvl=0 ++ kmsgloglvl=0 ++fi ++ + if [[ -f $dracutbasedir/dracut-functions.sh ]]; then + . $dracutbasedir/dracut-functions.sh + else +@@ -907,6 +914,7 @@ for ((i=0; i < ${#dracut_args[@]}; i++)); do + dracut_args[$i]="\"${dracut_args[$i]}\"" + #" keep vim happy + done ++ + dinfo "Executing: $0 ${dracut_args[@]}" + + [[ $do_list = yes ]] && { +diff --git a/lsinitrd.sh b/lsinitrd.sh +index 8dc9032..a697bc2 100755 +--- a/lsinitrd.sh ++++ b/lsinitrd.sh +@@ -160,27 +160,35 @@ case $bin in + ;; + esac + +-if [[ $SKIP ]]; then +- read -N 6 bin < <($SKIP "$image") +-fi +- +-case $bin in +- $'\x1f\x8b'*) +- CAT="zcat --";; +- BZh*) +- CAT="bzcat --";; +- $'\x71\xc7'*|070701) +- CAT="cat --" +- ;; +- $'\x02\x21'*) +- CAT="lz4 -d -c";; +- *) +- CAT="xzcat --"; +- if echo "test"|xz|xzcat --single-stream >/dev/null 2>&1; then +- CAT="xzcat --single-stream --" +- fi +- ;; +-esac ++CAT=$({ ++ if [[ $SKIP ]]; then ++ $SKIP "$image" ++ else ++ cat "$image" ++ fi } | { ++ read -N 6 bin ++ case $bin in ++ $'\x1f\x8b'*) ++ echo "zcat --" ++ ;; ++ BZh*) ++ echo "bzcat --" ++ ;; ++ $'\x71\xc7'*|070701) ++ echo "cat --" ++ ;; ++ $'\x02\x21'*) ++ echo "lz4 -d -c" ++ ;; ++ *) ++ if echo "test"|xz|xzcat --single-stream >/dev/null 2>&1; then ++ echo "xzcat --single-stream --" ++ else ++ echo "xzcat --" ++ fi ++ ;; ++ esac ++ }) + + skipcpio() + { +diff --git a/modules.d/10i18n/parse-i18n.sh b/modules.d/10i18n/parse-i18n.sh +index 135c57b..8f256fa 100755 +--- a/modules.d/10i18n/parse-i18n.sh ++++ b/modules.d/10i18n/parse-i18n.sh +@@ -12,7 +12,7 @@ inst_key_val() { + _value="$(getarg $@)" + [ -z "${_value}" ] && _value=$_default + if [ -n "${_value}" ]; then +- printf '%s="%s"\n' $key ${_value} >> $_file ++ printf '%s="%s"\n' ${_key} ${_value} >> $_file + fi + unset _file + unset _value +diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh +index 50e8932..ba05250 100755 +--- a/modules.d/40network/dhclient-script.sh ++++ b/modules.d/40network/dhclient-script.sh +@@ -64,13 +64,17 @@ setup_interface6() { + search=$(printf -- "$new_domain_search") + namesrv=$new_domain_name_servers + hostname=$new_host_name +- lease_time=$new_dhcp_lease_time ++ [ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time ++ [ -n "$new_max_life" ] && lease_time=$new_max_life ++ preferred_lft=$lease_time ++ [ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life + + [ -f /tmp/net.$netif.override ] && . /tmp/net.$netif.override + + ip -6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \ +- dev ${netif} scope global valid_lft ${lease_time} \ +- preferred_lft ${lease_time} ++ dev ${netif} scope global \ ++ ${lease_time:+valid_lft $lease_time} \ ++ ${preferred_lft:+preferred_lft ${preferred_lft}} + + [ -n "${search}${domain}" ] && echo "search $search $domain" > /tmp/net.$netif.resolv.conf + if [ -n "$namesrv" ] ; then +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 51b0d52..7740be5 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -130,12 +130,12 @@ do_ipv6auto() { + + # Handle static ip configuration + do_static() { +- strstr $ip '*:*:*' && load_ipv6 ++ strglobin $ip '*:*:*' && load_ipv6 + + linkup $netif + [ -n "$macaddr" ] && ip link set address $macaddr dev $netif + [ -n "$mtu" ] && ip link set mtu $mtu dev $netif +- if strstr $ip '*:*:*'; then ++ if strglobin $ip '*:*:*'; then + # note no ip addr flush for ipv6 + ip addr add $ip/$mask ${srv:+peer $srv} dev $netif + wait_for_ipv6_dad $netif +@@ -364,7 +364,12 @@ fi + + # no ip option directed at our interface? + if [ ! -e /tmp/net.${netif}.up ]; then +- do_dhcp -4 ++ if getargs 'ip=dhcp6'; then ++ load_ipv6 ++ do_dhcp -6 ++ else ++ do_dhcp -4 ++ fi + fi + + exit 0 +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 7430e4c..a82f1a8 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -377,7 +377,7 @@ ip_to_var() { + # ip= means anaconda-style static config argument cluster: + # ip= gateway= netmask= hostname= mtu= + # ksdevice={link|bootif|ibft||} +- if strstr "$autoconf" "*.*.*.*"; then ++ if strglob "$autoconf" "*.*.*.*"; then + ip="$autoconf" + gw=$(getarg gateway=) + mask=$(getarg netmask=) +@@ -516,3 +516,27 @@ find_iface_with_link() { + done + return 1 + } ++ ++is_persistent_ethernet_name() { ++ case "$1" in ++ # udev persistent interface names ++ eth[0-9]|eth[0-9][0-9]|eth[0-9][0-9][0-9]*) ++ ;; ++ eno[0-9]|eno[0-9][0-9]|eno[0-9][0-9][0-9]*) ++ ;; ++ ens[0-9]|ens[0-9][0-9]|ens[0-9][0-9][0-9]*) ++ ;; ++ enp[0-9]s[0-9]*|enp[0-9][0-9]s[0-9]*|enp[0-9][0-9][0-9]*s[0-9]*) ++ ;; ++ enP*p[0-9]s[0-9]*|enP*p[0-9][0-9]s[0-9]*|enP*p[0-9][0-9][0-9]*s[0-9]*) ++ ;; ++ # biosdevname ++ em[0-9]|em[0-9][0-9]|em[0-9][0-9][0-9]*) ++ ;; ++ p[0-9]p[0-9]*|p[0-9][0-9]p[0-9]*|p[0-9][0-9][0-9]*p[0-9]*) ++ ;; ++ *) ++ return 1 ++ esac ++ return 0 ++} +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index e2fa485..6756c3f 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -3,6 +3,8 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + + # NFS root might have reached here before /tmp/net.ifaces was written ++type is_persistent_ethernet_name >/dev/null 2>&1 || . /lib/net-lib.sh ++ + udevadm settle --timeout=30 + + if [ -e /tmp/bridge.info ]; then +@@ -85,7 +87,7 @@ for netup in /tmp/net.*.did-setup ; do + + netif=${netup%%.did-setup} + netif=${netif##*/net.} +- strstr "$netif" ":*:*:*:*:" && continue ++ strglobin "$netif" ":*:*:*:*:" && continue + [ -e /tmp/ifcfg/ifcfg-$netif ] && continue + unset bridge + unset bond +@@ -120,9 +122,9 @@ for netup in /tmp/net.*.did-setup ; do + echo "ONBOOT=yes" + echo "NETBOOT=yes" + echo "UUID=\"$uuid\"" ++ strstr "$(ip -6 addr show dev $netif)" 'inet6' && echo "IPV6INIT=yes" + if [ -f /tmp/dhclient.$netif.lease ]; then + [ -f /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts +- strstr "$ip" '*:*:*' && echo "IPV6INIT=yes" + if [ -f /tmp/net.$netif.has_ibft_config ]; then + echo "BOOTPROTO=ibft" + else +@@ -132,7 +134,7 @@ for netup in /tmp/net.*.did-setup ; do + else + # If we've booted with static ip= lines, the override file is there + [ -e /tmp/net.$netif.override ] && . /tmp/net.$netif.override +- if strstr "$ip" '*:*:*'; then ++ if strglobin "$ip" '*:*:*'; then + echo "IPV6INIT=yes" + echo "IPV6_AUTOCONF=no" + echo "IPV6ADDR=\"$ip/$mask\"" +@@ -149,7 +151,7 @@ for netup in /tmp/net.*.did-setup ; do + fi + fi + fi +- if strstr "$gw" '*:*:*'; then ++ if strglobin "$gw" '*:*:*'; then + echo "IPV6_DEFAULTGW=\"$gw\"" + elif [ -n "$gw" ]; then + echo "GATEWAY=\"$gw\"" +@@ -164,7 +166,13 @@ for netup in /tmp/net.*.did-setup ; do + { + [ -n "$macaddr" ] && echo "MACADDR=\"$macaddr\"" + if ! print_s390 $netif; then +- [ -n "$macaddr" ] || echo "HWADDR=\"$(cat /sys/class/net/$netif/address)\"" ++ 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 + fi + echo "TYPE=Ethernet" + echo "NAME=\"$netif\"" +diff --git a/modules.d/80cms/cms-write-ifcfg.sh b/modules.d/80cms/cms-write-ifcfg.sh +index c0623a4..924be1d 100755 +--- a/modules.d/80cms/cms-write-ifcfg.sh ++++ b/modules.d/80cms/cms-write-ifcfg.sh +@@ -26,7 +26,7 @@ function cms_write_config() + + IFCFGFILE=/run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-$DEVICE + +- strstr "$IPADDR" '*:*:*' && ipv6=1 ++ strglobin "$IPADDR" '*:*:*' && ipv6=1 + + # to please NetworkManager on startup in loader before loader reconfigures net + cat > /etc/sysconfig/network << EOF +diff --git a/modules.d/80cms/cmsifup.sh b/modules.d/80cms/cmsifup.sh +index b361650..926340e 100755 +--- a/modules.d/80cms/cmsifup.sh ++++ b/modules.d/80cms/cmsifup.sh +@@ -8,7 +8,7 @@ DEVICE=$1 + + . /tmp/cms.conf + +-strstr "$IPADDR" '*:*:*' && ipv6=1 ++strglobin "$IPADDR" '*:*:*' && ipv6=1 + + if [ "$ipv6" ] && ! str_starts "$IPADDR" "["; then + IPADDR="[$IPADDR]" +diff --git a/modules.d/80cms/cmssetup.sh b/modules.d/80cms/cmssetup.sh +index 36955bc..c9e1331 100755 +--- a/modules.d/80cms/cmssetup.sh ++++ b/modules.d/80cms/cmssetup.sh +@@ -144,6 +144,7 @@ function dasd_settle_all() { + processcmsfile() + { + source /tmp/cms.conf ++ SUBCHANNELS="$(echo $SUBCHANNELS | sed 'y/ABCDEF/abcdef/')" + + if [[ $NETTYPE ]]; then + ( +diff --git a/modules.d/90dm/module-setup.sh b/modules.d/90dm/module-setup.sh +index 829c24b..2367588 100755 +--- a/modules.d/90dm/module-setup.sh ++++ b/modules.d/90dm/module-setup.sh +@@ -16,7 +16,7 @@ depends() { + # called by dracut + installkernel() { + instmods =drivers/md +- instmods dm_mod ++ instmods dm_mod dm-cache dm-cache-mq dm-cache-cleaner + } + + # called by dracut +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index 93a452e..5b810b9 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -80,7 +80,8 @@ install() { + inst_rules 11-dm-lvm.rules 69-dm-lvm-metad.rules + + # Do not run lvmetad update via pvscan in udev rule - lvmetad is not running yet in dracut! +- if grep -q SYSTEMD_WANTS ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules; then ++ if [[ -f ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ]] && \ ++ grep -q SYSTEMD_WANTS ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules; then + sed -i -e 's/^ENV{SYSTEMD_ALIAS}=.*/# No LVM pvscan in dracut - lvmetad is not running yet/' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules + sed -i -e 's/^ENV{ID_MODEL}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules + sed -i -e 's/^ENV{SYSTEMD_WANTS}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules +diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh +index ac745d1..81c94f2 100755 +--- a/modules.d/90mdraid/module-setup.sh ++++ b/modules.d/90mdraid/module-setup.sh +@@ -54,6 +54,8 @@ cmdline() { + done + ) + ++ [[ -z "$UUID" ]] && continue ++ + if ! [[ ${_activated[${UUID}]} ]]; then + printf "%s" " rd.md.uuid=${UUID}" + _activated["${UUID}"]=1 +diff --git a/modules.d/95fcoe-uefi/parse-uefifcoe.sh b/modules.d/95fcoe-uefi/parse-uefifcoe.sh +index 0799cdd..7b8f1a6 100755 +--- a/modules.d/95fcoe-uefi/parse-uefifcoe.sh ++++ b/modules.d/95fcoe-uefi/parse-uefifcoe.sh +@@ -26,7 +26,7 @@ print_fcoe_uefi_conf() + esac + fi + # fcoe=eth0:nodcb +- printf "%s\n" "$dev:nodcb" ++ printf "fcoe=%s\n" "$dev:nodcb" + return 0 + } + +diff --git a/modules.d/95fcoe/fcoe-genrules.sh b/modules.d/95fcoe/fcoe-genrules.sh +index 80894ed..fa3af6d 100755 +--- a/modules.d/95fcoe/fcoe-genrules.sh ++++ b/modules.d/95fcoe/fcoe-genrules.sh +@@ -13,4 +13,4 @@ + else + printf 'ACTION=="add", SUBSYSTEM=="net", NAME=="%s", RUN+="/sbin/initqueue --onetime --unique --name fcoe-up-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s"\n' "$fcoe_interface" "$fcoe_dcb" + fi +-} > /etc/udev/rules.d/92-fcoe.rules ++} >> /etc/udev/rules.d/92-fcoe.rules +diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh +index 511c554..d8c73c8 100755 +--- a/modules.d/95fcoe/fcoe-up.sh ++++ b/modules.d/95fcoe/fcoe-up.sh +@@ -28,12 +28,35 @@ if [ "$dcb" = "dcb" ]; then + # are to kill it and start a new lldpad to take over. Data is transfered + # between the 2 using a shm segment + lldpad -d +- # stupid tools, need sleep +- sleep 1 +- dcbtool sc "$netif" dcb on +- sleep 1 +- dcbtool sc "$netif" app:fcoe e:1 a:1 w:1 ++ # 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 ++ ++ # 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" ++ sleep 1 ++ i=$(($i+1)) ++ done ++ ++ while [ $i -lt 60 ]; do ++ dcbtool sc "$netif" app:fcoe e:1 a:1 w:1 && break ++ info "Retrying to turn fcoe on" ++ sleep 1 ++ i=$(($i+1)) ++ done ++ + sleep 1 ++ + fipvlan "$netif" -c -s + elif [ "$netdriver" = "bnx2x" ]; then + # If driver is bnx2x, do not use /sys/module/fcoe/parameters/create but fipvlan +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index c502ba0..9a52c00 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -21,7 +21,7 @@ installkernel() { + + # called by dracut + install() { +- inst_multiple ip dcbtool fipvlan lldpad readlink ++ inst_multiple ip dcbtool fipvlan lldpad readlink lldptool + + mkdir -m 0755 -p "$initdir/var/lib/lldpad" + +diff --git a/modules.d/95fstab-sys/mount-sys.sh b/modules.d/95fstab-sys/mount-sys.sh +index 12711a0..a237810 100755 +--- a/modules.d/95fstab-sys/mount-sys.sh ++++ b/modules.d/95fstab-sys/mount-sys.sh +@@ -27,7 +27,11 @@ fstab_mount() { + return 0 + } + +-[ -f /etc/fstab ] && fstab_mount /etc/fstab ++# systemd will mount and run fsck from /etc/fstab and we don't want to ++# run into a race condition. ++if [ -z "$DRACUT_SYSTEMD" ]; then ++ [ -f /etc/fstab ] && fstab_mount /etc/fstab ++fi + + # prefer $NEWROOT/etc/fstab.sys over local /etc/fstab.sys + if [ -f $NEWROOT/etc/fstab.sys ]; then +diff --git a/modules.d/95nbd/nbdroot.sh b/modules.d/95nbd/nbdroot.sh +index 32f346d..8bfbebc 100755 +--- a/modules.d/95nbd/nbdroot.sh ++++ b/modules.d/95nbd/nbdroot.sh +@@ -111,6 +111,10 @@ if [ "$root" = "block:/dev/root" -o "$root" = "dhcp" ]; then + fi + fi + ++if strstr "$(nbd-client --help 2>&1)" "systemd-mark"; then ++ preopts="--systemd-mark $preopts" ++fi ++ + nbd-client $preopts "$nbdserver" $nbdport /dev/nbd0 $opts || exit 1 + + # NBD doesn't emit uevents when it gets connected, so kick it +diff --git a/modules.d/95nfs/nfs-lib.sh b/modules.d/95nfs/nfs-lib.sh +index 9ced2e6..d5377fe 100755 +--- a/modules.d/95nfs/nfs-lib.sh ++++ b/modules.d/95nfs/nfs-lib.sh +@@ -40,7 +40,7 @@ nfsroot_to_var() { + arg="${arg##$nfs:}" + + # check if we have a server +- if strstr "$arg" ':/*' ; then ++ if strstr "$arg" ':/' ; then + server="${arg%%:/*}" + arg="/${arg##*:/}" + fi +diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh +index ceb7855..b1b4684 100755 +--- a/modules.d/95resume/module-setup.sh ++++ b/modules.d/95resume/module-setup.sh +@@ -17,12 +17,12 @@ check() { + + # called by dracut + cmdline() { +- local _activated +- declare -A _activated ++ local _resume + + for dev in "${!host_fs_types[@]}"; do + [[ ${host_fs_types[$dev]} =~ ^(swap|swsuspend|swsupend)$ ]] || continue +- printf "resume=%s " "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")" ++ _resume=$(shorten_persistent_dev "$(get_persistent_dev "$dev")") ++ [[ -n ${_resume} ]] && printf " resume=%s" "${_resume}" + done + } + +diff --git a/modules.d/95resume/parse-resume.sh b/modules.d/95resume/parse-resume.sh +index d7b2d7f..6ab59c3 100755 +--- a/modules.d/95resume/parse-resume.sh ++++ b/modules.d/95resume/parse-resume.sh +@@ -70,9 +70,10 @@ if ! getarg noresume; then + printf '[ -e "%s" ] && { ln -s "%s" /dev/resume; rm -f -- "$job" "%s/initqueue/timeout/resume.sh"; }\n' \ + "$resume" "$resume" "$hookdir" >> $hookdir/initqueue/settled/resume.sh + +- printf -- "%s" 'warn "Cancelling resume operation. Device not found.";' +- printf -- ' cancel_wait_for_dev /dev/resume; rm -f -- "$job" "%s/initqueue/settled/resume.sh";\n' \ +- "$hookdir" >> $hookdir/initqueue/timeout/resume.sh ++ { ++ printf -- "%s" 'warn "Cancelling resume operation. Device not found.";' ++ printf -- ' cancel_wait_for_dev /dev/resume; rm -f -- "$job" "%s/initqueue/settled/resume.sh";\n' "$hookdir" ++ } >> $hookdir/initqueue/timeout/resume.sh + + mv /lib/dracut/resume.sh /lib/dracut/hooks/pre-mount/10-resume.sh + else +diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh +index 2d36712..fab4ffc 100755 +--- a/modules.d/95udev-rules/module-setup.sh ++++ b/modules.d/95udev-rules/module-setup.sh +@@ -32,6 +32,7 @@ install() { + 60-pcmcia.rules \ + 50-udev.rules 95-late.rules \ + 50-firmware.rules \ ++ 59-scsi-sg3_utils.rules \ + 75-net-description.rules \ + 80-net-name-slot.rules 80-net-setup-link.rules \ + "$moddir/59-persistent-storage.rules" \ +diff --git a/modules.d/98systemd/dracut-initqueue.service b/modules.d/98systemd/dracut-initqueue.service +index 03dcc4e..1b9e701 100644 +--- a/modules.d/98systemd/dracut-initqueue.service ++++ b/modules.d/98systemd/dracut-initqueue.service +@@ -11,6 +11,8 @@ + Description=dracut initqueue hook + Documentation=man:dracut-initqueue.service(8) + DefaultDependencies=no ++Before=remote-fs-pre.target ++Wants=remote-fs-pre.target + After=systemd-udev-trigger.service + Wants=systemd-udev-trigger.service + ConditionPathExists=/etc/initrd-release +diff --git a/modules.d/98systemd/dracut-pre-pivot.service b/modules.d/98systemd/dracut-pre-pivot.service +index 6db1f2c..d7c7b1d 100644 +--- a/modules.d/98systemd/dracut-pre-pivot.service ++++ b/modules.d/98systemd/dracut-pre-pivot.service +@@ -13,6 +13,8 @@ Documentation=man:dracut-pre-pivot.service(8) + After=initrd.target initrd-parse-etc.service sysroot.mount + 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 + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-pivot + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cleanup +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index c72aad4..cf1b2e7 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -44,6 +44,7 @@ install() { + $systemdutildir/systemd-modules-load \ + $systemdutildir/systemd-vconsole-setup \ + $systemdutildir/system-generators/systemd-fstab-generator \ ++ $systemdutildir/system-generators/systemd-gpt-auto-generator \ + \ + $systemdsystemunitdir/cryptsetup.target \ + $systemdsystemunitdir/emergency.target \ +@@ -191,7 +192,7 @@ install() { + inst_script "$moddir/dracut-mount.sh" /bin/dracut-mount + inst_script "$moddir/dracut-pre-pivot.sh" /bin/dracut-pre-pivot + +- inst_script "$moddir/rootfs-generator.sh" /lib/systemd/system-generators/dracut-rootfs-generator ++ inst_script "$moddir/rootfs-generator.sh" $systemdutildir/system-generators/dracut-rootfs-generator + + inst_binary true + ln_r $(type -P true) "/usr/bin/loginctl" +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index e4d7da8..33f7678 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -20,19 +20,33 @@ debug_on() { + [ "$RD_DEBUG" = "yes" ] && set -x + } + +-# returns OK if $1 contains $2 ++# returns OK if $1 contains literal string $2 (and isn't empty) + strstr() { +- [ "${1#*$2*}" != "$1" ] ++ [ "${1##*"$2"*}" != "$1" ] + } + +-# returns OK if $1 contains $2 at the beginning ++# returns OK if $1 matches (completely) glob pattern $2 ++# An empty $1 will not be considered matched, even if $2 is * which technically ++# matches; as it would match anything, it's not an interesting case. ++strglob() { ++ [ -n "$1" -a -z "${1##$2}" ] ++} ++ ++# returns OK if $1 contains (anywhere) a match of glob pattern $2 ++# An empty $1 will not be considered matched, even if $2 is * which technically ++# matches; as it would match anything, it's not an interesting case. ++strglobin() { ++ [ -n "$1" -a -z "${1##*$2*}" ] ++} ++ ++# returns OK if $1 contains literal string $2 at the beginning, and isn't empty + str_starts() { +- [ "${1#$2*}" != "$1" ] ++ [ "${1#"$2"*}" != "$1" ] + } + +-# returns OK if $1 contains $2 at the end ++# returns OK if $1 contains literal string $2 at the end, and isn't empty + str_ends() { +- [ "${1%*$2}" != "$1" ] ++ [ "${1%*"$2"}" != "$1" ] + } + + if [ -z "$DRACUT_SYSTEMD" ]; then +@@ -85,9 +99,9 @@ str_replace() { + local out='' + + while strstr "${in}" "$s"; do +- chop="${in%%$s*}" ++ chop="${in%%"$s"*}" + out="${out}${chop}$r" +- in="${in#*$s}" ++ in="${in#*"$s"}" + done + echo "${out}${in}" + } +@@ -555,7 +569,7 @@ nfsroot_to_var() { + arg="${arg##$nfs:}" + + # check if we have a server +- if strstr "$arg" ':/*' ; then ++ if strstr "$arg" ':/' ; then + server="${arg%%:/*}" + arg="/${arg##*:/}" + fi +@@ -969,6 +983,7 @@ if ! command -v pidof >/dev/null 2>/dev/null; then + local _cmd + local _exe + local _rl ++ local _ret=1 + local i + _cmd="$1" + [ -z "$_cmd" ] && return 1 +@@ -983,8 +998,9 @@ if ! command -v pidof >/dev/null 2>/dev/null; then + fi + i=${i%/exe} + echo ${i##/proc/} ++ _ret=0 + done +- return 0 ++ return $_ret + } + fi + +diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh +index 2364f4f..a1232eb 100755 +--- a/modules.d/99base/init.sh ++++ b/modules.d/99base/init.sh +@@ -353,7 +353,9 @@ wait_for_loginit + # remove helper symlink + [ -h /dev/root ] && rm -f -- /dev/root + +-getarg rd.break -d rdbreak && emergency_shell -n switch_root "Break before switch_root" ++bv=$(getarg rd.break -d rdbreak) && [ -z "$bv" ] && ++ emergency_shell -n switch_root "Break before switch_root" ++unset bv + info "Switching root" + + +diff --git a/modules.d/99fs-lib/module-setup.sh b/modules.d/99fs-lib/module-setup.sh +index 7979bab..b6f85b1 100755 +--- a/modules.d/99fs-lib/module-setup.sh ++++ b/modules.d/99fs-lib/module-setup.sh +@@ -17,10 +17,10 @@ echo_fs_helper() { + local dev=$1 fs=$2 + case "$fs" in + xfs) +- echo -n " xfs_db xfs_repair xfs_check xfs_metadump " ++ echo -n " xfs_db xfs_repair xfs_check xfs_metadump" + ;; + ext?) +- echo -n " fsck.$fs e2fsck " ++ echo -n " e2fsck " + ;; + jfs) + echo -n " jfs_fsck " +@@ -31,10 +31,10 @@ echo_fs_helper() { + btrfs) + echo -n " btrfsck " + ;; +- *) +- [[ -x fsck.$fs ]] && echo -n " fsck.$fs " +- ;; + esac ++ ++ echo -n " fsck.$fs " ++ return 0 + } + + include_fs_helper_modules() { +diff --git a/test/TEST-01-BASIC/test-init.sh b/test/TEST-01-BASIC/test-init.sh +index 5fc02d9..cf5a026 100755 +--- a/test/TEST-01-BASIC/test-init.sh ++++ b/test/TEST-01-BASIC/test-init.sh +@@ -1,7 +1,7 @@ + #!/bin/sh + >/dev/watchdog + export PATH=/sbin:/bin:/usr/sbin:/usr/bin +-strstr() { [ "${1#*$2*}" != "$1" ]; } ++strstr() { [ "${1##*"$2"*}" != "$1" ]; } + CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) + plymouth --quit + exec >/dev/console 2>&1 +diff --git a/test/TEST-02-SYSTEMD/test-init.sh b/test/TEST-02-SYSTEMD/test-init.sh +index ff17b6b..3fc24f5 100755 +--- a/test/TEST-02-SYSTEMD/test-init.sh ++++ b/test/TEST-02-SYSTEMD/test-init.sh +@@ -1,6 +1,6 @@ + #!/bin/sh + export PATH=/sbin:/bin:/usr/sbin:/usr/bin +-strstr() { [ "${1#*$2*}" != "$1" ]; } ++strstr() { [ "${1##*"$2"*}" != "$1" ]; } + CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) + plymouth --quit + exec /dev/console 2>&1 +diff --git a/test/TEST-03-USR-MOUNT/test-init.sh b/test/TEST-03-USR-MOUNT/test-init.sh +index 63520ab..99e109a 100755 +--- a/test/TEST-03-USR-MOUNT/test-init.sh ++++ b/test/TEST-03-USR-MOUNT/test-init.sh +@@ -1,7 +1,7 @@ + #!/bin/sh + >/dev/watchdog + export PATH=/sbin:/bin:/usr/sbin:/usr/bin +-strstr() { [ "${1#*$2*}" != "$1" ]; } ++strstr() { [ "${1##*"$2"*}" != "$1" ]; } + CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) + plymouth --quit + exec /dev/console 2>&1 +diff --git a/test/TEST-04-FULL-SYSTEMD/test-init.sh b/test/TEST-04-FULL-SYSTEMD/test-init.sh +index dcda926..3012213 100755 +--- a/test/TEST-04-FULL-SYSTEMD/test-init.sh ++++ b/test/TEST-04-FULL-SYSTEMD/test-init.sh +@@ -1,7 +1,7 @@ + #!/bin/sh + >/dev/watchdog + export PATH=/sbin:/bin:/usr/sbin:/usr/bin +-strstr() { [ "${1#*$2*}" != "$1" ]; } ++strstr() { [ "${1##*"$2"*}" != "$1" ]; } + CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) + plymouth --quit + exec /dev/console 2>&1 +diff --git a/test/TEST-10-RAID/test-init.sh b/test/TEST-10-RAID/test-init.sh +index 62afcee..4b4977a 100755 +--- a/test/TEST-10-RAID/test-init.sh ++++ b/test/TEST-10-RAID/test-init.sh +@@ -1,6 +1,6 @@ + #!/bin/sh + export PATH=/sbin:/bin:/usr/sbin:/usr/bin +-strstr() { [ "${1#*$2*}" != "$1" ]; } ++strstr() { [ "${1##*"$2"*}" != "$1" ]; } + CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) + command -v plymouth >/dev/null && plymouth --quit + exec >/dev/console 2>&1 +diff --git a/test/TEST-11-LVM/test-init.sh b/test/TEST-11-LVM/test-init.sh +index fd03aa5..db3c52a 100755 +--- a/test/TEST-11-LVM/test-init.sh ++++ b/test/TEST-11-LVM/test-init.sh +@@ -1,6 +1,6 @@ + #!/bin/sh + export PATH=/sbin:/bin:/usr/sbin:/usr/bin +-strstr() { [ "${1#*$2*}" != "$1" ]; } ++strstr() { [ "${1##*"$2"*}" != "$1" ]; } + CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) + plymouth --quit + exec >/dev/console 2>&1 +diff --git a/test/TEST-12-RAID-DEG/test-init.sh b/test/TEST-12-RAID-DEG/test-init.sh +index 62afcee..4b4977a 100755 +--- a/test/TEST-12-RAID-DEG/test-init.sh ++++ b/test/TEST-12-RAID-DEG/test-init.sh +@@ -1,6 +1,6 @@ + #!/bin/sh + export PATH=/sbin:/bin:/usr/sbin:/usr/bin +-strstr() { [ "${1#*$2*}" != "$1" ]; } ++strstr() { [ "${1##*"$2"*}" != "$1" ]; } + CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) + command -v plymouth >/dev/null && plymouth --quit + exec >/dev/console 2>&1 +diff --git a/test/TEST-14-IMSM/test-init.sh b/test/TEST-14-IMSM/test-init.sh +index f434f13..932bd26 100755 +--- a/test/TEST-14-IMSM/test-init.sh ++++ b/test/TEST-14-IMSM/test-init.sh +@@ -1,6 +1,6 @@ + #!/bin/sh + export PATH=/sbin:/bin:/usr/sbin:/usr/bin +-strstr() { [ "${1#*$2*}" != "$1" ]; } ++strstr() { [ "${1##*"$2"*}" != "$1" ]; } + CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) + plymouth --quit + exec >/dev/console 2>&1 +diff --git a/test/TEST-16-DMSQUASH/test-init.sh b/test/TEST-16-DMSQUASH/test-init.sh +index 616bf68..55a5321 100755 +--- a/test/TEST-16-DMSQUASH/test-init.sh ++++ b/test/TEST-16-DMSQUASH/test-init.sh +@@ -1,6 +1,6 @@ + #!/bin/sh + export PATH=/sbin:/bin:/usr/sbin:/usr/bin +-strstr() { [ "${1#*$2*}" != "$1" ]; } ++strstr() { [ "${1##*"$2"*}" != "$1" ]; } + CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) + plymouth --quit + exec >/dev/console 2>&1 +diff --git a/test/TEST-17-LVM-THIN/test-init.sh b/test/TEST-17-LVM-THIN/test-init.sh +index fd03aa5..db3c52a 100755 +--- a/test/TEST-17-LVM-THIN/test-init.sh ++++ b/test/TEST-17-LVM-THIN/test-init.sh +@@ -1,6 +1,6 @@ + #!/bin/sh + export PATH=/sbin:/bin:/usr/sbin:/usr/bin +-strstr() { [ "${1#*$2*}" != "$1" ]; } ++strstr() { [ "${1##*"$2"*}" != "$1" ]; } + CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) + plymouth --quit + exec >/dev/console 2>&1 +diff --git a/test/TEST-20-NFS/client-init.sh b/test/TEST-20-NFS/client-init.sh +index ad6a656..a16db3c 100755 +--- a/test/TEST-20-NFS/client-init.sh ++++ b/test/TEST-20-NFS/client-init.sh +@@ -4,7 +4,7 @@ exec >/dev/console 2>&1 + export TERM=linux + export PS1='initramfs-test:\w\$ ' + CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) +-strstr() { [ "${1#*$2*}" != "$1" ]; } ++strstr() { [ "${1##*"$2"*}" != "$1" ]; } + + stty sane + strstr "$CMDLINE" "rd.shell" && sh -i +diff --git a/test/TEST-50-MULTINIC/client-init.sh b/test/TEST-50-MULTINIC/client-init.sh +index 51f8b64..13affc4 100755 +--- a/test/TEST-50-MULTINIC/client-init.sh ++++ b/test/TEST-50-MULTINIC/client-init.sh +@@ -2,14 +2,15 @@ + exec >/dev/console 2>&1 + set -x + export PATH=/sbin:/bin:/usr/sbin:/usr/bin +-strstr() { [ "${1#*$2*}" != "$1" ]; } ++strstr() { [ "${1##*"$2"*}" != "$1" ]; } ++strglobin() { [ -n "$1" -a -z "${1##*$2*}" ]; } + CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) + export TERM=linux + export PS1='initramfs-test:\w\$ ' + stty sane + echo "made it to the rootfs! Powering down." + for i in /run/initramfs/net.*.did-setup; do +- strstr "$i" ":*:*:*:*:" && continue ++ strglobin "$i" ":*:*:*:*:" && continue + i=${i%.did-setup} + IFACES+="${i##*/net.} " + done