Hello community,
here is the log from the commit of package dracut.4092 for openSUSE:13.2:Update checked in at 2015-10-23 13:18:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:13.2:Update/dracut.4092 (Old)
and /work/SRC/openSUSE:13.2:Update/.dracut.4092.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dracut.4092"
Changes:
--------
New Changes file:
--- /dev/null 2015-10-14 00:04:03.524025256 +0200
+++ /work/SRC/openSUSE:13.2:Update/.dracut.4092.new/dracut.changes 2015-10-23 13:18:24.000000000 +0200
@@ -0,0 +1,1639 @@
+-------------------------------------------------------------------
+Wed Oct 14 12:47:09 UTC 2015 - trenn@suse.de
+
+- Always install dm-snaphost module if lvm dracut module is needed,
+ even if dm-snampshot is not loaded on the host yet (bsc#947518)
+M 0128-90lvm-Install-dm-snapshot-module.patch
+- Revert:
+0176-Parse-rootflags-correctly.patch
+ bnc#940100
+ The patch caused a regression and added quite some complexity.
+ The bug (912734) which got fixed by the reverted patch is solved via
+ documentation TID for now. It is worked (mainline/factory) for a proper
+ solution which might get added later when properly tested.
+
+-------------------------------------------------------------------
+Fri Sep 25 14:48:26 UTC 2015 - fvogt@suse.com
+
+- Replace 0180-dracut-add-trivial-vconsole-fontmap.patch
+ (bad workaround, only works for a single case) and
+ 0172-10i18n-module-setup.sh-For-FONT_MAP-also-check-wheth.patch
+ (didn't work) by 0172-i18n_add_correct_fontmaps.patch.
+- Solves bsc#943312, boo#932981 and bnc#904533 correctly.
+- Check for existance of link targets (/run) bsc#922676
+- Remove exit 0 from do-convertfs.sh which is used as a pre-pivot hook and
+ hooks get sourced, cmp with:
+ modules.d/99base/dracut-lib.sh: source_all "/lib/dracut/hooks/$_dir" "$@"
+ So hooks must not use exit!
+ bsc#922676
+ This fixes the critical bug for s390x kiwi images which need the symlink
+ from /var/run to /run and additional later hooks.
+ Modify: 0106-dracut-Enable-converting-of-directory-var-run-var-lo.patch
+- Incorporate other convertfs patch (one liner) into this patch as well
+ and delete:
+ 0168-convertrunfs-Fix-typo.patch
+- Fix installing of keyctl (bnc#934736)
+ Add 0201-modsign_fix_keyctl_install.patch
+- port iscsi network setup and multipath fixes from SLES12 GM to SP1 (bsc#919179)
+ Add 0305-static_network_setup_return_zero.patch
+
+-------------------------------------------------------------------
+Thu Sep 10 14:14:14 UTC 2015 - thomas.blume@suse.com
+
+- fix systemd-vconsole-error in initrd (bsc#943312)
+ Add 0180-dracut-add-trivial-vconsole-fontmap.patch
+
+-------------------------------------------------------------------
+Thu Jul 23 12:50:19 UTC 2015 - trenn@suse.de
+
+- Fix typo, missing inst_rules key word introduced in previous patch
+ (bnc#905746)
+M dracut_dmraid_use_udev.patch
+
+-------------------------------------------------------------------
+Thu Jul 2 12:40:00 UTC 2015 - trenn@suse.de
+
+- Use kpartx udev rules to create dmraid devices (bnc#905746)
+A dracut_dmraid_use_udev.patch
+
+-------------------------------------------------------------------
+Wed Jun 3 15:47:25 UTC 2015 - trenn@suse.de
+
+- Fix NFS root if IP is used for mount instead of hostname:
+* Add 0200-fix_nfs_with_ip_instead_of_hostname.patch
+- Fix dmraid:
+* Add 0300-mdraid_tell_mainloop_if_we_make_progress.patch
+ 0301-systemd_initqueue_continue_waiting_if_any_timeout_script_makes_progress.patch
+ 302-dracut-systemd_rootfs-generator.sh_always_create_generated
+_files.patch
+ 0303-crypt_parse-crypt.sh_hide_encrypted_devices_from_systemd_timeout_warnings.patch
+
+- Parse rootflags correctly (bsc#912734)
+ * Add 0176-Parse-rootflags-correctly.patch
+- 90multipath: start multipathd after udev (bsc#903001)
+ * Add 0177-90multipath-start-multipathd-after-udev.patch
+
+- Rename patches:
+ * Remove fips-enable-aesni-intel.patch
+ * Add 0174-fips-enable-aesni-interl.patch
+ * Remove dracut-fix-bad-array-subscript.patch
+ * Add 0175-dracut-Fix-bad-array-subscript-messages.patch
+- 98systemd/rootfs-generator: Use builtins instead of 'grep'
+ (bnc#897252)
+ * Add 0167-98systemd-rootfs-generator-Use-builtins-instead-of-g.patch
+- Enabled Warning for failed kernel modules per default (bnc#886839)
+ * Add 0169-Enabled-Warning-for-failed-kernel-modules-per-defaul.patch
+- log dracut command line during boot process
+ * Add 0170-log-dracut-command-line-during-boot-process.patch
+- Follow symbolic links for kernel arguments (bnc#902375)
+ * Add 0173-Follow-symbolic-links-for-kernel-arguments-bnc-90237.patch
+
+- add hooks for regenerating the initrd after updating this package,
+ both mainpackage and -fips subpackage. bsc#916348
+
+- fips-enable-aesni-intel.patch: put aesni-intel.ko into the initrd for
+ FIPS usage. bsc#914126
+
+- dracut-fix-bad-array-subscript.patch: fixed "bad array subscript" messages
+ when adding kernel modules using "/etc/dracut.conf". bsc#911660
+
+* Add 0172-10i18n-module-setup.sh-For-FONT_MAP-also-check-wheth.patch
+- Fix SUSE specific initrd- vs mainline initramfs-.img
+* Add 0166-nfs-Add-ifname-dev-mac-to-boot-parameters.patch
+- Typo fix (bnc#901322)
+* Add 0168-convertrunfs-Fix-typo.patch
+- also add the cmac.ko cryptographic module to the modules (bnc#905296)
+* Add 0171-also-add-the-cmac.ko-cryptographic-module-to-the-mod.patch
+- Fix install-kernel:
+ - Call depmod (bnc#874621)
+ - add .config (bnc#897901)
+-------------------------------------------------------------------
+Sat Nov 22 18:09:35 UTC 2014 - arvidjaar@gmail.com
+
+- add 0165-Order-root-fsck-after-pre-mount.patch
+ ensure root fsck runs after dracut-pre-mount.service which calls
+ resume (bnc#906592)
+
+-------------------------------------------------------------------
+Wed Oct 15 16:07:47 UTC 2014 - trenn@suse.de
+
+- dracut-initrd-restore.patch: dracut-shutdown.service invokes
+ dracut-initramfs-restore script which will never work in
+ openSUSE because initrd images are named initrd not initramfs.
+ Patch is from: Cristian Rodríguez
+* Add 0164-Fix-initramfs-ver.img-vs-initrd-ver-in-dracut-initra.patch
+
+-------------------------------------------------------------------
+Wed Oct 8 17:29:35 UTC 2014 - spargaonkar@suse.com
+
+- Overwrite/generate modules.dep file using depmod since the file
+ modules.dep is not portable across releases (bsc#874621).
+
+-------------------------------------------------------------------
+Thu Oct 2 14:33:20 UTC 2014 - trenn@suse.de
+
+- Fix install-kernel with xen for self build kernels to show up in grub2
+ properly (bsc#897901)
+* Modify dracut-installkernel (source file)
+- Fix foreign fonts in plymouth and console (bnc#897972)
+* Add 0163-Install-etc-sysconfig-console-to-see-specific-fonts.patch
+
+-------------------------------------------------------------------
+Wed Sep 24 16:21:11 UTC 2014 - trenn@suse.de
+
+- Add ip= and root=nfs.. to dracut internal cmdline to make nfsroot working
+ (bnc#896464)
+* Add 0160-nfs-Add-ip-.-and-root-nfs.-parameters-to-internal-dr.patch
+- Fix error message in case there is no internal dracut cmdline added
+ Simple fix
+* Add 0161-Fix-error-message-when-there-are-no-internal-kernel-.patch
+- Request DHCP lease instead of getting/applying the offer
+ No bug number, but Pawel rated this high prio. This should hit SLE12 still.
+* Add 0162-network-Request-DHCP-lease-instead-of-getting-applyi.patch
+
+-------------------------------------------------------------------
+Mon Sep 22 13:33:11 UTC 2014 - trenn@suse.de
+
+- Try to load xennet driver in network module (if loaded).
+ bnc#896464, bnc#896259
+* Add 0159-network-Try-to-load-xennet.patch
+
+-------------------------------------------------------------------
+Thu Sep 11 13:36:03 UTC 2014 - trenn@suse.de
+
+- dracut.usage.asc: Remove distro specific help from manpage (bnc#895363)
+*Add 0156-dracut.usage.asc-Remove-distro-specific-help-from-ma.patch
+- Add /boot/zipl to host devs if it is a mount point (bnc#892187)
+*Add 0157-Add-boot-zipl-to-host-devs-if-it-is-a-mount-point.patch
+- Add SUSE kernel module dependencies (in /etc/modprobe.d/*) (bnc#895331)
+*Add 0158-Add-SUSE-kernel-module-dependencies-in-etc-modprobe..patch
+-------------------------------------------------------------------
+Thu Sep 4 12:59:27 UTC 2014 - trenn@suse.de
+
+- Network module may take quite a lot of initrd space. Do not add it
+ unconditionally (bnc#892851)
+* Add 0153-Only-add-network-module-on-request-and-on-dependenci.patch
+- S390x can do s2disk, allow resume module there
+ (bnc#889795)
+* Add 0154-resume-Also-allow-this-module-on-S390-again-s2disk-c.patch
+- Harden iscsi parameter checking. No bug report, but this problem
+ was found during multipath testing and happens with 2 or more
+ iscsi devices.
+* Add 0155-iscsi-iscsi.initiator-and-others-can-and-must-only-s.patch
+
+-------------------------------------------------------------------
+Fri Aug 29 14:27:49 UTC 2014 - trenn@suse.de
+
+- Do not blindly try to touch the logfile (bnc#893219)
+* Add 0146-dracut.sh-corrected-logfile-check.patch
+- Only fix UUID= fstab parsing
+* Add 0147-dracut.sh-Fix-UUID-fstab-parsing-in-case-mount-optio.patch
+- Also fix other parsing syntax in fstab like LABEL=
+* Add 0148-dracut.sh-Fix-LABEL-and-other-fstab-syntax.patch
+- Fix up some bugs from previous commit
+* Add 0149-dracut.sh-Fix-fstab-parsing-again.patch
+- bnc#893615
+* Add 0150-Find-kernel-modules-in-extra-and-weak-updates-path-a.patch
+- pixz does need too much memory, go back to xz in a conservative way
++++ 1442 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:13.2:Update/.dracut.4092.new/dracut.changes
New:
----
0011-Correct-paths-for-openSUSE.patch
0012-Check-for-plymouth-lib-directories.patch
0013-mkinitrd-suse-do-not-update-bootloader-if-no-kernel-.patch
0014-Update-dracut-manpage-for-GRUB-Legacy-and-GRUB2.patch
0015-40network-replace-dhclient-with-wickedd-dhcp-supplic.patch
0016-Add-new-s390x-specific-rule-files.patch
0017-45ifcfg-use-distro-specific-scripts.patch
0018-mkinitrd-suse-Fix-whitespaces-when-adding-drivers.patch
0019-40network-Fix-race-condition-when-wait-for-networks.patch
0020-00warpclock-Set-correct-timezone.patch
0021-95dcssblk-Add-new-module-for-DCSS-block-devices.patch
0022-95udev-rules-add-persistent-network-rule.patch
0023-systemd-always-tries-to-load-autofs4.patch
0024-Fixup-mdraid-setup.patch
0025-95udev-rules-Add-59-scsi-sg_utils.rules.patch
0026-90multipath-add-67-kpartx-compat.rules.patch
0027-90multipath-install-dracut-specific-service-file.patch
0028-95udev-rules-Include-correct-sg3_utils-rules.patch
0029-90multipath-install-correct-multipath-rules.patch
0030-95iscsi-Autodetect-iSCSI-firmware.patch
0031-90multipath-Fixup-service-file-for-booting.patch
0032-mkinitrd-suse.sh-Use-hostonly-and-hostonly-cmdline-c.patch
0033-95iscsi-Set-correct-iscsi_started-value-for-iSCSI-fi.patch
0034-dracut-Do-not-stop-installing-drivers-if-one-fails.patch
0035-Introduce-force-drivers-parameter-and-force_drivers-.patch
0036-95fcoe-Store-current-configuration-in-dracut-cmdline.patch
0037-95fcoe-update-fcoe-interface-check.patch
0038-95fcoe-start-lldpad-separately.patch
0039-Remove-force-parameter-from-mkinitrd.patch
0040-95fcoe-skip-VLAN-devices-in-fcoe-up.patch
0041-mkinitd-suse-remove-hostonly-and-hostonly-cmdline.patch
0042-Enhance-suse.conf-example-with-SUSE-specific-setting.patch
0043-40network-always-add-network-module.patch
0044-Add-find-to-debug-binaries.patch
0045-40network-add-missing-_arch-variable-declaration.patch
0046-dracut-Do-not-wait-for-swap-device.patch
0047-95resume-skip-module-for-s390-x.patch
0048-40network-Only-enable-network-interfaces-if-explicit.patch
0049-95iscsi-Use-ip-ibft-for-ibft-autoconfiguration.patch
0050-95iscsi-strip-one-set-of-quotes-when-calling-initque.patch
0051-mkinitrd-suse-add-update-bootloader-message.patch
0052-99base-Add-chown-binary.patch
0053-01fips-fixup-loading-issues.patch
0054-95iscsi-update-commandline-printing.patch
0055-95fcoe-Only-install-fcoe-module-if-required.patch
0056-81cio_ignore-handle-cio_ignore-commandline.patch
0057-01fips-Include-some-more-hmacs.patch
0058-dracut-add-warning-when-including-unsupported-module.patch
0059-99suse-Add-SUSE-specific-initrd-parsing.patch
0060-45ifcfg-Add-SUSE-specific-write-ifcfg-file.patch
0061-45ifcfg-Fixup-error-message-in-write-ifcfg-suse.patch
0062-95iscsi-Install-libgcc_s-library.patch
0063-90multipath-Install-libgcc_s-library.patch
0064-90kernel-modules-install-scsi_dh_alua.patch
0065-95iscsi-Fixup-bnx2i-offload-booting.patch
0066-40network-always-start-netroot-in-ifup.sh.patch
0067-95fcoe-check-always-returns-255.patch
0068-95fcoe-uefi-Test-for-EFI-firmware.patch
0069-81cio_ignore-skip-module-if-cio_ignore-is-not-active.patch
0070-81cio_ignore-rewrite-module.patch
0071-Fix-non-export-of-journal-dev-boot-options.patch
0072-Also-export-root-boot-param-for-hostonly-cmdline-cas.patch
0073-Don-t-create-lots-of-empty-cmdline-files-for-hostonl.patch
0074-More-empty-cmdline-fixes.patch
0075-95dasd_rules-enable-parsing-of-rd.dasd-commandline-p.patch
0076-Correctly-set-cio_ignore-for-dynamic-s390-rules.patch
0077-90multipath-add-missing-11-dm-mpath.rules-file.patch
0078-Restore-original-IFS-value.patch
0079-95dasd_rules-fixup-rd.dasd-parsing.patch
0080-95dasd_rules-print-out-rd.dasd-commandline.patch
0081-95dasd_mod-do-not-set-module-parameters-if-dasd_cio_.patch
0082-00warpclock-check-for-sbin-hwclock.patch
0083-95zfcp_rules-Fixup-rd.zfcp-parsing.patch
0084-95rootfs-block-Correctly-terminate-commandline-param.patch
0085-95zfcp_rules-print-out-rd.zfcp-commandline-parameter.patch
0086-95zfcp_rules-Auto-generate-udev-rule-for-ipl-device.patch
0087-95dasd_rules-Auto-generate-udev-rule-for-ipl-device.patch
0088-91zipl-Add-new-module-to-update-s390x-configuration.patch
0089-40network-create-var-lib-wicked-in-ifup.sh.patch
0090-dracut-caps-Remove-whole-caps-module.patch
0091-dracut-biosdevname-In-SUSE-biosdevname-package-is-in.patch
0092-dracut-nbd-Only-complain-of-missing-binary-in-hoston.patch
0093-95iscsi-generate-commandline-for-software-iscsi.patch
0094-Implement-shortcut-ip-ifname-static-for-static-confi.patch
0095-95iscsi-use-static-configuration-for-software-iscsi.patch
0096-dracut-Fix-error-local-can-only-be-used-in-a-functio.patch
0097-Implement-rd.timeout-to-modify-the-device-timeout.patch
0098-Do-not-call-lvm-for-non-LVM-device-mapper-devices.patch
0099-90multipath-Load-device_handler-modules-early-during.patch
0100-Add-btrfs-rescue-utilities.patch
0101-Print-stored-dracut-commandline-during-initramfs-bui.patch
0102-Align-dev_unit_name-with-systemd-s-function.patch
0103-Fixup-missing-separators-in-rootfs-block-cmdline.patch
0104-Generate-fallback-mount-unit-for-root-filesystem.patch
0105-95iscsi-parse-output-from-iscsiadm-correctly.patch
0106-dracut-Enable-converting-of-directory-var-run-var-lo.patch
0107-Fixup-typo-firmare-instead-of-firmware.patch
0108-91zipl-Store-commandline-correctly.patch
0109-95dasd_rules-Store-all-devices-in-commandline.patch
0110-95zfcp_rules-Store-all-devices-in-commandline.patch
0111-90mdraid-Remove-line-for-offroot-detection.patch
0112-99base-warn-on-invalid-command-for-initqueue.patch
0113-91zipl-Install-script-as-executable.patch
0114-91zipl-Translate-ext2-3-into-ext4.patch
0115-Handle-module-alias-properly.patch
0116-Mark-scripts-as-executable.patch
0117-95dasd_rules-Enable-the-device-before-checking-devic.patch
0118-95zfcp_rules-Enable-the-device-before-checking-devic.patch
0119-Reset-IFS-variable.patch
0120-mkinitrd-suse.sh-Bail-out-with-exit-1-if-initrd-cann.patch
0121-Adjust-initramfs-kernel.img-to-SUSE-default-initrd-k.patch
0122-btrfs-btrfs-dump-super-and-btrfs-select-super-do-not.patch
0123-95zfcp_rules-fix-typo-in-module_setup.patch
0124-40network-Update-iBFT-scanning-code-to-handle-IPv6.patch
0125-40network-separate-mask-and-prefix.patch
0126-01fips-Add-drbg-module-to-force-loaded-modules.patch
0127-99base-Increase-initqueue-timeout-in-non-systemd-cas.patch
0128-90lvm-Install-dm-snapshot-module.patch
0129-Revert-commit-6ecab258710d158a7a6-and-only-do-not-wa.patch
0130-nfs-Always-add-all-kernel-modules-for-kdump.patch
0131-40network-handle-prefixed-IP-addresses-correctly.patch
0132-40network-fixup-static-network-configuration.patch
0133-Allow-multiple-configurations-per-network-interface-.patch
0134-Remove-bootdev-warning-bnc-881112.patch
0135-lvm-Fix-12819a579900b9691e2-check-for-existance-of-6.patch
0136-Revert-95udev-rules-add-persistent-network-rule.patch
0137-Switch-from-Mozilla-NSS-sha256hmac-checking-to-fipsc.patch
0138-warpclock-Do-not-use-warpclock-module-on-S390-x-hwcl.patch
0139-dracut.sh-check-for-logfile-logfile-option-and-creat.patch
0140-dracut.sh-Avoid-duplicate-devices-in-host_devs.patch
0141-iscsi-Avoid-bad-ip-route-call-on-empty-address.patch
0142-40network-Don-t-report-error-for-etc-sysconfig-netwo.patch
0143-iscsi-Fix-up-ipv6-in-brackets-iterate-over-all-possi.patch
0144-90crypt-Fixed-crypttab_contains-to-also-work-with-de.patch
0145-40network-handle-ip-ifname-static-correctly.patch
0146-dracut.sh-corrected-logfile-check.patch
0147-dracut.sh-Fix-UUID-fstab-parsing-in-case-mount-optio.patch
0148-dracut.sh-Fix-LABEL-and-other-fstab-syntax.patch
0149-dracut.sh-Fix-fstab-parsing-again.patch
0150-Find-kernel-modules-in-extra-and-weak-updates-path-a.patch
0151-Go-back-to-xz-again-pixz-may-use-too-much-memory-whi.patch
0152-Add-a-comment-to-easily-add-debug-modules-also-add-v.patch
0153-Only-add-network-module-on-request-and-on-dependenci.patch
0154-resume-Also-allow-this-module-on-S390-again-s2disk-c.patch
0155-iscsi-iscsi.initiator-and-others-can-and-must-only-s.patch
0156-dracut.usage.asc-Remove-distro-specific-help-from-ma.patch
0157-Add-boot-zipl-to-host-devs-if-it-is-a-mount-point.patch
0158-Add-SUSE-kernel-module-dependencies-in-etc-modprobe..patch
0159-network-Try-to-load-xennet.patch
0160-nfs-Add-ip-.-and-root-nfs.-parameters-to-internal-dr.patch
0161-Fix-error-message-when-there-are-no-internal-kernel-.patch
0162-network-Request-DHCP-lease-instead-of-getting-applyi.patch
0163-Install-etc-sysconfig-console-to-see-specific-fonts.patch
0164-Fix-initramfs-ver.img-vs-initrd-ver-in-dracut-initra.patch
0165-Order-root-fsck-after-pre-mount.patch
0166-nfs-Add-ifname-dev-mac-to-boot-parameters.patch
0167-98systemd-rootfs-generator-Use-builtins-instead-of-g.patch
0169-Enabled-Warning-for-failed-kernel-modules-per-defaul.patch
0171-also-add-the-cmac.ko-cryptographic-module-to-the-mod.patch
0172-i18n_add_correct_fontmaps.patch
0173-Follow-symbolic-links-for-kernel-arguments-bnc-90237.patch
0174-fips-enable-aesni-interl.patch
0175-dracut-Fix-bad-array-subscript-messages.patch
0177-90multipath-start-multipathd-after-udev.patch
0178-Restore-handling-of-c.patch
0179-qemu-add-virtio_rng-kernel-module.patch
0200-fix_nfs_with_ip_instead_of_hostname.patch
0201-modsign_fix_keyctl_install.patch
0300-mdraid_tell_mainloop_if_we_make_progress.patch
0301-systemd_initqueue_continue_waiting_if_any_timeout_script_makes_progress.patch
0302-dracut-systemd_rootfs-generator.sh_always_create_generated_files.patch
0303-crypt_parse-crypt.sh_hide_encrypted_devices_from_systemd_timeout_warnings.patch
0305-static_network_setup_return_zero.patch
dracut-037.tar.xz
dracut-installkernel
dracut.changes
dracut.spec
dracut_dmraid_use_udev.patch
dracut_v37_to_HEAD.patch
mkinitrd_setup_dummy
purge-kernels
purge-kernels.service
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ dracut.spec ++++++
++++ 671 lines (skipped)
++++++ 0011-Correct-paths-for-openSUSE.patch ++++++
From 3c3453e92ae055674bd3260a23c98d64a1f2467d Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Thu, 28 Nov 2013 10:07:59 +0100
Subject: [PATCH] Correct paths for openSUSE
openSUSE has things stored in different places, so fixup the
paths here.
Signed-off-by: Christian Rodrigues
Signed-off-by: Hannes Reinecke
---
dracut.sh | 2 +-
modules.d/98systemd/rescue.service | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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
-[[ $fw_dir ]] || fw_dir="/lib/firmware/updates /lib/firmware"
+[[ $fw_dir ]] || fw_dir="/lib/firmware/updates /lib/firmware /lib/firmware/$kernel"
[[ $tmpdir_l ]] && tmpdir="$tmpdir_l"
[[ $tmpdir ]] || tmpdir=/var/tmp
[[ $INITRD_COMPRESS ]] && compress=$INITRD_COMPRESS
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=/
-ExecStartPre=-/bin/plymouth quit
+ExecStartPre=-/usr/bin/plymouth quit
ExecStart=-/bin/sh -i -l
ExecStopPost=-/bin/rm -f -- /.console_lock
ExecStopPost=-/usr/bin/systemctl --fail --no-block default
--
1.8.4.5
++++++ 0012-Check-for-plymouth-lib-directories.patch ++++++
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
++++++ 0013-mkinitrd-suse-do-not-update-bootloader-if-no-kernel-.patch ++++++
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
++++++ 0014-Update-dracut-manpage-for-GRUB-Legacy-and-GRUB2.patch ++++++
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 <<NetworkBoot>>.
--
1.8.1.4
++++++ 0015-40network-replace-dhclient-with-wickedd-dhcp-supplic.patch ++++++
From 0aa152e662d2197f92617da4ab813fcd9be6f90f Mon Sep 17 00:00:00 2001
From: Pavel Wieczorkiewicz
Date: Mon, 7 Apr 2014 16:26:57 +0200
Subject: [PATCH] 40network: replace dhclient with wickedd-dhcp-supplicant
SLES12 is using wickedd, so we need to replace dhclient with
wickedd-dhcp-supplicant.
References: bnc#866771
Signed-off-by: Hannes Reinecke
---
modules.d/40network/dhclient-script.sh | 156 ---------------------------------
modules.d/40network/dhclient.conf | 3 -
modules.d/40network/ifup.sh | 97 ++++++++++++++++++--
modules.d/40network/kill-dhclient.sh | 17 ----
modules.d/40network/module-setup.sh | 14 +--
5 files changed, 99 insertions(+), 188 deletions(-)
delete mode 100755 modules.d/40network/dhclient-script.sh
delete mode 100644 modules.d/40network/dhclient.conf
delete mode 100755 modules.d/40network/kill-dhclient.sh
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
-
-type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
-type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh
-
-# We already need a set netif here
-netif=$interface
-
-# Huh? Interface configured?
-[ -f "/tmp/net.$netif.up" ] && exit 0
-
-setup_interface() {
- ip=$new_ip_address
- mtu=$new_interface_mtu
- mask=$new_subnet_mask
- bcast=$new_broadcast_address
- gw=${new_routers%%,*}
- domain=$new_domain_name
- search=$(printf -- "$new_domain_search")
- namesrv=$new_domain_name_servers
- hostname=$new_host_name
- lease_time=$new_dhcp_lease_time
-
- [ -f /tmp/net.$netif.override ] && . /tmp/net.$netif.override
-
- # Taken from debian dhclient-script:
- # The 576 MTU is only used for X.25 and dialup connections
- # where the admin wants low latency. Such a low MTU can cause
- # problems with UDP traffic, among other things. As such,
- # disallow MTUs from 576 and below by default, so that broken
- # MTUs are ignored, but higher stuff is allowed (1492, 1500, etc).
- if [ -n "$mtu" ] && [ $mtu -gt 576 ] ; then
- if ! ip link set $netif mtu $mtu ; then
- ip link set $netif down
- ip link set $netif mtu $mtu
- linkup $netif
- fi
- fi
-
- ip addr add $ip${mask:+/$mask} ${bcast:+broadcast $bcast} \
- valid_lft ${lease_time} preferred_lft ${lease_time} \
- dev $netif
-
- [ -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
- for s in $namesrv; do
- echo nameserver $s
- done
- fi >> /tmp/net.$netif.resolv.conf
-
- # Note: hostname can be fqdn OR short hostname, so chop off any
- # trailing domain name and explicity add any domain if set.
- [ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
-}
-
-setup_interface6() {
- domain=$new_domain_name
- search=$(printf -- "$new_domain_search")
- namesrv=$new_domain_name_servers
- hostname=$new_host_name
- [ -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 \
- ${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
- for s in $namesrv; do
- echo nameserver $s
- done
- fi >> /tmp/net.$netif.resolv.conf
-
- # Note: hostname can be fqdn OR short hostname, so chop off any
- # trailing domain name and explicity add any domain if set.
- [ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
-}
-
-case $reason in
- PREINIT)
- echo "dhcp: PREINIT $netif up"
- linkup $netif
- ;;
-
- PREINIT6)
- echo "dhcp: PREINIT $netif up"
- linkup $netif
- ;;
-
- BOUND)
- echo "dhcp: BOND setting $netif"
- unset layer2
- if [ -f /sys/class/net/$netif/device/layer2 ]; then
- read layer2 < /sys/class/net/$netif/device/layer2
- fi
- if [ "$layer2" != "0" ]; then
- if ! arping -q -D -c 2 -I $netif $new_ip_address ; then
- warn "Duplicate address detected for $new_ip_address while doing dhcp. retrying"
- exit 1
- fi
- fi
- unset layer2
- setup_interface
- set | while read line; do
- [ "${line#new_}" = "$line" ] && continue
- echo "$line"
- done >/tmp/dhclient.$netif.dhcpopts
-
- {
- echo '. /lib/net-lib.sh'
- echo "setup_net $netif"
- echo "source_hook initqueue/online $netif"
- [ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif"
- echo "rm -f -- $hookdir/initqueue/setup_net_$netif.sh"
- } > $hookdir/initqueue/setup_net_$netif.sh
-
- echo "[ -f /tmp/net.$netif.did-setup ]" > $hookdir/initqueue/finished/dhclient-$netif.sh
- >/tmp/net.$netif.up
- ;;
-
- BOUND6)
- echo "dhcp: BOND6 setting $netif"
- setup_interface6
-
- set | while read line; do
- [ "${line#new_}" = "$line" ] && continue
- echo "$line"
- done >/tmp/dhclient.$netif.dhcpopts
-
- {
- echo '. /lib/net-lib.sh'
- echo "setup_net $netif"
- echo "source_hook initqueue/online $netif"
- [ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif"
- echo "rm -f -- $hookdir/initqueue/setup_net_$netif.sh"
- } > $hookdir/initqueue/setup_net_$netif.sh
-
- echo "[ -f /tmp/net.$netif.did-setup ]" > $hookdir/initqueue/finished/dhclient-$netif.sh
- >/tmp/net.$netif.up
- ;;
- *) echo "dhcp: $reason";;
-esac
-
-exit 0
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;
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
+dhcp_apply() {
+ if [ -f /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1} ]; then
+ . /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1}
+ else
+ warn "DHCP failed";
+ return 1
+ fi
+
+ if [ -z "${IPADDR}" ] || [ -z "${INTERFACE}" ]; then
+ warn "Missing crucial DHCP variables"
+ return 1
+ fi
+
+ # Assign IP address
+ ip $1 addr add "$IPADDR" ${BROADCAST:+broadcast $BROADCAST} dev "$INTERFACE"
+
+ # Assign network route the interface is attached to
+ if [ -n "${NETWORK}" ]; then
+ ip $1 route add "$NETWORK"/"$PREFIXLEN" dev "$INTERFACE"
+ fi
+
+ # Assign provided routes
+ local r route=()
+ if [ -n "${ROUTES}" ]; then
+ for r in ${ROUTES}; do
+ route=(${r//,/ })
+ ip $1 route add "$route[0]"/"$route[1]" via "$route[2]" dev "$INTERFACE"
+ done
+ fi
+
+ # Assign provided routers
+ local g
+ if [ -n "${GATEWAYS}" ]; then
+ for g in ${GATEWAYS}; do
+ ip $1 route add default via "$g" dev "$INTERFACE" && break
+ done
+ fi
+
+ # Setup hostname
+ [ -n "${HOSTNAME}" ] && hostname "$HOSTNAME"
+
+ # If nameserver= has not been specified, use what dhcp provides
+ if [ ! -s /tmp/net.$netif.resolv.conf ]; then
+ if [ -n "${DNSDOMAIN}" ]; then
+ echo domain "${DNSDOMAIN}"
+ fi >> /tmp/net.$netif.resolv.conf
+
+ if [ -n "${DNSSEARCH}" ]; then
+ echo search "${DNSSEARCH}"
+ fi >> /tmp/net.$netif.resolv.conf
+
+ if [ -n "${DNSSERVERS}" ] ; then
+ for s in ${DNSSERVERS}; do
+ echo nameserver "$s"
+ done
+ fi >> /tmp/net.$netif.resolv.conf
+ fi
+ [ -e /tmp/net.$netif.resolv.conf ] && \
+ cp -f /tmp/net.$netif.resolv.conf /etc/resolv.conf
+
+ info "DHCP is finished successfully"
+ return 0
+}
+
# Run dhclient
do_dhcp() {
# dhclient-script will mark the netif up and generate the online
# event for nfsroot
# XXX add -V vendor class and option parsing per kernel
- [ -e /tmp/dhclient.$netif.pid ] && return 0
+ [ -f /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1} ] && return 0
+
+ info "Preparation for DHCP transaction"
+
+ local dhclient=''
+ if [ "$1" = "-4" ] ; then
+ dhclient="wickedd-dhcp4"
+ elif [ "$1" = "-6" ] ; then
+ dhclient="wickedd-dhcp6"
+ fi
+
+ # Address changed
+ ip $1 addr flush dev "$netif"
if ! iface_has_link $netif; then
- echo "No carrier detected"
- return 1
+ warn "No carrier detected"
+ warn "Trying to set $netif up..."
+ ip $1 link set dev "$netif" up
+ if ! iface_has_link $netif; then
+ warn "Failed..."
+ return 1
+ fi
fi
+
echo "Starting dhcp for interface $netif"
- dhclient "$@" -1 -q -cf /etc/dhclient.conf -pf /tmp/dhclient.$netif.pid -lf /tmp/dhclient.$netif.lease $netif \
- || echo "dhcp failed"
+ $dhclient --test $netif > /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1}
+ dhcp_apply $1 || return $?
+
+ echo $netif > /tmp/setup_net_${netif}.ok
+ return 0
}
load_ipv6() {
@@ -226,8 +311,6 @@ if [ -e /tmp/team.info ]; then
fi
fi
-# XXX need error handling like dhclient-script
-
if [ -e /tmp/bridge.info ]; then
. /tmp/bridge.info
# start bridge if necessary
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
- read PID < $f;
- kill $PID >/dev/null 2>&1
-done
-
-sleep 0.1
-
-for f in /tmp/dhclient.*.pid; do
- [ -e $f ] || continue
- read PID < $f;
- kill -9 $PID >/dev/null 2>&1
-done
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"
+
# called by dracut
check() {
local _program
- require_binaries ip arping dhclient || return 1
+ require_binaries ip arping $WICKEDD_DHCP_PATH/wickedd-dhcp4 $WICKEDD_DHCP_PATH/wickedd-dhcp6 || return 1
return 255
}
@@ -72,16 +75,18 @@ installkernel() {
# called by dracut
install() {
local _arch _i _dir
- inst_multiple ip arping dhclient sed
+ inst_multiple ip arping hostname sed
inst_multiple -o ping ping6
inst_multiple -o brctl
inst_multiple -o teamd teamdctl teamnl
inst_simple /etc/libnl/classid
+ inst_simple "$WICKEDD_DHCP_PATH/wickedd-dhcp4" "/usr/sbin/wickedd-dhcp4"
+ inst_simple "$WICKEDD_DHCP_PATH/wickedd-dhcp6" "/usr/sbin/wickedd-dhcp6"
+ inst_libdir_file "libwicked*.so.*"
+ inst_libdir_file "libdbus-1.so.*"
inst_script "$moddir/ifup.sh" "/sbin/ifup"
inst_script "$moddir/netroot.sh" "/sbin/netroot"
- inst_script "$moddir/dhclient-script.sh" "/sbin/dhclient-script"
inst_simple "$moddir/net-lib.sh" "/lib/net-lib.sh"
- inst_simple "$moddir/dhclient.conf" "/etc/dhclient.conf"
inst_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 +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"
- inst_hook cleanup 10 "$moddir/kill-dhclient.sh"
_arch=$(uname -m)
--
1.8.4.5
++++++ 0016-Add-new-s390x-specific-rule-files.patch ++++++
From 7995f23a106e28afa0204b5eca68671cb514b1d9 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Tue, 21 Jan 2014 14:32:09 +0100
Subject: [PATCH] Add new s390x-specific rule files
With the new s390x configuration tool the naming of the udev
rules files have changed. So add these to the existing ones
to be compatible with existing and new installations.
References: bnc#856585
Signed-off-by: Hannes Reinecke
---
modules.d/95dasd_rules/module-setup.sh | 4 ++--
modules.d/95zfcp_rules/module-setup.sh | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
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
- require_binaries dasd_configure /usr/lib/udev/collect || return 1
+ require_binaries /usr/lib/udev/collect || return 1
return 0
}
@@ -18,10 +18,10 @@ depends() {
# called by dracut
install() {
- inst_multiple /usr/lib/udev/collect
inst_hook cmdline 30 "$moddir/parse-dasd.sh"
if [[ $hostonly ]] ; then
inst_rules_wildcard 51-dasd-*.rules
+ inst_rules_wildcard 41-s390x-dasd-*.rules
fi
inst_rules 59-dasd.rules
}
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
++++++ 0017-45ifcfg-use-distro-specific-scripts.patch ++++++
From 2bddf461e38b952a79e31650ba828a7ee506cbe9 Mon Sep 17 00:00:00 2001
From: Pawel Wieczorkiewicz
Date: Tue, 8 Apr 2014 08:48:27 +0200
Subject: [PATCH] 45ifcfg: use distro-specific scripts
Detect the system flavor and write the ifcfg files accordingly.
- Do not move ifcfg to -suse and -redhat files to avoid re-diffing after
each upgrade. Handle this in the spec file and a separate
write-ifcfg-suse.sh source file
Signed-off-by: Hannes Reinecke
Modified-by: Thomas Rennigner
---
modules.d/40network/ifup.sh | 1 +
modules.d/45ifcfg/module-setup.sh | 8 +++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
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 $?
+ echo $netif > /tmp/net.${netif}.did-setup
echo $netif > /tmp/setup_net_${netif}.ok
return 0
}
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() {
- [[ -d /etc/sysconfig/network-scripts ]] && return 0
+ local link=$(readlink $moddir/write-ifcfg.sh)
+ [[ "$link" = "write-ifcfg-suse.sh" ]] && \
+ [[ -d /etc/sysconfig/network ]] && \
+ return 0
+ [[ "$link" = "write-ifcfg-redhat.sh" ]] && \
+ [[ -d /etc/sysconfig/network-scripts ]] && \
+ return 0
return 255
}
--
1.8.4.5
++++++ 0018-mkinitrd-suse-Fix-whitespaces-when-adding-drivers.patch ++++++
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
++++++ 0019-40network-Fix-race-condition-when-wait-for-networks.patch ++++++
From 330bb44b7773c7b861a6aaa32d4524c783a162f0 Mon Sep 17 00:00:00 2001
From: Pawel Wieczorkiewicz
Date: Tue, 8 Apr 2014 08:50:55 +0200
Subject: [PATCH] 40network: Fix race condition when wait for networks
If no network related params are specific, but rd.neednet=1 is set,
the default initqueue action is to wait until one of the network
interfaces is marked as setup properly.
This also help with initqueue's race condition when the network interface
shows upd late
References: bnc#866771
Signed-off-by: Hannes Reinecke
---
modules.d/40network/net-genrules.sh | 3 +++
1 file changed, 3 insertions(+)
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
+ if [ "$NEEDNET" = "1" ]; then
+ echo "[ -f /tmp/net.*.did-setup ]" >$hookdir/initqueue/finished/wait-network.sh
+ fi
fi
# if you change the name of "90-net.rules", also change modules.d/80cms/cmssetup.sh
--
1.8.1.4
++++++ 0020-00warpclock-Set-correct-timezone.patch ++++++
From 8792c2c46d3841ea11b9bd30e388eaeb64549fdc Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Thu, 5 Dec 2013 09:29:28 +0100
Subject: [PATCH] 00warpclock: Set correct timezone
Add module for setting correct timezone.
References: bnc#830060
Signed-off-by: Hannes Reinecke
---
modules.d/00warpclock/module-setup.sh | 22 ++++++++++++++++++++++
modules.d/00warpclock/warpclock.sh | 9 +++++++++
2 files changed, 31 insertions(+)
create mode 100755 modules.d/00warpclock/module-setup.sh
create mode 100755 modules.d/00warpclock/warpclock.sh
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() {
+ [ -e /etc/localtime -a -e /etc/adjtime ]
+}
+
+# called by dracut
+depends() {
+ return 0
+}
+
+# called by dracut
+install() {
+ inst /usr/share/zoneinfo/UTC
+ inst /etc/localtime
+ inst /etc/adjtime
+ inst_hook pre-trigger 00 "$moddir/warpclock.sh"
+ inst /sbin/hwclock
+}
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
+
+if test -e /etc/adjtime ; then
+ while read line ; do
+ if test "$line" = LOCAL ; then
+ hwclock --systz
+ fi
+ done < /etc/adjtime
+fi
--
1.8.1.4
++++++ 0021-95dcssblk-Add-new-module-for-DCSS-block-devices.patch ++++++
From c4a980a8fa7a2a9d5e25063b0d5b5070e59aa2cc Mon Sep 17 00:00:00 2001
From: Thomas Renninger
Date: Tue, 8 Apr 2014 08:53:59 +0200
Subject: [PATCH] 95dcssblk: Add new module for DCSS block devices
Add s390 dcssblk driver and introduce rd.dcssblk= to pass mounts
that should get activated at initrd stage.
References: FATE#308263
Signed-off-by: Hannes Reinecke
---
modules.d/95dcssblk/module-setup.sh | 28 ++++++++++++++++++++++++++++
modules.d/95dcssblk/parse-dcssblk.sh | 8 ++++++++
2 files changed, 36 insertions(+)
create mode 100755 modules.d/95dcssblk/module-setup.sh
create mode 100755 modules.d/95dcssblk/parse-dcssblk.sh
diff --git a/modules.d/95dcssblk/module-setup.sh b/modules.d/95dcssblk/module-setup.sh
new file mode 100755
index 0000000..11e3849
--- /dev/null
+++ b/modules.d/95dcssblk/module-setup.sh
@@ -0,0 +1,28 @@
+#!/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() {
+ local _arch=$(uname -m)
+ [ "$_arch" = "s390" -o "$_arch" = "s390x" ] || return 1
+ return 0
+}
+
+# called by dracut
+installkernel() {
+ if [ -e /sys/devices/dcssblk/*/block/dcssblk* ];then
+ hostonly='' instmods dcssblk
+ fi
+}
+
+# called by dracut
+install() {
+ inst_hook cmdline 30 "$moddir/parse-dcssblk.sh"
+ # If there is a config file which contains avail (best only of root device)
+ # disks to activate add it and use it during boot -> then we do not need
+ # a kernel param anymore
+ #if [[ $hostonly ]]; then
+ # inst /etc/dcssblk.conf
+ #fi
+}
diff --git a/modules.d/95dcssblk/parse-dcssblk.sh b/modules.d/95dcssblk/parse-dcssblk.sh
new file mode 100755
index 0000000..8f17440
--- /dev/null
+++ b/modules.d/95dcssblk/parse-dcssblk.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+dcssblk_arg=$(getarg rd.dcssblk=)
+if [ $? == 0 ];then
+ info "Loading dcssblk segments=$dcssblk_arg"
+ modprobe dcssblk segments=$dcssblk_arg
+fi
--
1.8.1.4
++++++ 0022-95udev-rules-add-persistent-network-rule.patch ++++++
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
++++++ 0023-systemd-always-tries-to-load-autofs4.patch ++++++
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
++++++ 0024-Fixup-mdraid-setup.patch ++++++
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
++++++ 0025-95udev-rules-Add-59-scsi-sg_utils.rules.patch ++++++
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
++++++ 0026-90multipath-add-67-kpartx-compat.rules.patch ++++++
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
++++++ 0027-90multipath-install-dracut-specific-service-file.patch ++++++
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
++++++ 0028-95udev-rules-Include-correct-sg3_utils-rules.patch ++++++
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
++++++ 0029-90multipath-install-correct-multipath-rules.patch ++++++
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
++++++ 0030-95iscsi-Autodetect-iSCSI-firmware.patch ++++++
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
++++++ 0031-90multipath-Fixup-service-file-for-booting.patch ++++++
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
++++++ 0032-mkinitrd-suse.sh-Use-hostonly-and-hostonly-cmdline-c.patch ++++++
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
++++++ 0033-95iscsi-Set-correct-iscsi_started-value-for-iSCSI-fi.patch ++++++
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
++++++ 0034-dracut-Do-not-stop-installing-drivers-if-one-fails.patch ++++++
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
++++++ 0035-Introduce-force-drivers-parameter-and-force_drivers-.patch ++++++
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** _<list of kernel modules>_::
+ 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** _<list of kernel modules>_::
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
++++++ 0036-95fcoe-Store-current-configuration-in-dracut-cmdline.patch ++++++
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
++++++ 0037-95fcoe-update-fcoe-interface-check.patch ++++++
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
++++++ 0038-95fcoe-start-lldpad-separately.patch ++++++
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
++++++ 0039-Remove-force-parameter-from-mkinitrd.patch ++++++
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
++++++ 0040-95fcoe-skip-VLAN-devices-in-fcoe-up.patch ++++++
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
++++++ 0041-mkinitd-suse-remove-hostonly-and-hostonly-cmdline.patch ++++++
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
++++++ 0042-Enhance-suse.conf-example-with-SUSE-specific-setting.patch ++++++
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
++++++ 0043-40network-always-add-network-module.patch ++++++
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
++++++ 0044-Add-find-to-debug-binaries.patch ++++++
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
++++++ 0045-40network-add-missing-_arch-variable-declaration.patch ++++++
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
++++++ 0046-dracut-Do-not-wait-for-swap-device.patch ++++++
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
++++++ 0047-95resume-skip-module-for-s390-x.patch ++++++
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
++++++ 0048-40network-Only-enable-network-interfaces-if-explicit.patch ++++++
From baf3a57c1fc8d2641c075e2dcdda44f5b26747dc Mon Sep 17 00:00:00 2001
From: Pawel Wieczorkiewicz
Date: Tue, 27 May 2014 11:48:43 +0200
Subject: [PATCH] 40network: Only enable network interfaces if explicitly
requested
Currently all available network interfaces are started whenever
40network is pulled in. This causes massive delays during bootup.
This patch modifies the behaviour to start interfaces only if
rd.neednet is specified.
References: bnc#879038
Signed-off-by: Pawel Wieczorkiewicz
---
modules.d/40network/net-genrules.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
- echo "$cond, $runcmd" > /etc/udev/rules.d/91-default-net.rules
if [ "$NEEDNET" = "1" ]; then
+ echo "$cond, $runcmd" > /etc/udev/rules.d/91-default-net.rules
echo "[ -f /tmp/net.*.did-setup ]" >$hookdir/initqueue/finished/wait-network.sh
fi
fi
--
1.8.4.5
++++++ 0049-95iscsi-Use-ip-ibft-for-ibft-autoconfiguration.patch ++++++
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
++++++ 0050-95iscsi-strip-one-set-of-quotes-when-calling-initque.patch ++++++
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
++++++ 0051-mkinitrd-suse-add-update-bootloader-message.patch ++++++
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
++++++ 0052-99base-Add-chown-binary.patch ++++++
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
++++++ 0053-01fips-fixup-loading-issues.patch ++++++
From c0fd9c31e9044b99edb850c4af229887b616e828 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Mon, 2 Jun 2014 15:02:04 +0200
Subject: [PATCH] 01fips: fixup loading issues
Adjust the FIPS module list to avoid loading issues
References: bnc#875855
Signed-off-by: Marcus Meissner
---
modules.d/01fips/fips.sh | 12 ++++++++++++
modules.d/01fips/module-setup.sh | 12 +++++++++---
2 files changed, 21 insertions(+), 3 deletions(-)
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
From b4d9257babaea468c8ea8510350c30df509e2184 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
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
++++++ 0055-95fcoe-Only-install-fcoe-module-if-required.patch ++++++
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
++++++ 0056-81cio_ignore-handle-cio_ignore-commandline.patch ++++++
From 3e263f6bfa21d9b5b102dfa73d0bdf2c17de41dc Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Wed, 4 Jun 2014 13:27:41 +0200
Subject: [PATCH] 81cio_ignore: handle cio_ignore commandline
References: bnc#874902
Signed-off-by: Thomas Renninger
---
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..a812649
--- /dev/null
+++ b/modules.d/81cio_ignore/module-setup.sh
@@ -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
+
+# called by dracut
+check() {
+# do not add this module by default
+ 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 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
+ 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
+}
+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..5f7aa58
--- /dev/null
+++ 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
+
+ZIPL_DEV="$(getarg rd.zipl_dasd)"
+ZIPL_DIR=/tmp/zipl
+CIO_REMOVE_LIST=$ZIPL_DIR/active_devices.txt
+
+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
++++++ 0057-01fips-Include-some-more-hmacs.patch ++++++
From b53bc39cb35dda350b0629036a3eb87d90debe56 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Thu, 12 Jun 2014 09:26:20 +0200
Subject: 01fips: Include some more hmacs
Include the several hmacs needed for FIPS integrity checking
of cryptsetup, libgcrypt, libfipscheck1. Also add the openssl
HMACs too as someone else seems to use those too.
Signed-off-by: Marcus Meissner
---
modules.d/01fips/module-setup.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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 \
+ .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
# we do not use prelink at SUSE
#inst_multiple -o prelink
--
1.8.4.5
++++++ 0058-dracut-add-warning-when-including-unsupported-module.patch ++++++
From 5473e4b5d8d9bbf9bd995dff815647de0ed1b30b Mon Sep 17 00:00:00 2001
From: Jeff Mahoney
Date: Thu, 12 Jun 2014 09:30:01 +0200
Subject: dracut: add warning when including unsupported modules
With self-built kernels (often used for debugging by both internal and
external development), it's a common mistake to not set up
Module.supported properly. As a result, modules can end up without the
supported tag. "make install" will happily build an initramfs, via
dracut, that will not boot due to the kernel refusing to load the
unsupported modules.
This patch adds a --check-supported option to check whether all modules
added to the initramfs are marked supported and warn if they are not.
It will not cause the initramfs creation to fail.
The option is intended to be called via /sbin/installkernel, which will
check to see if the kernel has CONFIG_SUSE_KERNEL_SUPPORTED before using
the option.
Signed-off-by: Jeff Mahoney
---
dracut-functions.sh | 21 +++++++++++++++++++++
dracut.8.asc | 11 +++++++++++
dracut.sh | 5 +++++
3 files changed, 37 insertions(+)
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
}
+check_supported_kmod() {
+ kmod=$1
+ supported=$(modinfo -k $kernel -F supported $kmod 2>/dev/null)
+ case "$supported" in
+ yes|external) ;;
+ *) dwarn "Module \"$(basename $kmod)\" is unsupported. This may cause" \
+ "problems while booting." ;;
+ esac
+}
+
+
# Install a single kernel module along with any firmware it may require.
# $1 = full path to kernel module to install
install_kmod_with_fw() {
@@ -1462,6 +1473,10 @@ install_kmod_with_fw() {
fi
fi
done
+
+ if [[ "$check_supported" = "yes" ]]; then
+ check_supported_kmod $1
+ fi
return 0
}
@@ -1508,6 +1523,12 @@ dracut_kernel_post() {
inst_simple "$_modpath" "/lib/modules/$kernel/${_destpath}" || exit $?
done < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep"
fi
+
+ if [[ $check_supported ]]; then
+ while read _modpath; do
+ check_supported_kmod $_modpath
+ done < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep"
+ fi
) &
_pid=$(jobs -p | while read a ; do printf ":$a";done)
_pid=${_pid##*:}
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
+ supported by the vendor before allowing it to be loaded. On these
+ systems, it's possible to generate an initramfs image that will
+ fail to boot due to unsupported modules being refused. This
+ option enables a check that will issue a warning if a module built
+ without the support option enabled is encountered while building
+ the image. Use of this option assumes that the kernel requires
+ supported modules and will issue a warning on every module if used
+ otherwise.
+
FILES
-----
_/var/log/dracut.log_::
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.
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 \
-- "$@")
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" ;;
--) shift; break;;
--
1.8.4.5
++++++ 0059-99suse-Add-SUSE-specific-initrd-parsing.patch ++++++
From 1202041ec3f7b2d8dd58999e72a309c9fba9069f Mon Sep 17 00:00:00 2001
From: Thomas Renninger
Date: Wed, 4 Jun 2014 12:56:50 +0200
Subject: 99suse: Add SUSE-specific initrd parsing
Add a module to implement mkinitrd-compatible kernel parameter parsing
Signed-off-by: Thomas Renninger
---
modules.d/99suse/module-setup.sh | 8 ++++++
modules.d/99suse/parse-suse-initrd.sh | 51 +++++++++++++++++++++++++++++++++++
2 files changed, 59 insertions(+)
create mode 100755 modules.d/99suse/module-setup.sh
create mode 100755 modules.d/99suse/parse-suse-initrd.sh
diff --git a/modules.d/99suse/module-setup.sh b/modules.d/99suse/module-setup.sh
new file mode 100755
index 0000000..06afba8
--- /dev/null
+++ b/modules.d/99suse/module-setup.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+# module-setup.sh for openSUSE / SLE initrd parameters conversion
+
+install() {
+ inst_hook cmdline 99 "$moddir/parse-suse-initrd.sh"
+}
diff --git a/modules.d/99suse/parse-suse-initrd.sh b/modules.d/99suse/parse-suse-initrd.sh
new file mode 100755
index 0000000..542171b
--- /dev/null
+++ b/modules.d/99suse/parse-suse-initrd.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+# convert openSUSE / SLE initrd command lines into dracut ones
+# linuxrc=trace shell=1 sysrq=yes sysrq=1-9 journaldev mduuid
+# TargetAddress TargetPort TargetName
+
+# sysrq
+sysrq=$(getarg sysrq)
+if [ "$sysrq" ] && [ "$sysrq" != "no" ]; then
+ echo 1 > /proc/sys/kernel/sysrq
+ case "$sysrq" in
+ 0|1|2|3|4|5|6|7|8|9)
+ echo $sysrq > /proc/sysrq-trigger
+ ;;
+ esac
+fi
+
+# debug
+if getarg linuxrc=trace; then
+ echo "rd.debug rd.udev.debug" >> /etc/cmdline.d/99-suse.conf
+ unset CMDLINE
+fi
+
+# debug shell
+if getargbool 0 shell; then
+ echo "rd.break" >> /etc/cmdline.d/99-suse.conf
+ unset CMDLINE
+fi
+
+# journaldev
+journaldev=$(getarg journaldev)
+if [ -n "$journaldev" ]; then
+ echo "root.journaldev=$journaldev" >> /etc/cmdline.d/99-suse.conf
+ unset CMDLINE
+fi
+
+# mduuid
+mduuid=$(getarg mduuid)
+if [ -n "$mduuid"]; then
+ echo "rd.md.uuid=$mduuid" >> /etc/cmdline.d/99-suse.conf
+ unset CMDLINE
+fi
+
+# TargetAddress / TargetPort / TargetName
+TargetAddress=$(getarg TargetAddress)
+TargetPort=$(getarg TargetPort)
+TargetName=$(getarg TargetName)
+
+if [ -n "$TargetAddress" -a -n "$TargetName" ]; then
+ echo "netroot=iscsi:$TargetAddress::$TargetPort::$TargetName" >> /etc/cmdline.d/99-suse.conf
+ unset CMDLINE
+fi
--
1.8.4.5
++++++ 0060-45ifcfg-Add-SUSE-specific-write-ifcfg-file.patch ++++++
From b22afa48bc111794259230cf3144262c719b55f5 Mon Sep 17 00:00:00 2001
From: Pawel Wieczorkiewicz
Date: Wed, 4 Jun 2014 13:00:06 +0200
Subject: 45ifcfg: Add SUSE-specific write-ifcfg file
Signed-off-by: Pawel Wieczorkiewicz
---
modules.d/45ifcfg/write-ifcfg-suse.sh | 183 ++++++++++++++++++++++++++++++++++
1 file changed, 183 insertions(+)
create mode 100755 modules.d/45ifcfg/write-ifcfg-suse.sh
diff --git a/modules.d/45ifcfg/write-ifcfg-suse.sh b/modules.d/45ifcfg/write-ifcfg-suse.sh
new file mode 100755
index 0000000..4b6350f
--- /dev/null
+++ b/modules.d/45ifcfg/write-ifcfg-suse.sh
@@ -0,0 +1,183 @@
+#!/bin/sh
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+# NFS root might have reached here before /tmp/net.ifaces was written
+udevadm settle --timeout=30
+
+if [ -e /tmp/bridge.info ]; then
+ . /tmp/bridge.info
+fi
+
+if [ -e /tmp/vlan.info ]; then
+ . /tmp/vlan.info
+fi
+
+mkdir -m 0755 -p /tmp/ifcfg/
+mkdir -m 0755 -p /tmp/ifcfg-leases/
+
+get_vid() {
+ case "$1" in
+ vlan*)
+ echo ${1#vlan}
+ ;;
+ *.*)
+ echo ${1##*.}
+ ;;
+ esac
+}
+
+for netup in /tmp/net.*.did-setup ; do
+ [ -f $netup ] || continue
+
+ netif=${netup%%.did-setup}
+ netif=${netif##*/net.}
+ [ -e /tmp/ifcfg/ifcfg-$netif ] && continue
+ unset bridge
+ unset bond
+ unset bondslaves
+ unset bondname
+ unset bondoptions
+ unset uuid
+ unset ip
+ unset gw
+ unset mtu
+ unset mask
+ unset macaddr
+ unset slave
+ unset ethname
+ [ -e /tmp/bond.${netif}.info ] && . /tmp/bond.${netif}.info
+
+ uuid=$(cat /proc/sys/kernel/random/uuid)
+ if [ "$netif" = "$bridgename" ]; then
+ bridge=yes
+ elif [ "$netif" = "$bondname" ]; then
+ # $netif can't be bridge and bond at the same time
+ bond=yes
+ fi
+ if [ "$netif" = "$vlanname" ]; then
+ vlan=yes
+ fi
+ cat /sys/class/net/$netif/address > /tmp/net.$netif.hwaddr
+ {
+ echo "# Generated by dracut initrd"
+ echo "NAME='$netif'"
+ if [ -f /tmp/net.$netif.has_ibft_config ]; then
+ echo "STARTMODE='nfsroot'"
+ else
+ echo "STARTMODE='auto'"
+ fi
+
+ local bootproto="static"
+ if [ -f /tmp/leaseinfo.${netif}.dhcp.ipv6 ]; then
+ bootproto="dhcp6"
+ fi
+ if [ -f /tmp/leaseinfo.${netif}.dhcp.ipv4 ]; then
+ if [ "$bootproto" = "dhcp6" ]; then
+ bootproto="dhcp"
+ else
+ bootproto="dhcp4"
+ fi
+ fi
+
+ echo "BOOTPROTO='$bootproto'"
+
+ if [ "$bootproto" = "static" ]; then
+ # If we've booted with static ip= lines, the override file is there
+ [ -e /tmp/net.$netif.override ] && . /tmp/net.$netif.override
+ echo "IPADDR='$ip'"
+ if [ -n "$mask" ]; then
+ if strstr "$mask" "."; then
+ echo "NETMASK='$mask'"
+ else
+ echo "PREFIXLEN='$mask'"
+ fi
+ fi
+ if [ -n "$gw" ]; then
+ echo "GATEWAY='$gw'"
+ fi
+ fi
+ [ -n "$mtu" ] && echo "MTU='$mtu'"
+ } > /tmp/ifcfg/ifcfg-$netif
+
+ # bridge needs different things written to ifcfg
+ if [ -z "$bridge" ] && [ -z "$bond" ] && [ -z "$vlan" ]; then
+ # standard interface
+ {
+ if [ -n "$macaddr" ]; then
+ echo "LLADDR='$macaddr'"
+ else
+ echo "LLADDR='$(cat /sys/class/net/$netif/address)'"
+ fi
+ echo "INTERFACETYPE='Ethernet'"
+ } >> /tmp/ifcfg/ifcfg-$netif
+ fi
+
+ if [ -n "$vlan" ]; then
+ {
+ echo "INTERFACETYPE='Vlan'"
+ echo "VLAN_ID='$(get_vid $vlanname)'"
+ echo "ETHERDEVICE='$phydevice'"
+ } >> /tmp/ifcfg/ifcfg-$netif
+ fi
+
+ if [ -n "$bond" ] ; then
+ # bond interface
+ {
+ # This variable is an indicator of a bond interface for initscripts
+ echo "BONDING_MASTER='yes'"
+ echo "BONDING_MODULE_OPTS='$bondoptions'"
+ echo "INTERFACETYPE='Bond'"
+ } >> /tmp/ifcfg/ifcfg-$netif
+
+ local i=0
+ for slave in $bondslaves ; do
+ echo "BONDING_SLAVE_$i='$slave'" >> /tmp/ifcfg/ifcfg-$netif
+ i=$((i+1))
+ # write separate ifcfg file for the raw eth interface
+ {
+ echo "# Generated by dracut initrd"
+ echo "NAME='$slave'"
+ echo "INTERFACETYPE='Ethernet'"
+ echo "STARTMODE='hotplug'"
+ echo "BOOTPROTO='none'"
+ echo "# ETHTOOL=''"
+ } >> /tmp/ifcfg/ifcfg-$slave
+ done
+ fi
+
+ if [ -n "$bridge" ] ; then
+ # bridge
+ {
+ echo "INTERFACETYPE='Bridge'"
+ echo "BRIDGE='yes'"
+ echo "BRIDGE_STP='off'"
+ echo "BRIDGE_FORWARDDELAY='0'"
+ echo -n "BRIDGE_PORTS='"
+
+ } >> /tmp/ifcfg/ifcfg-$netif
+
+ if [ "$ethname" = "$bondname" ] ; then
+ {
+ for slave in $bondslaves ; do
+ echo -n "$bondname "
+ done
+ echo "'"
+ } >> /tmp/ifcfg/ifcfg-$netif
+ else
+ echo "$ethname'" >> /tmp/ifcfg/ifcfg-$netif
+ fi
+ fi
+done
+
+# Pass network opts
+mkdir -m 0755 -p /run/initramfs/state/etc/sysconfig/network
+mkdir -m 0755 -p /run/initramfs/state/var/run/wicked
+echo "files /etc/sysconfig/network" >> /run/initramfs/rwtab
+echo "files /var/run/wicked" >> /run/initramfs/rwtab
+{
+ cp /tmp/net.* /run/initramfs/
+ cp /tmp/net.$netif.resolv.conf /run/initramfs/state/etc/resolv.conf
+ copytree /tmp/ifcfg /run/initramfs/state/etc/sysconfig/network
+ cp /tmp/leaseinfo.* /run/initramfs/state/var/run/wicked/
+} > /dev/null 2>&1
--
1.8.4.5
++++++ 0061-45ifcfg-Fixup-error-message-in-write-ifcfg-suse.patch ++++++
From 8bbd0f21e9c85898219bdf0f8dc3d31ccfaaf477 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Wed, 4 Jun 2014 13:12:31 +0200
Subject: 45ifcfg: Fixup error message in write-ifcfg-suse
A fix was missing in write-ifcfg-suse.sh, cause dracut to issue
a warning for a non-existent file.
References: bnc#881286
Signed-off-by: Hannes Reinecke
---
modules.d/45ifcfg/write-ifcfg-suse.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules.d/45ifcfg/write-ifcfg-suse.sh b/modules.d/45ifcfg/write-ifcfg-suse.sh
index 4b6350f..e9b4d10 100755
--- a/modules.d/45ifcfg/write-ifcfg-suse.sh
+++ b/modules.d/45ifcfg/write-ifcfg-suse.sh
@@ -32,6 +32,7 @@ for netup in /tmp/net.*.did-setup ; do
netif=${netup%%.did-setup}
netif=${netif##*/net.}
+ strglobin "$netif" ":*:*:*:*:" && continue
[ -e /tmp/ifcfg/ifcfg-$netif ] && continue
unset bridge
unset bond
@@ -58,7 +59,8 @@ for netup in /tmp/net.*.did-setup ; do
if [ "$netif" = "$vlanname" ]; then
vlan=yes
fi
- cat /sys/class/net/$netif/address > /tmp/net.$netif.hwaddr
+ [ -e /sys/class/net/$netif/address ] && \
+ cat /sys/class/net/$netif/address > /tmp/net.$netif.hwaddr
{
echo "# Generated by dracut initrd"
echo "NAME='$netif'"
--
1.8.4.5
++++++ 0062-95iscsi-Install-libgcc_s-library.patch ++++++
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
++++++ 0063-90multipath-Install-libgcc_s-library.patch ++++++
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
++++++ 0064-90kernel-modules-install-scsi_dh_alua.patch ++++++
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
++++++ 0065-95iscsi-Fixup-bnx2i-offload-booting.patch ++++++
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
++++++ 0066-40network-always-start-netroot-in-ifup.sh.patch ++++++
From ad967a08bbf67171a75acc84a9ea2ffbd9461aa5 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Wed, 4 Jun 2014 12:04:10 +0200
Subject: 40network: always start netroot in ifup.sh
It's totally irrelevant how the network is configured when
trying to setup netroot. It only matters if it could be
configured at all.
So change the logic the check for correct network setup
and then start netroot.
References: bnc#881235
Signed-off-by: Hannes Reinecke
---
modules.d/40network/ifup.sh | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)
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
+ > /tmp/net.${netif}.up
- case $autoconf in
- dhcp|on|any|dhcp6)
- ;;
- *)
- if [ $? -eq 0 ]; then
- setup_net $netif
- source_hook initqueue/online $netif
- if [ -z "$manualup" ]; then
- /sbin/netroot $netif
- fi
- fi
- ;;
- esac
+ setup_net $netif
+ source_hook initqueue/online $netif
+ if [ -z "$manualup" ]; then
+ /sbin/netroot $netif
+ fi
+ fi
exit 0
done
--
1.8.4.5
++++++ 0067-95fcoe-check-always-returns-255.patch ++++++
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
++++++ 0068-95fcoe-uefi-Test-for-EFI-firmware.patch ++++++
From df4d0bb82b7571d0230abbae8b918373b62fdb74 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Mon, 16 Jun 2014 14:10:48 +0200
Subject: 95fcoe-uefi: Test for EFI firmware
The fcoe-uefi module should test for EFI firmware when called
in 'hostonly' mode; of no EFI firmware is found then the module
doesn't need to be included.
References: bnc#882412
Signed-off-by: Hannes Reinecke
---
modules.d/95fcoe-uefi/module-setup.sh | 3 +++
1 file changed, 3 insertions(+)
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() {
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
+ [ -d /sys/firmware/efi ] || return 255
+ }
require_binaries dcbtool fipvlan lldpad ip readlink || return 1
return 0
}
--
1.8.4.5
++++++ 0069-81cio_ignore-skip-module-if-cio_ignore-is-not-active.patch ++++++
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
++++++ 0070-81cio_ignore-rewrite-module.patch ++++++
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=**__<device-ids>__::
+ Remove the devices listed in <device-ids> from the default
+ cio_ignore kernel command-line settings.
+ <device-ids> 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
++++++ 0071-Fix-non-export-of-journal-dev-boot-options.patch ++++++
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
++++++ 0072-Also-export-root-boot-param-for-hostonly-cmdline-cas.patch ++++++
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
++++++ 0073-Don-t-create-lots-of-empty-cmdline-files-for-hostonl.patch ++++++
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
++++++ 0074-More-empty-cmdline-fixes.patch ++++++
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
++++++ 0075-95dasd_rules-enable-parsing-of-rd.dasd-commandline-p.patch ++++++
From 1ab0a485f8e3a3b0ba62ea2f920fd3457039e7f1 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Wed, 18 Jun 2014 15:10:46 +0200
Subject: 95dasd_rules: enable parsing of rd.dasd= commandline parameter
Dracut documents the 'rd.dasd=' parameter, so we should be
enabling the usage of this parameter, too.
Signed-off-by: Hannes Reinecke
---
modules.d/95dasd_rules/parse-dasd.sh | 37 ++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
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
+
+for dasd_arg in $(getargs rd.dasd=); do
+ (
+ IFS=","
+ set -- $dasd_arg
+ unset IFS
+ while (($# > 0)); do
+ case $1 in
+ autodetect|probeonly)
+ shift
+ ;;
+ *-*)
+ range=$1
+ IFS="-"
+ set -- $range
+ start=${1#0.0.}
+ shift
+ end=${1#0.0.}
+ shift
+ unset IFS
+ for dev in $(seq $(( 10#$start )) $(( 10#$end )) ) ; do
+ create_udev_rule $(printf "0.0.%04d" "$dev")
+ done
+ ;;
+ *)
+ dev=${1%(ro)}
+ if [ "$dev" != "$1" ] ; then
+ ro=1
+ fi
+ dev=${dev#0.0.}
+ create_udev_rule $(printf "0.0.%04d" $(( 10#$dev )) )
+ shift
+ ;;
+ esac
+ done
+ )
+done
--
1.8.4.5
++++++ 0076-Correctly-set-cio_ignore-for-dynamic-s390-rules.patch ++++++
From 7a725ea4a1cb606edd3f060f46818250f2a82a1a Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Wed, 18 Jun 2014 15:17:21 +0200
Subject: Correctly set cio_ignore for dynamic s390 rules
When converting 'rd.zfcp' and 'rd.dasd' into udev rules we
need to make sure the enable those device ids via cio_ignore,
otherwise the rules might never be called.
Signed-off-by: Hannes Reinecke
---
modules.d/95dasd_rules/parse-dasd.sh | 3 +++
modules.d/95zfcp_rules/parse-zfcp.sh | 3 +++
2 files changed, 6 insertions(+)
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
+ if [ -x /sbin/cio_ignore ] && ! cio_ignore -i $ccw > /dev/null ; then
+ cio_ignore -r $ccw
+ fi
}
for dasd_arg in $(getargs root=) $(getargs resume=); do
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
+ if [ -x /sbin/cio_ignore ] && ! cio_ignore -i $ccw > /dev/null ; then
+ cio_ignore -r $ccw
+ fi
}
for zfcp_arg in $(getargs rd.zfcp); do
--
1.8.4.5
++++++ 0077-90multipath-add-missing-11-dm-mpath.rules-file.patch ++++++
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
++++++ 0078-Restore-original-IFS-value.patch ++++++
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
++++++ 0079-95dasd_rules-fixup-rd.dasd-parsing.patch ++++++
From b302dd2a53864bdd4ff271275fa244f654cb92ca Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Thu, 26 Jun 2014 10:49:03 +0200
Subject: 95dasd_rules: fixup rd.dasd parsing
There were some errors when rd.dasd parsing, resulting in the
device never to be activated. And we should check for
cio_ignore even if a udev rules has been found.
Signed-off-by: Hannes Reinecke
---
modules.d/95dasd_rules/parse-dasd.sh | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
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
+ if [ -x /sbin/cio_ignore ] && cio_ignore -i $ccw > /dev/null ; then
+ cio_ignore -r $ccw
+ fi
+
[ -e ${_rule} ] && return 0
cat > $_rule < /dev/null ; then
- cio_ignore -r $ccw
- fi
}
for dasd_arg in $(getargs root=) $(getargs resume=); do
@@ -48,7 +49,7 @@ for dasd_arg in $(getargs root=) $(getargs resume=); do
case $dasd_arg in
/dev/disk/by-path/ccw-*)
ccw_arg=${dasd_arg##*/}
- break;
+ ;;
esac
if [ -n "$ccw_arg" ] ; then
OLDIFS="$IFS"
@@ -79,8 +80,8 @@ for dasd_arg in $(getargs rd.dasd=); do
end=${1#0.0.}
shift
IFS="$OLDIFS"
- for dev in $(seq $(( 10#$start )) $(( 10#$end )) ) ; do
- create_udev_rule $(printf "0.0.%04d" "$dev")
+ for dev in $(seq $(( 16#$start )) $(( 16#$end )) ) ; do
+ create_udev_rule $(printf "0.0.%04x" "$dev")
done
;;
*)
@@ -89,7 +90,7 @@ for dasd_arg in $(getargs rd.dasd=); do
ro=1
fi
dev=${dev#0.0.}
- create_udev_rule $(printf "0.0.%04d" $(( 10#$dev )) )
+ create_udev_rule $(printf "0.0.%04x" $(( 16#$dev )) )
shift
;;
esac
--
1.8.4.5
++++++ 0080-95dasd_rules-print-out-rd.dasd-commandline.patch ++++++
From 3e2e526a74cdad48d40a1ec58dac9f709d8fef0e Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Thu, 26 Jun 2014 10:50:43 +0200
Subject: 95dasd_rules: print out 'rd.dasd' commandline
From 95dc2742b9304029068a2b320e011bdfcc4087ea Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Thu, 26 Jun 2014 10:53:01 +0200
Subject: 95dasd_mod: do not set module parameters if dasd_cio_free is not
When a DASD is found to be required for the rootfs we should
be printing out a 'rd.dasd' commandline parameter. This not
only enables us to correctly enable the device with cio_ignore,
we can also inspect the resulting initrd to figure out which
devices are required to mount the rootfs.
Signed-off-by: Hannes Reinecke
---
modules.d/95dasd_rules/module-setup.sh | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
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() {
+ is_dasd() {
+ local _dev=$1
+ local _devpath=$(cd -P /sys/dev/block/$_dev ; echo $PWD)
+
+ [ "${_devpath#*/dasd}" == "$_devpath" ] && return 1
+ _ccw="${_devpath%%/block/*}"
+ echo "rd.dasd=${_ccw##*/}"
+ return 0
+ }
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
+ for_each_host_dev_and_slaves is_dasd || return 255
+ }
+}
+
+# called by dracut
check() {
local _arch=$(uname -m)
+ local found=0
+ local bdev
[ "$_arch" = "s390" -o "$_arch" = "s390x" ] || return 1
require_binaries /usr/lib/udev/collect || return 1
+
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
+ for bdev in /sys/block/* ; do
+ case "${bdev##*/}" in
+ dasd*)
+ found=$(($found+1));
+ break;
+ esac
+ done
+ [ $found -eq 0 ] && return 255
+ }
return 0
}
@@ -19,6 +48,10 @@ depends() {
# called by dracut
install() {
inst_hook cmdline 30 "$moddir/parse-dasd.sh"
+ if [[ $hostonly_cmdline == "yes" ]] ; then
+ local _dasd=$(cmdline)
+ [[ $_dasd ]] && printf "%s\n" "$_dasd" >> "${initdir}/etc/cmdline.d/95dasd.conf"
+ fi
if [[ $hostonly ]] ; then
inst_rules_wildcard 51-dasd-*.rules
inst_rules_wildcard 41-s390x-dasd-*.rules
--
1.8.4.5
++++++ 0081-95dasd_mod-do-not-set-module-parameters-if-dasd_cio_.patch ++++++
present
We're now parsing the 'rd.dasd' parameter from 95dasd_rules, so
setting the 'dasd_mod' module parameter should be dropped here.
Signed-off-by: Hannes Reinecke
---
modules.d/95dasd_mod/parse-dasd-mod.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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#*,}"
-if [ -n "$mod_args" ]; then
+if [ -x /sbin/dasd_cio_free -a -n "$mod_args" ]; then
[ -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
++++++ 0082-00warpclock-check-for-sbin-hwclock.patch ++++++
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
++++++ 0083-95zfcp_rules-Fixup-rd.zfcp-parsing.patch ++++++
From 90b21dafd469ce4a8ac56944ce825f90c0782b16 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Thu, 26 Jun 2014 11:52:29 +0200
Subject: 95zfcp_rules: Fixup rd.zfcp parsing
There were some errors when parsing rd.zfcp, causing the device
never to be activated.
Signed-off-by: Hannes Reinecke
---
modules.d/95zfcp_rules/parse-zfcp.sh | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
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
-
local _cu_type _dev_type
- local _rule=/etc/udev/rules.d/51-zfcp-${ccw}.rules
if [ -e /sys/bus/ccw/devices/${ccw} ] ; then
read _cu_type < /sys/bus/ccw/devices/${ccw}/cutype
@@ -22,6 +20,10 @@ create_udev_rule() {
return 0;
fi
+ if [ -x /sbin/cio_ignore ] && cio_ignore -i $ccw > /dev/null ; then
+ cio_ignore -r $ccw
+ fi
+
[ -e ${_rule} ] && return 0
if [ ! -f "$_rule" ] ; then
@@ -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
- if [ -x /sbin/cio_ignore ] && ! cio_ignore -i $ccw > /dev/null ; then
- cio_ignore -r $ccw
- fi
}
for zfcp_arg in $(getargs rd.zfcp); do
@@ -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##*/}
- break;
+ ;;
esac
if [ -n "$ccw_arg" ] ; then
OLDIFS="$IFS"
--
1.8.4.5
++++++ 0084-95rootfs-block-Correctly-terminate-commandline-param.patch ++++++
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
++++++ 0085-95zfcp_rules-print-out-rd.zfcp-commandline-parameter.patch ++++++
From 3d918eb5be673f243dc75b358a35e1ed307f0ea5 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Thu, 26 Jun 2014 13:44:05 +0200
Subject: 95zfcp_rules: print out rd.zfcp commandline parameter
When called with '--hostonly-cmdline' the module should print
out the configuration.
Signed-off-by: Hannes Reinecke
---
modules.d/95zfcp_rules/module-setup.sh | 39 +++++++++++++++++++++++++++++++++-
1 file changed, 38 insertions(+), 1 deletion(-)
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() {
+ is_zfcp() {
+ local _dev=$1
+ local _devpath=$(cd -P /sys/dev/block/$_dev ; echo $PWD)
+ local _sdev _lun _wwpn _ccw
+
+ [ "${_devpath#*/sd}" == "$_devpath" ] && return 1
+ _sdev="${_devpath%%/block/*}"
+ [ -e ${_sdev}/fcp_lun ] || return 1
+ _lun=$(cat ${_sdev}/fcp_lun)
+ _wwpn=$(cat ${_sdev}/wwpn)
+ _ccw=$(cat ${_sdev}/hba_id)
+ echo "rd.zfcp=${_ccw},${_wwpn},${_lun}"
+ return 1
+ }
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
+ for_each_host_dev_and_slaves is_zfcp
+ }
+}
+
+# called by dracut
check() {
local _arch=$(uname -m)
+ local _ccw
[ "$_arch" = "s390" -o "$_arch" = "s390x" ] || return 1
- require_binaries zfcp_disk_configure /usr/lib/udev/collect || return 1
+ require_binaries /usr/lib/udev/collect || return 1
+
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
+ for _ccw in /sys/bus/ccw/devices/*/host* ; do
+ [ -d "$_ccw" ] || continue
+ found=$(($found+1));
+ done
+ [ $found -eq 0 ] && return 255
+ }
return 0
}
@@ -19,6 +49,13 @@ depends() {
install() {
inst_multiple /usr/lib/udev/collect
inst_hook cmdline 30 "$moddir/parse-zfcp.sh"
+ if [[ $hostonly_cmdline == "yes" ]] ; then
+ local _zfcp
+
+ for _zfcp in $(cmdline) ; do
+ printf "%s\n" "$zfcp" >> "${initdir}/etc/cmdline.d/94zfcp.conf"
+ done
+ fi
if [[ $hostonly ]] ; then
inst_rules_wildcard 51-zfcp-*.rules
inst_rules_wildcard 41-s390x-zfcp-*.rules
--
1.8.4.5
++++++ 0086-95zfcp_rules-Auto-generate-udev-rule-for-ipl-device.patch ++++++
From 754bda4bcf9698837802b31bd74061702edf6c8c Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Thu, 26 Jun 2014 14:01:33 +0200
Subject: 95zfcp_rules: Auto-generate udev rule for ipl device
We should auto-generate an udev rule for the ipl device; it'll be
enabled anyway.
Signed-off-by: Hannes Reinecke
---
modules.d/95zfcp_rules/parse-zfcp.sh | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
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
}
+if [[ -f /sys/firmware/ipl/ipl_type &&
+ $(
From 96af5adcdc4ec9bdbaff4dc053f415060eee301a Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Thu, 26 Jun 2014 14:04:19 +0200
Subject: 95dasd_rules: Auto-generate udev rule for ipl device
We should be generating a udev rule for the ipl device; it'll
be enabled anyway.
Signed-off-by: Hannes Reinecke
---
modules.d/95dasd_rules/parse-dasd.sh | 9 +++++++++
1 file changed, 9 insertions(+)
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
}
+if [[ -f /sys/firmware/ipl/ipl_type &&
+ $(
From 78329f4df2afc9fae11ea30dd11839d956d4af08 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Fri, 27 Jun 2014 11:43:28 +0200
Subject: 91zipl: Add new module to update s390x configuration
Add new module to update the dracut commandline values
during booting with the values found in the file
dracut-cmdline.conf on the device specified by
rd.zipl.
Signed-off-by: Hannes Reinecke
---
dracut.cmdline.7.asc | 14 ++++++++++
modules.d/91zipl/install_zipl_cmdline.sh | 33 +++++++++++++++++++++++
modules.d/91zipl/module-setup.sh | 45 ++++++++++++++++++++++++++++++++
modules.d/91zipl/parse-zipl.sh | 41 +++++++++++++++++++++++++++++
4 files changed, 133 insertions(+)
create mode 100644 modules.d/91zipl/install_zipl_cmdline.sh
create mode 100644 modules.d/91zipl/module-setup.sh
create mode 100644 modules.d/91zipl/parse-zipl.sh
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
--
+ZIPL
+~~~~
+**rd.zipl=**__<path to blockdevice>__::
+ Update the dracut commandline with the values found in the
+ _dracut-cmdline.conf_ file on the given device.
+ The values are merged into the existing commandline values
+ and the udev events are regenerated.
++
+[listing]
+.Example
+--
+rd.zipl=UUID=0fb28157-99e3-4395-adef-da3f7d44835a
+--
+
Plymouth Boot Splash
~~~~~~~~~~~~~~~~~~~~
**plymouth.enable=0**::
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
+
+DEV=$1
+MNT=/boot/zipl
+
+if [ -z "$DEV" ] ; then
+ echo "No IPL device given"
+ > /tmp/install.zipl.cmdline-done
+ exit 1
+fi
+
+[ -d ${MNT} ] || mkdir -p ${MNT}
+
+mount -o ro ${DEV} ${MNT}
+if [ "$?" != "0" ] ; then
+ echo "Failed to mount ${MNT}"
+ > /tmp/install.zipl.cmdline-done
+ exit 1
+fi
+
+if [ -f ${MNT}/dracut-cmdline.conf ] ; then
+ cp ${MNT}/dracut-cmdline.conf /etc/cmdline.d/99zipl.conf
+fi
+
+umount ${MNT}
+
+if [ -f /etc/cmdline.d/99zipl.conf ] ; then
+ systemctl restart dracut-cmdline.service
+ systemctl restart systemd-udev-trigger.service
+fi
+> /tmp/install.zipl.cmdline-done
+
+exit 0
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; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+# called by dracut
+check() {
+ local _arch=$(uname -m)
+ [ "$_arch" = "s390" -o "$_arch" = "s390x" ] || return 1
+ return 0
+}
+
+# called by dracut
+depends() {
+ echo grub2
+ return 0
+}
+
+# called by dracut
+installkernel() {
+ instmods ext2
+}
+
+# called by dracut
+cmdline() {
+ local _boot_zipl
+
+ _boot_zipl=$(sed -n 's/\(.*\)\w*\/boot\/zipl.*/\1/p' /etc/fstab)
+ if [ -n "$_boot_zipl" ] ; then
+ echo "rd.zipl=${_boot_zipl}"
+ fi
+}
+
+# called by dracut
+install() {
+ inst_multiple mount umount
+
+ inst_hook cmdline 91 "$moddir/parse-zipl.sh"
+ inst "${moddir}/install_zipl_cmdline.sh" /sbin/install_zipl_cmdline.sh
+ if [[ $hostonly_cmdline == "yes" ]] ; then
+ local _zipl=$(cmdline)
+
+ [[ $_zipl ]] && printf "%s\n" "$_zipl"
+ fi
+ dracut_need_initqueue
+}
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; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+zipl_arg=$(getarg rd.zipl)
+
+if [ -n "$zipl_arg" ] ; then
+ case "$zipl_arg" in
+ LABEL=*) \
+ zipl_env="ENV{ID_FS_LABEL}"
+ zipl_val=${zipl_arg#LABEL=}
+ zipl_arg="/dev/disk/by-label/${zipl_val}"
+ ;;
+ UUID=*) \
+ zipl_env="ENV{ID_FS_UUID}"
+ zipl_val=${zipl_arg#UUID=}
+ zipl_arg="/dev/disk/by-uuid/${zipl_val}"
+ ;;
+ /dev/mapper/*) \
+ zipl_env="ENV{DM_NAME}"
+ zipl_val=${zipl_arg#/dev/mapper/}
+ ;;
+ /dev/disk/by-*) \
+ zipl_env="SYMLINK"
+ zipl_val=${zipl_arg#/dev/}
+ ;;
+ /dev/*) \
+ zipl_env="KERNEL"
+ zipl_val=${zipl_arg}
+ ;;
+ esac
+ if [ "$zipl_env" ] ; then
+ {
+ printf 'ACTION=="add|change", SUBSYSTEM=="block", %s=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/install_zipl_cmdline.sh %s"\n' \
+ ${zipl_env} ${zipl_val} ${zipl_arg}
+ echo "[ -f /tmp/install.zipl.cmdline-done ]" >$hookdir/initqueue/finished/wait-zipl-conf.sh
+ } >> /etc/udev/rules.d/99zipl-conf.rules
+ cat /etc/udev/rules.d/99zipl-conf.rules
+ fi
+ wait_for_dev -n "$zipl_arg"
+fi
--
1.8.4.5
++++++ 0089-40network-create-var-lib-wicked-in-ifup.sh.patch ++++++
From af384e51a1dff36b5554b05d2b940d0089c84000 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Tue, 1 Jul 2014 08:15:00 +0200
Subject: 40network: create /var/lib/wicked in ifup.sh
wicked requires the /var/lib/wicked directory to be present.
This is just a work-around; it should be fixed in wicked itself.
References: bnc#885141
Signed-off-by: Hannes Reinecke
---
modules.d/40network/ifup.sh | 2 ++
1 file changed, 2 insertions(+)
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'
+[ -d /var/lib/wicked ] || mkdir -p /var/lib/wicked
+
# enslave this interface to bond?
for i in /tmp/bond.*.info; do
[ -e "$i" ] || continue
--
1.8.4.5
++++++ 0090-dracut-caps-Remove-whole-caps-module.patch ++++++
From dccbc0fc7f1b814ad8a03f380a31bed2c9d86a9b Mon Sep 17 00:00:00 2001
From: Thomas Renninger
Date: Tue, 1 Jul 2014 13:53:43 +0200
Subject: dracut: caps: Remove whole caps module
To get installed it must not have systemd included in initramfs which is
an unsupported scenario for SUSE.
This gets also rid of the error in its check function.
Signed-off-by: Thomas Renninger
---
modules.d/02caps/README | 33 ---------------------------------
modules.d/02caps/caps.sh | 36 ------------------------------------
modules.d/02caps/module-setup.sh | 26 --------------------------
3 files changed, 95 deletions(-)
delete mode 100644 modules.d/02caps/README
delete mode 100755 modules.d/02caps/caps.sh
delete mode 100755 modules.d/02caps/module-setup.sh
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
- turn the caps module on/off
-rd.caps.initdrop=cap_sys_module,cap_sys_rawio
- drop the specified comma separated capabilities
-rd.caps.disablemodules=1
- turn off module loading
-rd.caps.disablekexec=1
- turn off the kexec functionality
-
-If module loading is turned off, all modules have to be loaded in the
-initramfs, which are used later on. This can be done with
-"rd.driver.pre="
-rd.driver.pre=autofs4,sunrpc,ipt_REJECT,nf_conntrack_ipv4,....
-
-Because the kernel command line would get huge with all those drivers, I
-recommend to make use of $initramfs/etc/cmdline.
-
-So, all rd.caps.* and rd.driver.pre arguments are in caps.conf can be
-copied to $initramfs/etc/cmdline with "-i caps.conf /etc/cmdline".
-
-Also all modules have to be loaded in the initramfs via "--add-drivers".
-
-The resulting initramfs creation would look like this:
-
- --add-drivers "autofs4 sunrpc ipt_REJECT nf_conntrack_ipv4 \
- nf_defrag_ipv4 iptable_filter ip_tables
- ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack
- ip6table_filter ip6_tables dm_mirror dm_region_hash dm_log uinput ppdev
- parport_pc parport ipv6 sg 8139too 8139cp mii i2c_piix4 i2c_core ext3
- jbd mbcache sd_mod crc_t10dif sr_mod cdrom ata_generic pata_acpi ata_piix
- dm_mod" \
- /boot/initramfs-caps.img
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)
-
-if [ "$capsmode" = "1" ]; then
- CAPS_INIT_DROP=$(getarg rd.caps.initdrop=)
- CAPS_USERMODEHELPER_BSET=$(capsh --drop="$CAPS_INIT_DROP" -- -c 'while read a b ; do [ "$a" = "CapBnd:" ] && echo $((0x${b:$((${#b}-8)):8})) $((0x${b:$((${#b}-16)):8})) && break; done < /proc/self/status')
- CAPS_MODULES_DISABLED=$(getarg rd.caps.disablemodules=)
- CAPS_KEXEC_DISABLED=$(getarg rd.caps.disablekexec=)
-
- info "Loading CAPS_MODULES $CAPS_MODULES"
- for i in $CAPS_MODULES;do modprobe $i 2>&1 >/dev/null | vinfo; done
-
- if [ "$CAPS_MODULES_DISABLED" = "1" -a -e /proc/sys/kernel/modules_disabled ]; then
- info "Disabling module loading."
- echo $CAPS_MODULES_DISABLED > /proc/sys/kernel/modules_disabled
- fi
-
- if [ "$CAPS_KEXEC_DISABLED" = "1" -a -e /proc/sys/kernel/kexec_disabled ]; then
- info "Disabling kexec."
- echo $CAPS_KEXEC_DISABLED > /proc/sys/kernel/kexec_disabled
- fi
-
- info "CAPS_USERMODEHELPER_BSET=$CAPS_USERMODEHELPER_BSET"
- if [ -e /proc/sys/kernel/usermodehelper/bset ]; then
- info "Setting usermode helper bounding set."
- echo $CAPS_USERMODEHELPER_BSET > /proc/sys/kernel/usermodehelper/bset
- echo $CAPS_USERMODEHELPER_BSET > /proc/sys/kernel/usermodehelper/inheritable
- fi
-
- echo "CAPS_INIT_DROP=\"$CAPS_INIT_DROP\"" > /etc/capsdrop
- info "Will drop capabilities $CAPS_INIT_DROP from init."
-fi
-
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() {
- require_binaries capsh
-}
-
-# called by dracut
-depends() {
- return 0
-}
-
-# called by dracut
-install() {
- if ! dracut_module_included "systemd"; then
- inst_hook pre-pivot 00 "$moddir/caps.sh"
- inst $(type -P capsh 2>/dev/null) /usr/sbin/capsh
- # capsh wants bash and we need bash also
- inst /bin/bash
- else
- dwarning "caps: does not work with systemd in the initramfs"
- fi
-}
-
--
1.8.4.5
++++++ 0091-dracut-biosdevname-In-SUSE-biosdevname-package-is-in.patch ++++++
From edfae68d9a9af81cd1ff230b72b9c320d4c58e82 Mon Sep 17 00:00:00 2001
From: Thomas Renninger
Date: Tue, 1 Jul 2014 13:53:57 +0200
Subject: dracut: biosdevname: In SUSE biosdevname package is installed on
relevant platforms
all others should not add biosdevname on purpose. Do not complain about it.
Signed-off-by: Thomas Renninger
---
modules.d/97biosdevname/module-setup.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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
- require_binaries biosdevname || return 1
+ # Include biosdevname if the binary is installed
+ type -P biosdevname >/dev/null || return 1
return 0
}
--
1.8.4.5
++++++ 0092-dracut-nbd-Only-complain-of-missing-binary-in-hoston.patch ++++++
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
++++++ 0093-95iscsi-generate-commandline-for-software-iscsi.patch ++++++
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
++++++ 0094-Implement-shortcut-ip-ifname-static-for-static-confi.patch ++++++
From a345cf3c3d7c15cfca5735c531f825062235c135 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Wed, 2 Jul 2014 11:20:22 +0200
Subject: Implement shortcut 'ip=<ifname>:static' for static configuration
To simplify static configurate we should be pulling in the
existing 'ifcfg' files when running in hostonly mode.
With that we can implement the shortcut 'ip=<ifname>:static'
to use the existing configuration from the ifcfg file.
Signed-off-by: Hannes Reinecke
---
modules.d/40network/ifup.sh | 14 +++++++++++++-
modules.d/40network/module-setup.sh | 4 ++++
modules.d/40network/parse-ip-opts.sh | 8 +++++++-
3 files changed, 24 insertions(+), 2 deletions(-)
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
+ if [ "$autoconf" = "static" ] &&
+ [ -e /etc/sysconfig/network/ifcfg-${netif} ] ; then
+ # Pull in existing static configuration
+ . /etc/sysconfig/network/ifcfg-${netif}
+ ip=${IPADDR}
+ mask=${PREFIXLEN}
+ mtu=${MTU}
+ server=${REMOTE_IPADDR}
+ gw=${GATEWAY}
+ autoconf=${BOOTPROTO}
+ fi
+
# setup nameserver
namesrv="$dns1 $dns2 $(getargs nameserver)"
for s in $namesrv; do
@@ -411,7 +423,7 @@ for p in $(getargs ip=); do
done > /tmp/net.$netif.override
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)
+ [[ $hostonly ]] && {
+ inst_multiple /etc/sysconfig/network/ifcfg-*
+ }
+
inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \
{"tls/$_arch/",tls/,"$_arch/",}"libnss_mdns4_minimal.so.*"
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 '$autoconf' without static configuration does not make sense"
--
1.8.4.5
++++++ 0095-95iscsi-use-static-configuration-for-software-iscsi.patch ++++++
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
++++++ 0096-dracut-Fix-error-local-can-only-be-used-in-a-functio.patch ++++++
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
++++++ 0097-Implement-rd.timeout-to-modify-the-device-timeout.patch ++++++
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=**__<seconds>__::
- 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=**__<seconds>__::
+ 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
++++++ 0098-Do-not-call-lvm-for-non-LVM-device-mapper-devices.patch ++++++
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
++++++ 0099-90multipath-Load-device_handler-modules-early-during.patch ++++++
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
++++++ 0100-Add-btrfs-rescue-utilities.patch ++++++
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
++++++ 0101-Print-stored-dracut-commandline-during-initramfs-bui.patch ++++++
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
++++++ 0102-Align-dev_unit_name-with-systemd-s-function.patch ++++++
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 <dev>
--
1.8.4.5
++++++ 0103-Fixup-missing-separators-in-rootfs-block-cmdline.patch ++++++
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
++++++ 0104-Generate-fallback-mount-unit-for-root-filesystem.patch ++++++
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
++++++ 0105-95iscsi-parse-output-from-iscsiadm-correctly.patch ++++++
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
++++++ 0106-dracut-Enable-converting-of-directory-var-run-var-lo.patch ++++++
From 6cadece6089ef4d4efbfebeb6b23ca3f2429b36c Mon Sep 17 00:00:00 2001
From: Thomas Renninger
Date: Tue, 8 Jul 2014 17:34:08 +0200
Subject: dracut: Enable converting of directory /var/run /var/lock to symlinks
to /run
If /var/run is a directory this module will be added.
After reboot /var/run and /var/lock will be symlinks.
Another initrd re-creation will not include convertfs module anymore.
bnc#877680
Signed-off-by: Thomas Renninger
---
modules.d/30convertfs/convertfs.sh | 9 ------
modules.d/30convertfs/convertrunfs.sh | 54 +++++++++++++++++++++++++++++++++++
modules.d/30convertfs/do-convertfs.sh | 17 +++++++++++
modules.d/30convertfs/module-setup.sh | 10 +++++--
4 files changed, 79 insertions(+), 11 deletions(-)
create mode 100755 modules.d/30convertfs/convertrunfs.sh
Index: dracut-037/modules.d/30convertfs/convertfs.sh
===================================================================
--- dracut-037.orig/modules.d/30convertfs/convertfs.sh 2014-03-19 17:16:08.000000000 +0100
+++ dracut-037/modules.d/30convertfs/convertfs.sh 2015-09-07 15:04:11.725094073 +0200
@@ -64,15 +64,6 @@ if [[ ! -e "$testfile" ]]; then
fi
rm -f -- "$testfile"
-testfile="$ROOT/usr/.usrmovecheck$$"
-rm -f -- "$testfile"
-> "$testfile"
-if [[ ! -e "$testfile" ]]; then
- echo "Cannot write to $ROOT/usr/"
- exit 1
-fi
-rm -f -- "$testfile"
-
find_mount() {
local dev mnt etc wanted_dev
wanted_dev="$(readlink -e -q $1)"
Index: dracut-037/modules.d/30convertfs/convertrunfs.sh
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ dracut-037/modules.d/30convertfs/convertrunfs.sh 2015-09-07 15:33:14.023428576 +0200
@@ -0,0 +1,54 @@
+#!/bin/bash
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+ROOT="$1"
+
+if [[ ! -d "$ROOT" ]]; then
+ echo "Usage: $0 <rootdir>"
+ exit 1
+fi
+
+if [[ "$ROOT" -ef / ]]; then
+ echo "Can't convert the running system."
+ echo "Please boot with 'rd.convertfs' on the kernel command line,"
+ echo "to update with the help of the initramfs,"
+ echo "or run this script from a rescue system."
+ exit 1
+fi
+
+while [[ "$ROOT" != "${ROOT%/}" ]]; do
+ ROOT=${ROOT%/}
+done
+
+if findmnt "$ROOT" -O ro;then
+ WAS_RO=1
+ mount $ROOT -o remount,rw
+else
+ WAS_RO=0
+fi
+
+testfile="$ROOT/.usrmovecheck$$"
+rm -f -- "$testfile"
+> "$testfile"
+if [[ ! -e "$testfile" ]]; then
+ echo "Cannot write to $ROOT/"
+ exit 1
+fi
+rm -f -- "$testfile"
+
+if [ ! -L $ROOT/var/run -a -e $ROOT/var/run -a -d $ROOT/run ]; then
+ echo "Converting /var/run to symlink"
+ mv -f $ROOT/var/run $ROOT/var/run.runmove~
+ ln -sfn ../run $ROOT/var/run
+fi
+
+if [ ! -L $ROOT/var/lock -a -e $ROOT/var/lock -a -d $ROOT/run ]; then
+ echo "Converting /var/lock to symlink"
+ mv -f $ROOT/var/lock $ROOT/var/lock.lockmove~
+ ln -sfn ../run/lock $ROOT/var/lock
+fi
+
+if [ $WAS_RO -eq 1 ];then
+ mount $ROOT -o remount,ro
+fi
Index: dracut-037/modules.d/30convertfs/do-convertfs.sh
===================================================================
--- dracut-037.orig/modules.d/30convertfs/do-convertfs.sh 2014-03-19 17:16:08.000000000 +0100
+++ dracut-037/modules.d/30convertfs/do-convertfs.sh 2015-09-07 15:31:05.468173518 +0200
@@ -2,10 +2,21 @@
# -*- 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!
if getargbool 0 rd.convertfs; then
+ info "Converting both /var/run to /run tmpfs and /usr/bin -> /bin"
if getargbool 0 rd.debug; then
bash -x convertfs "$NEWROOT" 2>&1 | vinfo
else
convertfs "$NEWROOT" 2>&1 | vinfo
fi
+elif ! test -L "$NEWROOT"/var/run; then
+ # This only converts /var/run -> /run as tmpfs
+ info "Converting /var/run to /run tmpfs"
+ if getargbool 0 rd.debug; then
+ bash -x convertrunfs "$NEWROOT" 2>&1 | vinfo
+ else
+ convertrunfs "$NEWROOT" 2>&1 | vinfo
+ fi
fi
Index: dracut-037/modules.d/30convertfs/module-setup.sh
===================================================================
--- dracut-037.orig/modules.d/30convertfs/module-setup.sh 2014-03-19 17:16:08.000000000 +0100
+++ dracut-037/modules.d/30convertfs/module-setup.sh 2015-09-07 15:04:11.729094299 +0200
@@ -4,8 +4,13 @@
# called by dracut
check() {
- [[ $mount_needs ]] && return 1
- return 255
+ # Only check for /var/run
+ if test -L /var/run;then
+ return 255
+ else
+ require_binaries bash find ldconfig mv rm cp ln || return 1
+ return 0
+ fi
}
# called by dracut
@@ -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
}
++++++ 0107-Fixup-typo-firmare-instead-of-firmware.patch ++++++
From b723f5fabf7ca5396fbd451e8b2d6ee6b82888c8 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Wed, 9 Jul 2014 09:34:35 +0200
Subject: Fixup typo 'firmare' instead of 'firmware'
Signed-off-by: Hannes Reinecke
---
modules.d/95dasd_rules/parse-dasd.sh | 2 +-
modules.d/95zfcp_rules/parse-zfcp.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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 &&
- $(
From 0d9482bf68e9d8f1c9b13d4beb9cecc660dda017 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Thu, 10 Jul 2014 14:55:50 +0200
Subject: 91zipl: Store commandline correctly
The 'rd.zipl' command was only printed and never stored in the
initramfs itself.
Signed-off-by: Hannes Reinecke
---
modules.d/91zipl/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/91zipl/module-setup.sh b/modules.d/91zipl/module-setup.sh
index a8d95c5..84bb41d 100644
--- a/modules.d/91zipl/module-setup.sh
+++ b/modules.d/91zipl/module-setup.sh
@@ -39,7 +39,7 @@ install() {
if [[ $hostonly_cmdline == "yes" ]] ; then
local _zipl=$(cmdline)
- [[ $_zipl ]] && printf "%s\n" "$_zipl"
+ [[ $_zipl ]] && printf "%s\n" "$_zipl" > "${initdir}/etc/cmdline.d/91zipl.conf"
fi
dracut_need_initqueue
}
--
1.8.4.5
++++++ 0109-95dasd_rules-Store-all-devices-in-commandline.patch ++++++
From 0299c9f31fb0c5794747a6a7f62c32abd9a49754 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Thu, 10 Jul 2014 14:56:54 +0200
Subject: 95dasd_rules: Store all devices in commandline
'for_each_host_dev_and_slaves' would stop at the first found
device, so the cmdline() call would never list all required
devices. Use 'for_each_host_dev_and_slaves_all' instead and
filter out duplicates.
Signed-off-by: Hannes Reinecke
---
modules.d/95dasd_rules/module-setup.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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 ]] && {
- for_each_host_dev_and_slaves is_dasd || return 255
- }
+ for_each_host_dev_and_slaves_all is_dasd || return 255
+ } | sort | uniq
}
# called by dracut
--
1.8.4.5
++++++ 0110-95zfcp_rules-Store-all-devices-in-commandline.patch ++++++
From 0be3d022964d54e8ab769ebed4006ba8b8d65078 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Thu, 10 Jul 2014 14:56:54 +0200
Subject: 95zfcp_rules: Store all devices in commandline
'for_each_host_dev_and_slaves' would stop at the first found
device, so the cmdline() call would never list all required
devices. Use 'for_each_host_dev_and_slaves_all' instead and
filter out duplicates.
Signed-off-by: Hannes Reinecke
---
modules.d/95zfcp_rules/module-setup.sh | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
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}"
- return 1
+ return 0
}
[[ $hostonly ]] || [[ $mount_needs ]] && {
- for_each_host_dev_and_slaves is_zfcp
- }
+ for_each_host_dev_and_slaves_all is_zfcp
+ } | sort | uniq
}
# called by dracut
@@ -31,6 +31,7 @@ check() {
require_binaries /usr/lib/udev/collect || return 1
[[ $hostonly ]] || [[ $mount_needs ]] && {
+ found=0
for _ccw in /sys/bus/ccw/devices/*/host* ; do
[ -d "$_ccw" ] || continue
found=$(($found+1));
--
1.8.4.5
++++++ 0111-90mdraid-Remove-line-for-offroot-detection.patch ++++++
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
++++++ 0112-99base-warn-on-invalid-command-for-initqueue.patch ++++++
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
++++++ 0113-91zipl-Install-script-as-executable.patch ++++++
From 488cf7ad86eee4cd9138d5e58c1baefeeb5e8c98 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Thu, 10 Jul 2014 15:58:24 +0200
Subject: 91zipl: Install script as executable
initqueue will only work with executable scripts, so we need to
mark it as such.
Signed-off-by: Hannes Reinecke
---
modules.d/91zipl/install_zipl_cmdline.sh | 2 +-
modules.d/91zipl/module-setup.sh | 2 +-
modules.d/91zipl/parse-zipl.sh | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
mode change 100644 => 100755 modules.d/91zipl/install_zipl_cmdline.sh
diff --git a/modules.d/91zipl/install_zipl_cmdline.sh b/modules.d/91zipl/install_zipl_cmdline.sh
old mode 100644
new mode 100755
index 8b454b8..3e939c1
--- a/modules.d/91zipl/install_zipl_cmdline.sh
+++ b/modules.d/91zipl/install_zipl_cmdline.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-DEV=$1
+DEV="$1"
MNT=/boot/zipl
if [ -z "$DEV" ] ; then
diff --git a/modules.d/91zipl/module-setup.sh b/modules.d/91zipl/module-setup.sh
index 84bb41d..eda4c32 100644
--- a/modules.d/91zipl/module-setup.sh
+++ b/modules.d/91zipl/module-setup.sh
@@ -35,7 +35,7 @@ install() {
inst_multiple mount umount
inst_hook cmdline 91 "$moddir/parse-zipl.sh"
- inst "${moddir}/install_zipl_cmdline.sh" /sbin/install_zipl_cmdline.sh
+ inst_script "${moddir}/install_zipl_cmdline.sh" /sbin/install_zipl_cmdline.sh
if [[ $hostonly_cmdline == "yes" ]] ; then
local _zipl=$(cmdline)
diff --git a/modules.d/91zipl/parse-zipl.sh b/modules.d/91zipl/parse-zipl.sh
index f8c2ca4..308f228 100644
--- a/modules.d/91zipl/parse-zipl.sh
+++ b/modules.d/91zipl/parse-zipl.sh
@@ -31,7 +31,7 @@ if [ -n "$zipl_arg" ] ; then
esac
if [ "$zipl_env" ] ; then
{
- printf 'ACTION=="add|change", SUBSYSTEM=="block", %s=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/install_zipl_cmdline.sh %s"\n' \
+ printf 'ACTION=="add|change", SUBSYSTEM=="block", %s=="%s", RUN+="/sbin/initqueue --settled --onetime --unique --name install_zipl_cmdline /sbin/install_zipl_cmdline.sh %s"\n' \
${zipl_env} ${zipl_val} ${zipl_arg}
echo "[ -f /tmp/install.zipl.cmdline-done ]" >$hookdir/initqueue/finished/wait-zipl-conf.sh
} >> /etc/udev/rules.d/99zipl-conf.rules
--
1.8.4.5
++++++ 0114-91zipl-Translate-ext2-3-into-ext4.patch ++++++
From 12131d99811c9829ed1c19e164f2ef22634ba4e5 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Fri, 11 Jul 2014 12:55:55 +0200
Subject: 91zipl: Translate 'ext2/3' into ext4
91zipl tries to read the filesystem for the /boot/zipl device.
On SLE12, however, the ext2 and ext3 filesystems are handled
by the ext4 module.
And due to bug#886839 no error is registered and booting fails.
So implement a band-aid to translate it into ext4.
Signed-off-by: Hannes Reinecke
---
modules.d/91zipl/module-setup.sh | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/modules.d/91zipl/module-setup.sh b/modules.d/91zipl/module-setup.sh
index eda4c32..9fe6acc 100644
--- a/modules.d/91zipl/module-setup.sh
+++ b/modules.d/91zipl/module-setup.sh
@@ -17,7 +17,20 @@ depends() {
# called by dracut
installkernel() {
- instmods ext2
+ local _boot_zipl
+
+ _boot_zipl=$(sed -n 's/\(.*\)\w*\/boot\/zipl.*/\1/p' /etc/fstab)
+ if [ -n "$_boot_zipl" ] ; then
+ eval $(blkid -s TYPE -o udev ${_boot_zipl})
+ if [ -n "$ID_FS_TYPE" ] ; then
+ case "$ID_FS_TYPE" in
+ ext?)
+ ID_FS_TYPE=ext4
+ ;;
+ esac
+ instmods ${ID_FS_TYPE}
+ fi
+ fi
}
# called by dracut
--
1.8.4.5
++++++ 0115-Handle-module-alias-properly.patch ++++++
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
++++++ 0116-Mark-scripts-as-executable.patch ++++++
From 941b55f8d9d50b3ba20ba0a2bb64c7509d38ee72 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Sat, 12 Jul 2014 14:55:35 +0200
Subject: Mark scripts as executable
All scripts need to be marked as executable, otherwise dracut
won't be running them.
References: bnc#887010
Signed-off-by: Hannes Reinecke
---
modules.d/81cio_ignore/module-setup.sh | 0
modules.d/81cio_ignore/parse-cio_accept.sh | 0
modules.d/91crypt-loop/module-setup.sh | 0
modules.d/91zipl/module-setup.sh | 0
modules.d/91zipl/parse-zipl.sh | 0
modules.d/95fcoe/lldpad.sh | 0
6 files changed, 0 insertions(+), 0 deletions(-)
mode change 100644 => 100755 modules.d/81cio_ignore/module-setup.sh
mode change 100644 => 100755 modules.d/81cio_ignore/parse-cio_accept.sh
mode change 100644 => 100755 modules.d/91crypt-loop/module-setup.sh
mode change 100644 => 100755 modules.d/91zipl/module-setup.sh
mode change 100644 => 100755 modules.d/91zipl/parse-zipl.sh
mode change 100644 => 100755 modules.d/95fcoe/lldpad.sh
diff --git a/modules.d/81cio_ignore/module-setup.sh b/modules.d/81cio_ignore/module-setup.sh
old mode 100644
new mode 100755
diff --git a/modules.d/81cio_ignore/parse-cio_accept.sh b/modules.d/81cio_ignore/parse-cio_accept.sh
old mode 100644
new mode 100755
diff --git a/modules.d/91crypt-loop/module-setup.sh b/modules.d/91crypt-loop/module-setup.sh
old mode 100644
new mode 100755
diff --git a/modules.d/91zipl/module-setup.sh b/modules.d/91zipl/module-setup.sh
old mode 100644
new mode 100755
diff --git a/modules.d/91zipl/parse-zipl.sh b/modules.d/91zipl/parse-zipl.sh
old mode 100644
new mode 100755
diff --git a/modules.d/95fcoe/lldpad.sh b/modules.d/95fcoe/lldpad.sh
old mode 100644
new mode 100755
--
1.8.4.5
++++++ 0117-95dasd_rules-Enable-the-device-before-checking-devic.patch ++++++
From 22c039c79eb496af10fbc811854e07822b063616 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Mon, 14 Jul 2014 10:13:53 +0200
Subject: 95dasd_rules: Enable the device before checking device type
For creating dynamic udev rules parse-dasd.sh look for the device
type in sysfs, which of course does not exist if cio_ignore is
active. So first enable the device before checking.
Signed-off-by: Hannes Reinecke
---
modules.d/95dasd_rules/parse-dasd.sh | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
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
+ if [ -x /sbin/cio_ignore ] && cio_ignore -i $ccw > /dev/null ; then
+ cio_ignore -r $ccw
+ fi
+
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
@@ -31,10 +35,6 @@ create_udev_rule() {
esac
[ -z "${_drv}" ] && return 0
- if [ -x /sbin/cio_ignore ] && cio_ignore -i $ccw > /dev/null ; then
- cio_ignore -r $ccw
- fi
-
[ -e ${_rule} ] && return 0
cat > $_rule < 0)); do
case $1 in
autodetect|probeonly)
--
1.8.4.5
++++++ 0118-95zfcp_rules-Enable-the-device-before-checking-devic.patch ++++++
From d4245680ba1cd00a15b86f5ccecd4b8be124f6e5 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Mon, 14 Jul 2014 10:17:07 +0200
Subject: 95zfcp_rules: Enable the device before checking device type
For creating dynamic udev rules parse-dasd.sh look for the device
type in sysfs, which of course does not exist if cio_ignore is
active. So first enable the device before checking.
Signed-off-by: Hannes Reinecke
---
modules.d/95zfcp_rules/parse-zfcp.sh | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
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
+ if [ -x /sbin/cio_ignore ] && cio_ignore -i $ccw > /dev/null ; then
+ cio_ignore -r $ccw
+ fi
+
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
@@ -20,10 +24,6 @@ create_udev_rule() {
return 0;
fi
- if [ -x /sbin/cio_ignore ] && cio_ignore -i $ccw > /dev/null ; then
- cio_ignore -r $ccw
- fi
-
[ -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
++++++ 0119-Reset-IFS-variable.patch ++++++
From bcfdc4522d2f04d0a1fd46d80a8ac7ff357b8bc5 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Mon, 14 Jul 2014 10:22:31 +0200
Subject: Reset IFS variable
Setting and unsetting the IFS variable is tricky. To be on the
safe side we should always reset the IFS variable to its original
value after parsing.
Signed-off-by: Hannes Reinecke
---
modules.d/95dasd/parse-dasd.sh | 2 ++
modules.d/95fcoe/parse-fcoe.sh | 2 ++
modules.d/95zfcp/parse-zfcp.sh | 2 ++
3 files changed, 6 insertions(+)
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() {
+ local OLDIFS="$IFS"
local IFS=:
set $fcoe
+ IFS="$OLDIFS"
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
++++++ 0120-mkinitrd-suse.sh-Bail-out-with-exit-1-if-initrd-cann.patch ++++++
From 3c4d4b2c9654e418d422b80e052bdf6d9a02a188 Mon Sep 17 00:00:00 2001
From: Thomas Renninger
Date: Tue, 15 Jul 2014 15:53:23 +0200
Subject: mkinitrd-suse.sh: Bail out with exit 1 if initrd cannot be generated
bnc#886630
Signed-off-by: Thomas Renninger
---
mkinitrd-suse.sh | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
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
- error "No kernel found in $boot_dir"
+ error "No kernel found in $boot_dir or bad modules dir in /lib/modules"
+ exit 1
fi
# We can have several targets/kernels, transform the list to an array
@@ -303,6 +304,8 @@ fi
[[ $domu_module_list ]] || domu_module_list="${DOMU_INITRD_MODULES}"
shopt -s extglob
+failed=""
+
for ((i=0 ; $i<${#targets[@]} ; i++)); do
if [[ $img_vers ]];then
@@ -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
+ [ $? -ne 0 ] && failed="$failed $target"
else
$dracut_cmd $dracut_args "$target" "$kernel" &>/dev/null
+ [ $? -ne 0 ] && failed="$failed $target"
fi
else
if [ -n "${modules_all}" ];then
$dracut_cmd $dracut_args --force-drivers "${modules_all}" "$target" "$kernel"
+ [ $? -ne 0 ] && failed="$failed $target"
else
$dracut_cmd $dracut_args "$target" "$kernel"
+ [ $? -ne 0 ] && failed="$failed $target"
fi
fi
done
@@ -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
+
+if [ "$failed" != "" ]; then
+ echo "Generating $failed targets failed"
+ exit 1
fi
+
+exit 0
--
1.8.4.5
++++++ 0121-Adjust-initramfs-kernel.img-to-SUSE-default-initrd-k.patch ++++++
From 05bee849390ba39a5a441cbcc921634ddc298232 Mon Sep 17 00:00:00 2001
From: Thomas Renninger
Date: Wed, 16 Jul 2014 16:37:15 +0200
Subject: Adjust initramfs-$kernel.img to SUSE default: initrd-$kernel
In lsinitrd and /usr/bin/dracut
bnc#882306
Signed-off-by: Thomas Renninger
---
dracut.sh | 2 +-
lsinitrd.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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
- outfile="/boot/initramfs-$kernel.img"
+ outfile="/boot/initrd-$kernel"
fi
fi
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
- image="/boot/initramfs-${KERNEL_VERSION}.img"
+ image="/boot/initrd-${KERNEL_VERSION}"
fi
fi
--
1.8.4.5
++++++ 0122-btrfs-btrfs-dump-super-and-btrfs-select-super-do-not.patch ++++++
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
++++++ 0123-95zfcp_rules-fix-typo-in-module_setup.patch ++++++
From 9e0bf05cd6e0a0ff50502dbce31a8d5031219fe7 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Thu, 17 Jul 2014 14:29:24 +0200
Subject: 95zfcp_rules: fix typo in module_setup
module_setup.sh has a typo preventing it from saving the correct
dracut commandline.
References: bnc#887582
Signed-off-by: Hannes Reinecke
---
modules.d/95zfcp_rules/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
- printf "%s\n" "$zfcp" >> "${initdir}/etc/cmdline.d/94zfcp.conf"
+ printf "%s\n" "$_zfcp" >> "${initdir}/etc/cmdline.d/94zfcp.conf"
done
fi
if [[ $hostonly ]] ; then
--
1.8.4.5
++++++ 0124-40network-Update-iBFT-scanning-code-to-handle-IPv6.patch ++++++
From de870b8879974927873264010b6294a70b6c7980 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Thu, 17 Jul 2014 14:09:28 +0200
Subject: 40network: Update iBFT scanning code to handle IPv6
IPv6 addresses should be specified in brackets so that the
ip= scanning code doesn't get confused.
References: bnc#887542
Signed-off-by: Hannes Reinecke
---
modules.d/40network/net-lib.sh | 48 +++++++++++++++++++++++++++++++++++++-----
1 file changed, 43 insertions(+), 5 deletions(-)
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
+ [ -e ${iface}/flags ] && flags=$(read a < ${iface}/flags; echo $a)
+ # Skip invalid interfaces
+ (( $flags & 1 )) || continue
+ # Skip interfaces not used for booting
+ (( $flags & 2 )) || continue
[ -e ${iface}/dhcp ] && dhcp=$(read a < ${iface}/dhcp; 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
+ *.*.*.*)
+ family=ipv4
+ ;;
+ *:*)
+ family=ipv6
+ ;;
+ esac
+ fi
+ if [ -n "$dhcp" ] || [ "$origin" -eq 3 ]; then
+ if [ "$family" = "ipv6" ] ; then
+ echo "ip=$dev:dhcp6"
+ else
+ echo "ip=$dev:dhcp"
+ fi
elif [ -e ${iface}/ip-addr ]; then
- [ -e ${iface}/ip-addr ] && ip=$(read a < ${iface}/ip-addr; echo $a)
# skip not assigned ip adresses
[ "$ip" = "0.0.0.0" ] && continue
[ -e ${iface}/gateway ] && gw=$(read a < ${iface}/gateway; echo $a)
[ -e ${iface}/subnet-mask ] && mask=$(read a < ${iface}/subnet-mask; echo $a)
+ [ -e ${iface}/prefix-len ] && prefix=$(read a < ${iface}/prefix-len; echo $a)
[ -e ${iface}/primary-dns ] && dns1=$(read a < ${iface}/primary-dns; echo $a)
[ -e ${iface}/secondary-dns ] && dns2=$(read a < ${iface}/secondary-dns; echo $a)
[ -e ${iface}/hostname ] && hostname=$(read a < ${iface}/hostname; echo $a)
- if [ -n "$ip" ] && [ -n "$mask" ]; then
+ if [ "$family" = "ipv6" ] ; then
+ if [ -n "$ip" ] ; then
+ [ -n "$prefix" ] || prefix=64
+ ip="[${ip}/${prefix}]"
+ mask=
+ fi
+ if [ -n "$gw" ] ; then
+ gw="[${gw}]"
+ fi
+ fi
+ if [ -n "$ip" ] && [ -n "$mask" -o -n "$prefix" ]; then
echo "ip=$ip::$gw:$mask:$hostname:$dev:none${dns1:+:$dns1}${dns2:+:$dns2}"
else
warn "${iface} does not contain a valid iBFT configuration"
@@ -373,6 +404,13 @@ ip_to_var() {
esac
;;
esac
+ # Extract prefix length from CIDR notation
+ case $ip in
+ */*)
+ mask=${ip##*/}
+ ip=${ip%/*}
+ ;;
+ esac
# ip=<ipv4-address> means anaconda-style static config argument cluster:
# ip=<ip> gateway=<gw> netmask=<nm> hostname=<host> mtu=<mtu>
--
1.8.4.5
++++++ 0125-40network-separate-mask-and-prefix.patch ++++++
From 50f59d60577283b71da5424e30d0c5981fb74f71 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Fri, 18 Jul 2014 10:28:00 +0200
Subject: 40network: separate 'mask' and 'prefix'
The 'mask' parameter is used for both, the (IPv4) netmask and
the prefix length. As both are in different format separate them
out into 'mask' for the netmask and 'prefix' for the prefix length.
And also prefer the use of 'prefix' where possible to ease
calculation and better IPv6 support.
References: bnc#887542
Signed-off-by: Hannes Reinecke
---
modules.d/40network/ifup.sh | 9 ++++----
modules.d/40network/net-lib.sh | 42 +++++++++++++++++++++++++++++++++---
modules.d/40network/parse-ip-opts.sh | 2 +-
3 files changed, 45 insertions(+), 8 deletions(-)
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
+ [ -n "$mask" -a -z "$prefix" ] && prefix=$(mask_to_prefix $mask)
if strglobin $ip '*:*:*'; then
# note no ip addr flush for ipv6
- ip addr add $ip/$mask ${srv:+peer $srv} dev $netif
+ ip addr add $ip/$prefix ${srv:+peer $srv} dev $netif
wait_for_ipv6_dad $netif
else
ip addr flush dev $netif
- ip addr add $ip/$mask ${srv:+peer $srv} brd + dev $netif
+ ip addr add $ip/$prefix ${srv:+peer $srv} brd + dev $netif
fi
[ -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}
- mask=${PREFIXLEN}
+ prefix=${PREFIXLEN}
mtu=${MTU}
server=${REMOTE_IPADDR}
gw=${GATEWAY}
@@ -418,7 +419,7 @@ for p in $(getargs ip=); do
done
# Store config for later use
- for i in ip srv gw mask hostname macaddr dns1 dns2; do
+ for i in ip srv gw mask prefix hostname macaddr dns1 dns2; do
eval '[ "$'$i'" ] && echo '$i'="$'$i'"'
done > /tmp/net.$netif.override
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##* }
}
+mask_to_prefix() {
+ local mask="$1"
+ local prefix=0
+ local OLDIFS="$IFS"
+
+ IFS=:
+ set -- $mask
+ IFS="$OLDIFS"
+ for mask in $@ ; do
+ if [ "$mask" -eq 255 ] ; then
+ prefix=$(($prefix + 8))
+ elif [ "$mask" -eq 254 ] ; then
+ prefix=$(($prefix + 7))
+ elif [ "$mask" -eq 252 ] ; then
+ prefix=$(($prefix + 6))
+ elif [ "$mask" -eq 248 ] ; then
+ prefix=$(($prefix + 5))
+ elif [ "$mask" -eq 240 ] ; then
+ prefix=$(($prefix + 4))
+ elif [ "$mask" -eq 224 ] ; then
+ prefix=$(($prefix + 3))
+ elif [ "$mask" -eq 192 ] ; then
+ prefix=$(($prefix + 2))
+ elif [ "$mask" -eq 128 ] ; then
+ prefix=$(($prefix + 1))
+ fi
+ done
+}
+
iface_for_remote_addr() {
set -- $(ip -o route get to $1)
echo $5
@@ -191,7 +220,7 @@ ibft_to_cmdline() {
for iface in /sys/firmware/ibft/ethernet*; do
local mac="" dev=""
local dhcp="" ip="" gw="" mask="" hostname=""
- local dns1 dns2
+ local dns1 dns2 prefix
[ -e ${iface}/mac ] || continue
mac=$(read a < ${iface}/mac; echo $a)
@@ -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
+ # Prefix defaults to 64 for IPv6
[ -n "$prefix" ] || prefix=64
ip="[${ip}/${prefix}]"
mask=
@@ -243,6 +273,11 @@ ibft_to_cmdline() {
if [ -n "$gw" ] ; then
gw="[${gw}]"
fi
+ else
+ if [ -n "$prefix" ] ; then
+ ip="$ip/$prefix"
+ mask=
+ fi
fi
if [ -n "$ip" ] && [ -n "$mask" -o -n "$prefix" ]; then
echo "ip=$ip::$gw:$mask:$hostname:$dev:none${dns1:+:$dns1}${dns2:+:$dns2}"
@@ -251,6 +286,7 @@ ibft_to_cmdline() {
warn "ip-addr=$ip"
warn "gateway=$gw"
warn "subnet-mask=$mask"
+ warn "prefix-len=$prefix"
warn "hostname=$hostname"
fi
else
@@ -379,7 +415,7 @@ ip_to_var() {
fi
done
- unset ip srv gw mask hostname dev autoconf macaddr mtu dns1 dns2
+ unset ip srv gw mask prefix hostname dev autoconf macaddr mtu dns1 dns2
case $# in
0) autoconf="error" ;;
1) autoconf=$1 ;;
@@ -407,7 +443,7 @@ ip_to_var() {
# Extract prefix length from CIDR notation
case $ip in
*/*)
- mask=${ip##*/}
+ prefix=${ip##*/}
ip=${ip%/*}
;;
esac
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
++++++ 0126-01fips-Add-drbg-module-to-force-loaded-modules.patch ++++++
From f0c3f53ee00d1934a0df3f86c897a2ca51df86a0 Mon Sep 17 00:00:00 2001
From: Marcus Meissner
Date: Fri, 18 Jul 2014 15:53:22 +0200
Subject: 01fips: Add drbg module to force loaded modules
References: bnc#875855
Signed-off-by: Marcus Meissner
---
modules.d/01fips/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 "
- # once it is in the kernel: _fipsmodules+="drbg "
+ _fipsmodules+="drbg "
mkdir -m 0755 -p "${initdir}/etc/modprobe.d"
--
1.8.4.5
++++++ 0127-99base-Increase-initqueue-timeout-in-non-systemd-cas.patch ++++++
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
++++++ 0128-90lvm-Install-dm-snapshot-module.patch ++++++
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
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
bnc#888530
Signed-off-by: Thomas Renninger
---
modules.d/90lvm/module-setup.sh | 4 ++++
1 file changed, 4 insertions(+)
Index: dracut-037/modules.d/90lvm/module-setup.sh
===================================================================
--- dracut-037.orig/modules.d/90lvm/module-setup.sh 2015-10-14 15:09:14.422993346 +0200
+++ dracut-037/modules.d/90lvm/module-setup.sh 2015-10-14 15:09:57.237412101 +0200
@@ -44,6 +44,10 @@ cmdline() {
done
}
+installkernel() {
+ hostonly='' instmods dm-snapshot
+}
+
# called by dracut
install() {
local _i
++++++ 0129-Revert-commit-6ecab258710d158a7a6-and-only-do-not-wa.patch ++++++
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
++++++ 0130-nfs-Always-add-all-kernel-modules-for-kdump.patch ++++++
From 520f0e9185774956e5739841ce87474fcee52594 Mon Sep 17 00:00:00 2001
From: Thomas Renninger
Date: Mon, 28 Jul 2014 17:53:10 +0200
Subject: nfs: Always add all kernel modules for kdump
bnc#887906
Signed-off-by: Thomas Renninger
---
modules.d/95nfs/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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() {
- instmods nfs sunrpc ipv6 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files
+ hostonly='' instmods nfs sunrpc ipv6 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files lockd rpcsec_gss_krb5 auth_rpcgss
}
# called by dracut
--
1.8.4.5
++++++ 0131-40network-handle-prefixed-IP-addresses-correctly.patch ++++++
From fc03504435d8bf5d0a31b8c566c2e783fbb96ec6 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Wed, 30 Jul 2014 10:28:27 +0200
Subject: 40network: handle prefixed IP addresses correctly
If an IP address is given with prefix length ifup should be
parsing that correctly. And we should assume a prefix length
of /64 for IPv6 resp /24 for IPv4 if none were given.
References: bnc#880108
Signed-off-by: Hannes Reinecke
---
modules.d/40network/ifup.sh | 8 ++++++++
1 file changed, 8 insertions(+)
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)
+ if [ "${ip##*/}" != "${ip}" ] ; then
+ prefix="${ip##*/}"
+ ip="${ip%/*}"
+ fi
if strglobin $ip '*:*:*'; then
+ # Always assume /64 prefix for IPv6
+ [ -z "$prefix" ] && prefix=64
# note no ip addr flush for ipv6
ip addr add $ip/$prefix ${srv:+peer $srv} dev $netif
wait_for_ipv6_dad $netif
else
+ # Assume /24 prefix for IPv4
+ [ -z "$prefix" ] && prefix=24
ip addr flush dev $netif
ip addr add $ip/$prefix ${srv:+peer $srv} brd + dev $netif
fi
--
1.8.4.5
++++++ 0132-40network-fixup-static-network-configuration.patch ++++++
From 6fd2c01a1cd2dcbd7d2fc3bbe6e62c7d8336bf24 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Thu, 31 Jul 2014 09:21:14 +0200
Subject: 40network: fixup static network configuration
The static network configuration was broken; the 'gateway' was
written as the complete 'ip' command line, but simply sourced
later on.
The patch fixes the gateway registration that the '.gw' file
holds entire 'ip route' command lines, which just needs to
be evaluated later on.
Signed-off-by: Hannes Reinecke
---
modules.d/40network/ifup.sh | 13 +++++++++++++
modules.d/40network/module-setup.sh | 2 ++
modules.d/40network/net-lib.sh | 6 +++++-
3 files changed, 20 insertions(+), 1 deletion(-)
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 add default via $gw dev $netif > /tmp/net.$netif.gw
+
+ 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}
+ [ -z "$ifr_dest" -o -z "$ifr_gw" ] && continue
+ if [ "$ifr_if" = "-" ] ; then
+ echo ip route add $ifr_dest via $ifr_gw >> /tmp/net.$netif.gw
+ else
+ echo ip route add $ifr_dest via $ifr_gw dev $ifr_if >> /tmp/net.$netif.gw
+ fi
+ done
+
[ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
return 0
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-*
+ inst_multiple /etc/sysconfig/network/ifroute-*
+ inst_simple /etc/sysconfig/network/routes
}
inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \
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
- [ -e /tmp/net.$netif.gw ] && . /tmp/net.$netif.gw
[ -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
@@ -137,6 +136,11 @@ setup_net() {
# Note: This assumes that if no router is present the
# root server is on the same subnet.
+ if [ -e /tmp/net.$netif.gw ] ; then
+ while read line ; do
+ eval $line
+ done < /tmp/net.$netif.gw
+ fi
# 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
++++++ 0133-Allow-multiple-configurations-per-network-interface-.patch ++++++
From 114aadff326cb6ac63d2b3926fafe944b1670a62 Mon Sep 17 00:00:00 2001
From: Julian Wolf
Date: Thu, 31 Jul 2014 17:11:16 +0200
Subject: Allow multiple configurations per network interface bnc#887906
Signed-off-by: Julian Wolf
---
modules.d/40network/ifup.sh | 91 ++++++++++++++++++++++------------
modules.d/40network/net-genrules.sh | 2 +-
modules.d/40network/net-lib.sh | 4 +-
modules.d/40network/parse-ibft.sh | 4 +-
modules.d/40network/parse-ip-opts.sh | 14 ++---
5 files changed, 70 insertions(+), 45 deletions(-)
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
index 84dc530..0362287 100755
--- a/modules.d/40network/ifup.sh
+++ b/modules.d/40network/ifup.sh
@@ -91,6 +91,7 @@ else
fi
dhcp_apply() {
+ unset IPADDR INTERFACE BROADCAST NETWORK PREFIXLEN ROUTES GATEWAYS HOSTNAME DNSDOMAIN DNSSEARCH DNSSERVERS
if [ -f /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1} ]; then
. /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1}
else
@@ -132,24 +133,37 @@ dhcp_apply() {
[ -n "${HOSTNAME}" ] && hostname "$HOSTNAME"
# If nameserver= has not been specified, use what dhcp provides
- if [ ! -s /tmp/net.$netif.resolv.conf ]; then
+ if [ ! -s /tmp/net.$netif.resolv.conf.ipv${1:1:1} ]; then
if [ -n "${DNSDOMAIN}" ]; then
echo domain "${DNSDOMAIN}"
- fi >> /tmp/net.$netif.resolv.conf
+ fi >> /tmp/net.$netif.resolv.conf.ipv${1:1:1}
if [ -n "${DNSSEARCH}" ]; then
echo search "${DNSSEARCH}"
- fi >> /tmp/net.$netif.resolv.conf
+ fi >> /tmp/net.$netif.resolv.conf.ipv${1:1:1}
if [ -n "${DNSSERVERS}" ] ; then
for s in ${DNSSERVERS}; do
echo nameserver "$s"
done
- fi >> /tmp/net.$netif.resolv.conf
+ fi >> /tmp/net.$netif.resolv.conf.ipv${1:1:1}
fi
- [ -e /tmp/net.$netif.resolv.conf ] && \
- cp -f /tmp/net.$netif.resolv.conf /etc/resolv.conf
-
+ # copy resolv.conf if it doesn't exist yet, modify otherwise
+ if [ -e /tmp/net.$netif.resolv.conf.ipv${1:1:1} ] && [ ! -e /etc/resolv.conf ]; then
+ cp -f /tmp/net.$netif.resolv.conf.ipv${1:1:1} /etc/resolv.conf
+ else
+ if [ -n "$(sed -n '/^search .*$/p' /etc/resolv.conf)" ]; then
+ sed -i "s/\(^search .*\)$/\1 ${DNSSEARCH}/" /etc/resolv.conf
+ else
+ echo search ${DNSSEARCH} >> /etc/resolv.conf
+ fi
+ if [ -n "${DNSSERVERS}" ] ; then
+ for s in ${DNSSERVERS}; do
+ echo nameserver "$s"
+ done
+ fi >> /etc/resolv.conf
+ fi
+
info "DHCP is finished successfully"
return 0
}
@@ -171,9 +185,6 @@ do_dhcp() {
dhclient="wickedd-dhcp6"
fi
- # Address changed
- ip $1 addr flush dev "$netif"
-
if ! iface_has_link $netif; then
warn "No carrier detected"
warn "Trying to set $netif up..."
@@ -188,7 +199,6 @@ do_dhcp() {
$dhclient --test $netif > /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1}
dhcp_apply $1 || return $?
- echo $netif > /tmp/net.${netif}.did-setup
echo $netif > /tmp/setup_net_${netif}.ok
return 0
}
@@ -218,6 +228,31 @@ do_ipv6auto() {
# Handle static ip configuration
do_static() {
+ if [ "$autoconf" = "static" ] &&
+ [ -e /etc/sysconfig/network/ifcfg-${netif} ] ; then
+ # Pull in existing static configuration
+ . /etc/sysconfig/network/ifcfg-${netif}
+
+ # loop over all configurations in ifcfg-$netif (IPADDR*) and apply
+ for conf in ${!IPADDR@}; do
+ ip=${!conf}
+ [ -z "$ip" ] && continue
+ ext=${conf#IPADDR}
+ concat="PREFIXLEN$ext" && [ -n "${!concat}" ] && mtu=${!concat}
+ concat="MTU$ext" && [ -n "${!concat}" ] && mtu=${!concat}
+ concat="REMOTE_IPADDR$ext" && [ -n "${!concat}" ] && server=${!concat}
+ concat="GATEWAY$ext" && [ -n "${!concat}" ] && gw=${!concat}
+ concat="BOOTPROTO$ext" && [ -n "${!concat}" ] && autoconf=${!concat}
+ do_static_setup
+ done
+ else
+ do_static_setup
+ fi
+
+ return 0
+}
+
+do_static_setup() {
strglobin $ip '*:*:*' && load_ipv6
linkup $netif
@@ -237,7 +272,6 @@ do_static() {
else
# Assume /24 prefix for IPv4
[ -z "$prefix" ] && prefix=24
- ip addr flush dev $netif
ip addr add $ip/$prefix ${srv:+peer $srv} brd + dev $netif
fi
@@ -256,8 +290,6 @@ do_static() {
done
[ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
-
- return 0
}
# loopback is always handled the same way
@@ -404,6 +436,14 @@ for p in $(getargs ip=); do
ip_to_var $p
# skip ibft
[ "$autoconf" = "ibft" ] && continue
+
+ # skip if same configuration appears twice
+ while read line
+ do
+ [ "$line" = "$p" ] && continue 2
+ done < /tmp/net.${netif}.conf
+
+ echo $p >> /tmp/net.${netif}.conf
case "$dev" in
??:??:??:??:??:??) # MAC address
@@ -421,29 +461,12 @@ for p in $(getargs ip=); do
[ "$use_bridge" != 'true' ] && \
[ "$use_vlan" != 'true' ] && continue
- if [ "$autoconf" = "static" ] &&
- [ -e /etc/sysconfig/network/ifcfg-${netif} ] ; then
- # Pull in existing static configuration
- . /etc/sysconfig/network/ifcfg-${netif}
- ip=${IPADDR}
- prefix=${PREFIXLEN}
- mtu=${MTU}
- server=${REMOTE_IPADDR}
- gw=${GATEWAY}
- autoconf=${BOOTPROTO}
- fi
-
# setup nameserver
namesrv="$dns1 $dns2 $(getargs nameserver)"
for s in $namesrv; do
echo nameserver $s >> /tmp/net.$netif.resolv.conf
done
- # Store config for later use
- for i in ip srv gw mask prefix hostname macaddr dns1 dns2; do
- eval '[ "$'$i'" ] && echo '$i'="$'$i'"'
- done > /tmp/net.$netif.override
-
case $autoconf in
dhcp4|dhcp|on|any)
do_dhcp -4 ;;
@@ -466,7 +489,6 @@ for p in $(getargs ip=); do
fi
fi
- exit 0
done
# netif isn't the top stack? Then we should exit here.
@@ -486,4 +508,9 @@ if [ ! -e /tmp/net.${netif}.up ]; then
fi
fi
+if [ -e /tmp/net.${netif}.up ]; then
+ > /tmp/net.$netif.did-setup
+ [ -e /sys/class/net/$netif/address ] && \
+ > /tmp/net.$(cat /sys/class/net/$netif/address).did-setup
+fi
exit 0
diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh
index 2fd8c6b..9d0ed20 100755
--- a/modules.d/40network/net-genrules.sh
+++ b/modules.d/40network/net-genrules.sh
@@ -99,7 +99,7 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
# if you change the name of "91-default-net.rules", also change modules.d/80cms/cmssetup.sh
if [ "$NEEDNET" = "1" ]; then
echo "$cond, $runcmd" > /etc/udev/rules.d/91-default-net.rules
- echo "[ -f /tmp/net.*.did-setup ]" >$hookdir/initqueue/finished/wait-network.sh
+ echo "ls -1 /tmp/net.*.did-setup >/dev/null 2>&1" >$hookdir/initqueue/finished/wait-network.sh
fi
fi
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
index fce845a..e8d898a 100755
--- a/modules.d/40network/net-lib.sh
+++ b/modules.d/40network/net-lib.sh
@@ -111,6 +111,7 @@ ifdown() {
ip addr flush dev $netif
echo "#empty" > /etc/resolv.conf
rm -f -- /tmp/net.$netif.did-setup
+ rm -f -- /tmp/net.$netif.conf
[ -e /sys/class/net/$netif/address ] && \
rm -f -- /tmp/net.$(cat /sys/class/net/$netif/address).did-setup
# TODO: send "offline" uevent?
@@ -165,9 +166,6 @@ setup_net() {
fi
unset layer2
- > /tmp/net.$netif.did-setup
- [ -e /sys/class/net/$netif/address ] && \
- > /tmp/net.$(cat /sys/class/net/$netif/address).did-setup
}
save_netinfo() {
diff --git a/modules.d/40network/parse-ibft.sh b/modules.d/40network/parse-ibft.sh
index 9776c75..b81ddb1 100755
--- a/modules.d/40network/parse-ibft.sh
+++ b/modules.d/40network/parse-ibft.sh
@@ -6,5 +6,7 @@ command -v getarg >/dev/null || . /lib/dracut-lib.sh
command -v ibft_to_cmdline >/dev/null || . /lib/net-lib.sh
# If ibft is requested, read ibft vals and write ip=XXX cmdline args
-[ "ibft" = "$(getarg ip=)" ] && ibft_to_cmdline
+for i in $(getargs ip=); do
+ [ "ibft" = "$i" ] && ibft_to_cmdline && break
+done
diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh
index 52a1923..13bc45c 100755
--- a/modules.d/40network/parse-ip-opts.sh
+++ b/modules.d/40network/parse-ip-opts.sh
@@ -78,24 +78,22 @@ for p in $(getargs ip=); do
die "Sorry, automatic calculation of netmask is not yet supported"
;;
auto6);;
- dhcp|dhcp6|on|any) \
- [ -n "$NEEDBOOTDEV" ] && [ -z "$dev" ] && \
- die "Sorry, 'ip=$p' does not make sense for multiple interface configurations"
- [ -n "$ip" ] && \
- die "For argument 'ip=$p'\nSorry, setting client-ip does not make sense for '$autoconf'"
- ;;
+ dhcp|dhcp6|on|any) ;;
*) die "For argument 'ip=$p'\nSorry, unknown value '$autoconf'";;
esac
+ dup=0
if [ -n "$dev" ] ; then
# We don't like duplicate device configs
if [ -n "$IFACES" ] ; then
for i in $IFACES ; do
- [ "$dev" = "$i" ] && die "For argument 'ip=$p'\nDuplication configurations for '$dev'"
+ [ "$dev" = "$i" ] && dup=1 && break
done
fi
# IFACES list for later use
- IFACES="$IFACES $dev"
+ if [ $dup -eq 0 ]; then
+ IFACES="$IFACES $dev"
+ fi
fi
# Do we need to check for specific options?
--
1.7.6.1
++++++ 0134-Remove-bootdev-warning-bnc-881112.patch ++++++
From 819be42f7f95d8bac0fd952a6fcc95df019064c7 Mon Sep 17 00:00:00 2001
From: Julian Wolf
Date: Tue, 12 Aug 2014 17:11:44 +0200
Subject: Remove bootdev warning (bnc#881112)
Signed-off-by: Julian Wolf
---
modules.d/40network/parse-ip-opts.sh | 19 ++-----------------
1 files changed, 2 insertions(+), 17 deletions(-)
diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh
index 13bc45c..abd8e17 100755
--- a/modules.d/40network/parse-ip-opts.sh
+++ b/modules.d/40network/parse-ip-opts.sh
@@ -21,23 +21,8 @@ if [ -n "$netroot" ] && [ -z "$(getarg ip=)" ] && [ -z "$(getarg BOOTIF=)" ]; th
return;
fi
-# Count ip= lines to decide whether we need bootdev= or not
-if [ -z "$NEEDBOOTDEV" ] ; then
- count=0
- for p in $(getargs ip=); do
- count=$(( $count + 1 ))
- done
- [ $count -gt 1 ] && NEEDBOOTDEV=1
-fi
-unset count
-
-# If needed, check if bootdev= contains anything usable
BOOTDEV=$(getarg bootdev=)
-if [ -n "$NEEDBOOTDEV" ] ; then
- [ -z "$BOOTDEV" ] && warn "Please supply bootdev argument for multiple ip= lines"
-fi
-
# Check ip= lines
# XXX Would be nice if we could errorcheck ip addresses here as well
for p in $(getargs ip=); do
@@ -46,14 +31,14 @@ for p in $(getargs ip=); do
# make first device specified the BOOTDEV
if [ -z "$BOOTDEV" ] && [ -n "$dev" ]; then
BOOTDEV="$dev"
- [ -n "$NEEDBOOTDEV" ] && warn "Setting bootdev to '$BOOTDEV'"
+ warn "Setting bootdev to '$BOOTDEV'"
fi
# skip ibft since we did it above
[ "$autoconf" = "ibft" ] && continue
# We need to have an ip= line for the specified bootdev
- [ -n "$NEEDBOOTDEV" ] && [ "$dev" = "$BOOTDEV" ] && BOOTDEVOK=1
+ [ "$dev" = "$BOOTDEV" ] && BOOTDEVOK=1
# Empty autoconf defaults to 'dhcp'
if [ -z "$autoconf" ] ; then
--
1.7.6.1
++++++ 0135-lvm-Fix-12819a579900b9691e2-check-for-existance-of-6.patch ++++++
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
++++++ 0136-Revert-95udev-rules-add-persistent-network-rule.patch ++++++
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
++++++ 0137-Switch-from-Mozilla-NSS-sha256hmac-checking-to-fipsc.patch ++++++
From 6a85f188d671723ad76bb729307c12e89199b7bd Mon Sep 17 00:00:00 2001
From: Marcus Meissner
Date: Thu, 14 Aug 2014 16:13:55 +0200
Subject: Switch from Mozilla NSS sha256hmac checking to fipscheck as
recommended
Signed-off-by: Thomas Renninger
---
modules.d/01fips/fips.sh | 6 ++----
modules.d/01fips/module-setup.sh | 13 +++++++------
2 files changed, 9 insertions(+), 10 deletions(-)
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
- HMAC_SUM_ORIG=$(cat $NEWROOT/boot/.vmlinuz-${KERNEL}.hmac | while read a b; do printf "%s\n" $a; done)
- HMAC_SUM_CALC=$(sha512hmac $kpath | while read a b; do printf "%s\n" $a; done || return 1)
- if [ -z "$HMAC_SUM_ORIG" ] || [ -z "$HMAC_SUM_CALC" ] || [ "${HMAC_SUM_ORIG}" != "${HMAC_SUM_CALC}" ]; then
+ if fipscheck $NEWROOT/boot/vmlinuz-${KERNEL} ; then
warn "HMAC sum mismatch"
return 1
fi
@@ -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
- sha512hmac -c "/boot/.vmlinuz-${KERNEL}.hmac" || return 1
+ fipscheck "/boot/vmlinuz-${KERNEL}" || return 1
fi
info "All initrd crypto checks done"
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 "
- _fipsmodules+="drbg "
+ _fipsmodules+="drbg"
mkdir -m 0755 -p "${initdir}/etc/modprobe.d"
@@ -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 strace
- inst_libdir_file libsoftokn3.so libsoftokn3.so \
- libsoftokn3.chk libfreebl3.so libfreebl3.chk \
- libssl.so 'hmaccalc/sha512hmac.hmac' libssl.so.10 \
+ inst_libdir_file \
+ fipscheck .fipscheck.hmac \
+ libfipscheck.so.1 \
+ .libfipscheck.so.1.hmac .libfipscheck.so.1.1.0.hmac \
+ libcrypto.so.1.0.0 libssl.so.1.0.0 \
.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
# we do not use prelink at SUSE
#inst_multiple -o prelink
--
1.7.6.1
++++++ 0138-warpclock-Do-not-use-warpclock-module-on-S390-x-hwcl.patch ++++++
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
++++++ 0139-dracut.sh-check-for-logfile-logfile-option-and-creat.patch ++++++
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
++++++ 0140-dracut.sh-Avoid-duplicate-devices-in-host_devs.patch ++++++
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
++++++ 0141-iscsi-Avoid-bad-ip-route-call-on-empty-address.patch ++++++
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
++++++ 0142-40network-Don-t-report-error-for-etc-sysconfig-netwo.patch ++++++
From fac3fb787b0a74cf8d9d32939dd6d6831342a25d Mon Sep 17 00:00:00 2001
From: Julian Wolf
Date: Tue, 19 Aug 2014 12:39:18 +0200
Subject: 40network: Don't report error for /etc/sysconfig/network/ifroute-*
during module setup
Signed-off-by: Julian Wolf
---
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 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-*
- inst_multiple /etc/sysconfig/network/ifroute-*
+ inst_multiple -o /etc/sysconfig/network/ifroute-*
inst_simple /etc/sysconfig/network/routes
}
--
1.8.4.5
++++++ 0143-iscsi-Fix-up-ipv6-in-brackets-iterate-over-all-possi.patch ++++++
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
++++++ 0144-90crypt-Fixed-crypttab_contains-to-also-work-with-de.patch ++++++
From 7f4dea242398cc369ff3fecd599faa00d81a522c Mon Sep 17 00:00:00 2001
From: Julian Wolf
Date: Tue, 19 Aug 2014 16:23:59 +0200
Subject: 90crypt: Fixed crypttab_contains() to also work with device path in
/etc/crypttab
blkid is not available when this function is called, so block_uuid.map is put into
the initrd, mapping block devices from /etc/crypttab to UUIDs.
This fixes a bug where udev rules were created by mistake as crypttab_contains()
returned false for devices specified by path in /etc/crypttab which resulted in
error messages during boot.
Signed-off-by: Julian Wolf
---
modules.d/90crypt/crypt-lib.sh | 9 +++++++++
modules.d/90crypt/module-setup.sh | 4 ++++
2 files changed, 13 insertions(+)
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"
+ local _uuid _line
local l d rest
if [ -f /etc/crypttab ]; then
while read l d rest; do
strstr "${l##luks-}" "${luks##luks-}" && return 0
strstr "$d" "${luks##luks-}" && return 0
+ if [ -e /usr/lib/dracut/modules.d/90crypt/block_uuid.map ]; then
+ # search for line starting with $d
+ _line=$(sed -n "\,^$d .*$,{p}" /usr/lib/dracut/modules.d/90crypt/block_uuid.map)
+ [ -z "$_line" ] && continue
+ # get second column with uuid
+ _uuid="$(echo $_line | sed 's,^.* \(.*$\),\1,')"
+ strstr "$_uuid" "${luks##luks-}" && return 0
+ fi
done < /etc/crypttab
fi
return 1
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
+ > /tmp/dracut_block_uuid.map
if [[ $hostonly ]] && [[ -f /etc/crypttab ]]; then
# filter /etc/crypttab for the devices we need
while read _mapper _dev _rest; do
@@ -74,6 +75,8 @@ install() {
[[ $_dev == UUID=* ]] && \
_dev="/dev/disk/by-uuid/${_dev#UUID=}"
+ echo "$_dev $(blkid $_dev -s UUID -o value)" >> /tmp/dracut_block_uuid.map
+
for _hdev in "${!host_fs_types[@]}"; do
[[ ${host_fs_types[$_hdev]} == "crypto_LUKS" ]] || continue
if [[ $_hdev -ef $_dev ]] || [[ /dev/block/$_hdev -ef $_dev ]]; then
@@ -85,6 +88,7 @@ install() {
fi
inst_simple "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh"
+ inst_simple "/tmp/dracut_block_uuid.map" "/usr/lib/dracut/modules.d/90crypt/block_uuid.map"
inst_multiple -o \
$systemdutildir/system-generators/systemd-cryptsetup-generator \
--
1.8.4.5
++++++ 0145-40network-handle-ip-ifname-static-correctly.patch ++++++
From 4b0e5841ce7dbeca5186e0d47f8835b00007cd6e Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Thu, 21 Aug 2014 12:46:45 +0200
Subject: 40network: handle 'ip=ifname:static' correctly
'static' configuration means 'apply the settings from the ifcfg file'.
Which might be either static or dhcp.
And for multiple configurations the first configuration can be
either dhcp or static; only the following configurations must
be static.
References: bnc#892801
Signed-off-by: Hannes Reinecke
---
modules.d/40network/ifup.sh | 40 ++++++++++++++++++++++++++++++----------
1 file changed, 30 insertions(+), 10 deletions(-)
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
index 0362287..5cd4f68 100755
--- a/modules.d/40network/ifup.sh
+++ b/modules.d/40network/ifup.sh
@@ -178,11 +178,13 @@ do_dhcp() {
info "Preparation for DHCP transaction"
+ [ -d /var/lib/wicked ] || mkdir -p /var/lib/wicked
+
local dhclient=''
- if [ "$1" = "-4" ] ; then
- dhclient="wickedd-dhcp4"
- elif [ "$1" = "-6" ] ; then
+ if [ "$1" = "-6" ] ; then
dhclient="wickedd-dhcp6"
+ else
+ dhclient="wickedd-dhcp4"
fi
if ! iface_has_link $netif; then
@@ -226,33 +228,49 @@ do_ipv6auto() {
return 0
}
-# Handle static ip configuration
-do_static() {
+# Handle ip configuration via ifcfg files
+do_ifcfg() {
if [ "$autoconf" = "static" ] &&
[ -e /etc/sysconfig/network/ifcfg-${netif} ] ; then
# Pull in existing static configuration
. /etc/sysconfig/network/ifcfg-${netif}
+ # The first configuration can be anything
+ [ -n "$PREFIXLEN" ] && prefix=${PREFIXLEN}
+ [ -n "$MTU" ] && mtu=${MTU}
+ [ -n "$REMOTE_IPADDR" ] && server=${REMOTE_IPADDR}
+ [ -n "$GATEWAY" ] && gw=${GATEWAY}
+ [ -n "$BOOTPROTO" ] && autoconf=${BOOTPROTO}
+ case "$autoconf" in
+ dhcp6)
+ load_ipv6
+ do_dhcp -6 ;;
+ dhcp*)
+ do_dhcp -4 ;;
+ *)
+ do_static ;;
+ esac
# loop over all configurations in ifcfg-$netif (IPADDR*) and apply
for conf in ${!IPADDR@}; do
ip=${!conf}
[ -z "$ip" ] && continue
ext=${conf#IPADDR}
- concat="PREFIXLEN$ext" && [ -n "${!concat}" ] && mtu=${!concat}
+ concat="PREFIXLEN$ext" && [ -n "${!concat}" ] && prefix=${!concat}
concat="MTU$ext" && [ -n "${!concat}" ] && mtu=${!concat}
concat="REMOTE_IPADDR$ext" && [ -n "${!concat}" ] && server=${!concat}
concat="GATEWAY$ext" && [ -n "${!concat}" ] && gw=${!concat}
- concat="BOOTPROTO$ext" && [ -n "${!concat}" ] && autoconf=${!concat}
- do_static_setup
+ # Additional configurations must be static
+ do_static
done
else
- do_static_setup
+ do_static
fi
return 0
}
-do_static_setup() {
+# Handle static ip configuration
+do_static() {
strglobin $ip '*:*:*' && load_ipv6
linkup $netif
@@ -475,6 +493,8 @@ for p in $(getargs ip=); do
do_dhcp -6 ;;
auto6)
do_ipv6auto ;;
+ static)
+ do_ifcfg ;;
*)
do_static ;;
esac
--
1.8.4.5
++++++ 0146-dracut.sh-corrected-logfile-check.patch ++++++
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
++++++ 0147-dracut.sh-Fix-UUID-fstab-parsing-in-case-mount-optio.patch ++++++
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
++++++ 0148-dracut.sh-Fix-LABEL-and-other-fstab-syntax.patch ++++++
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
++++++ 0149-dracut.sh-Fix-fstab-parsing-again.patch ++++++
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
++++++ 0150-Find-kernel-modules-in-extra-and-weak-updates-path-a.patch ++++++
From b5a5fb4486dee09287df825ecd1d2f8b76a98682 Mon Sep 17 00:00:00 2001
From: Martin Wilck
Date: Fri, 29 Aug 2014 15:42:51 +0200
Subject: Find kernel modules in extra and weak-updates path also
Signed-off-by: Thomas Renninger
---
dracut-functions.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
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
- [[ $a = */$1/* ]] || [[ $a = updates/* ]] || continue
+ [[ $a = */$1/* ]] || [[ $a = updates/* ]] || [[ $a = extra/* ]] || [[ $a = weak-updates/* ]] || continue
printf "%s\n" "$srcmods/$a"
done < "$srcmods/modules.dep"
IFS=$_OLDIFS
--
1.7.6.1
++++++ 0151-Go-back-to-xz-again-pixz-may-use-too-much-memory-whi.patch ++++++
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
++++++ 0152-Add-a-comment-to-easily-add-debug-modules-also-add-v.patch ++++++
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
++++++ 0153-Only-add-network-module-on-request-and-on-dependenci.patch ++++++
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
++++++ 0154-resume-Also-allow-this-module-on-S390-again-s2disk-c.patch ++++++
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
++++++ 0155-iscsi-iscsi.initiator-and-others-can-and-must-only-s.patch ++++++
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
++++++ 0156-dracut.usage.asc-Remove-distro-specific-help-from-ma.patch ++++++
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
++++++ 0157-Add-boot-zipl-to-host-devs-if-it-is-a-mount-point.patch ++++++
From 7067073ca16b10749edd6a508e3c4b1c38c3c7c2 Mon Sep 17 00:00:00 2001
From: Thomas Renninger
Date: Thu, 11 Sep 2014 15:17:10 +0200
Subject: Add /boot/zipl to host devs if it is a mount point
bnc#892187
Signed-off-by: Thomas Renninger
---
dracut.sh | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
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" \
+ "/boot/zipl" \
;
do
mp=$(readlink -f "$mp")
--
1.7.6.1
++++++ 0158-Add-SUSE-kernel-module-dependencies-in-etc-modprobe..patch ++++++
From 75faba5ea84fe53df7d3ca3e4f4b6cf390c824bb Mon Sep 17 00:00:00 2001
From: Jan Loseser
Date: Thu, 11 Sep 2014 15:20:23 +0200
Subject: Add SUSE kernel module dependencies (in /etc/modprobe.d/*)
bnc#895331
CC: Jan Loeser
---
dracut-functions.sh | 6 +++++-
dracut.sh | 12 ++++++++++++
2 files changed, 17 insertions(+), 1 deletions(-)
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" ]; 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
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
+# parse SUSE kernel module dependencies
+# Kernel modules using "load_module" function may not show up in modprobe
+# depencies. While this is the case there is a workaround in SUSE which adds:
+# # SUSE_INITRD: module_name REQUIRES module1 module2 ...
+# to /etc/modprobe.d/*.conf
+declare -A suse_mod_deps
+while read -r line; do
+ _suse_mod="${line##*SUSE INITRD: }"
+ _suse_mod="${_suse_mod%% REQUIRES*}"
+ suse_mod_deps["$_suse_mod"]="${suse_mod_deps["$_suse_mod"]} ${line##*REQUIRES }"
+done <<< "$(grep -h "^# SUSE INITRD: " /etc/modprobe.d/[0-9][0-9]*.conf)"
+
# handle compression options.
[[ $compress ]] || compress="gzip"
case $compress in
--
1.7.6.1
++++++ 0159-network-Try-to-load-xennet.patch ++++++
From 2a73a8c956bd3b34f19cadd17b44303d8c104a53 Mon Sep 17 00:00:00 2001
From: Thomas Renninger
Date: Fri, 19 Sep 2014 15:34:54 +0200
Subject: network: Try to load xennet
bnc#896464, bnc#896259
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 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 \
- ecb arc4 bridge stp llc ipv6 bonding 8021q af_packet virtio_net
+ ecb arc4 bridge stp llc ipv6 bonding 8021q af_packet virtio_net xennet
}
# called by dracut
--
1.7.6.1
++++++ 0160-nfs-Add-ip-.-and-root-nfs.-parameters-to-internal-dr.patch ++++++
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
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
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
++++++ 0161-Fix-error-message-when-there-are-no-internal-kernel-.patch ++++++
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
++++++ 0162-network-Request-DHCP-lease-instead-of-getting-applyi.patch ++++++
From b4216546ff3254f2ca21c6b29c745e1bfd4956cc Mon Sep 17 00:00:00 2001
From: Pawel Wieczorkiewicz
Date: Wed, 24 Sep 2014 18:14:37 +0200
Subject: network: Request DHCP lease instead of getting/applying the offer
- Request ipv6 lease in proper mode: auto when auto6+dhcp6 requested
otherwise managed mode
- wait for DAD results in case of ipv6
Signed-off-by: Pawel Wieczorkiewicz
---
modules.d/40network/ifup.sh | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
index 5cd4f68..1ff1a4a 100755
--- a/modules.d/40network/ifup.sh
+++ b/modules.d/40network/ifup.sh
@@ -182,9 +182,15 @@ do_dhcp() {
local dhclient=''
if [ "$1" = "-6" ] ; then
- dhclient="wickedd-dhcp6"
+ local ipv6_mode=''
+ if [ -f /tmp/net.$netif.auto6 ] ; then
+ ipv6_mode="auto"
+ else
+ ipv6_mode="managed"
+ fi
+ dhclient="wickedd-dhcp6 --test --test-mode $ipv6_mode"
else
- dhclient="wickedd-dhcp4"
+ dhclient="wickedd-dhcp4 --test"
fi
if ! iface_has_link $netif; then
@@ -198,10 +204,14 @@ do_dhcp() {
fi
echo "Starting dhcp for interface $netif"
- $dhclient --test $netif > /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1}
+ $dhclient --test-format leaseinfo --test-output /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1} --test-request - $netif << EOF
+<request type="lease"/>
+EOF
dhcp_apply $1 || return $?
+ if [ "$1" = "-6" ] ; then
+ wait_for_ipv6_dad $netif
+ fi
- echo $netif > /tmp/setup_net_${netif}.ok
return 0
}
@@ -220,6 +230,7 @@ do_ipv6auto() {
echo 0 > /proc/sys/net/ipv6/conf/$netif/forwarding
echo 1 > /proc/sys/net/ipv6/conf/$netif/accept_ra
echo 1 > /proc/sys/net/ipv6/conf/$netif/accept_redirects
+ echo 1 > /proc/sys/net/ipv6/conf/$netif/autoconf
linkup $netif
wait_for_ipv6_auto $netif
@@ -492,6 +503,7 @@ for p in $(getargs ip=); do
load_ipv6
do_dhcp -6 ;;
auto6)
+ echo $netif > /tmp/net.$netif.auto6
do_ipv6auto ;;
static)
do_ifcfg ;;
--
1.7.6.1
++++++ 0163-Install-etc-sysconfig-console-to-see-specific-fonts.patch ++++++
From 4ef054c0510f24e8652726674461833a33643b26 Mon Sep 17 00:00:00 2001
From: Thomas Renninger
Date: Tue, 30 Sep 2014 16:58:05 +0200
Subject: Install /etc/sysconfig/console to see specific fonts
bnc#897972
Author: Werner Fink
Signed-off-by: Thomas Renninger
---
modules.d/10i18n/module-setup.sh | 4 ++++
1 file changed, 4 insertions(+)
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
+ if dracut_module_included "systemd" && [[ -f /etc/sysconfig/console ]]; then
+ inst_simple /etc/sysconfig/console
+ fi
+
return 0
}
--
1.8.4.5
++++++ 0164-Fix-initramfs-ver.img-vs-initrd-ver-in-dracut-initra.patch ++++++
From 76396977ee19d97697226bda13de007030433854 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?=
Date: Wed, 15 Oct 2014 17:50:36 +0200
Subject: Fix initramfs-$ver.img vs initrd-$ver in dracut-initramfs-restore.sh
dracut-shutdown.service invokes dracut-initramfs-restore script which
will never work in openSUSE because initrd images are named initrd not
initramfs.
---
dracut-initramfs-restore.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
-[[ -f $IMG ]] || IMG="/boot/initramfs-${KERNEL_VERSION}.img"
+[[ -f $IMG ]] || IMG="/boot/initrd-${KERNEL_VERSION}"
cd /run/initramfs
--
1.8.4.5
++++++ 0165-Order-root-fsck-after-pre-mount.patch ++++++
From: Andrei Borzenkov
Subject: ensure pre-mount (and resume) run before root fsck
References: bnc#906592
Index: dracut-037/modules.d/98systemd/rootfs-generator.sh
===================================================================
--- 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
}
+generator_fsck_after_pre_mount()
+{
+ local _name
+
+ [ -z "$1" ] && return 0
+
+ _name=$(dev_unit_name "$1")
+ [ -d /run/systemd/generator/systemd-fsck@${_name}.service.d ] || mkdir -p /run/systemd/generator/systemd-fsck@${_name}.service.d
+ if ! [ -f /run/systemd/generator/systemd-fsck@${_name}.service.d/after-pre-mount.conf ]; then
+ {
+ echo "[Unit]"
+ echo "After=dracut-pre-mount.service"
+ } > /run/systemd/generator/systemd-fsck@${_name}.service.d/after-pre-mount.conf
+ fi
+
+}
+
root=$(getarg root=)
case "$root" in
block:LABEL=*|LABEL=*)
@@ -94,6 +111,7 @@ esac
if [ "${root%%:*}" = "block" ]; then
generator_wait_for_dev "${root#block:}" "$RDRETRY"
+ generator_fsck_after_pre_mount "${root#block:}"
grep -q 'root=' /proc/cmdline || generator_mount_rootfs "${root#block:}" "$(getarg rootfstype=)" "$(getarg rootflags=)"
fi
++++++ 0166-nfs-Add-ifname-dev-mac-to-boot-parameters.patch ++++++
From 85b55c7a4c6750c88415c376b516c25d7b2e5944 Mon Sep 17 00:00:00 2001
From: Thomas Renninger
Date: Fri, 17 Oct 2014 12:47:51 +0200
Subject: nfs: Add ifname=$dev:$mac to boot parameters
This is needed to be able to uniqule identify the NIC, also if renaming
of the network device is in place.
References: bnc#900831
Signed-off-by: Thomas Renninger
---
modules.d/95nfs/module-setup.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh
index b6ddb21..cc11d98 100755
--- a/modules.d/95nfs/module-setup.sh
+++ b/modules.d/95nfs/module-setup.sh
@@ -60,6 +60,11 @@ cmdline() {
nfs_address=${lookup##* }
fi
ifname=$(ip -o route get to $nfs_address | sed -n 's/.*dev \([^ ]*\).*/\1/p')
+ if [ -e /sys/class/net/$ifname/address ] ; then
+ ifmac=$(cat /sys/class/net/$ifname/address)
+ printf 'ifname=%s:%s ' ${ifname} ${ifmac}
+ fi
+
printf 'ip=%s:static\n' ${ifname}
}
--
1.8.4.5
++++++ 0167-98systemd-rootfs-generator-Use-builtins-instead-of-g.patch ++++++
From 0b9f9d4d5417c3ad58778dedf7bd2228cc1153c6 Mon Sep 17 00:00:00 2001
From: Julian Wolf
Date: Fri, 17 Oct 2014 13:54:29 +0200
Subject: 98systemd/rootfs-generator: Use builtins instead of 'grep'
References: bnc#897252
Signed-off-by: Julian Wolf
---
modules.d/98systemd/rootfs-generator.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules.d/98systemd/rootfs-generator.sh b/modules.d/98systemd/rootfs-generator.sh
index 8473784..d9b7be2 100755
--- a/modules.d/98systemd/rootfs-generator.sh
+++ b/modules.d/98systemd/rootfs-generator.sh
@@ -112,7 +112,8 @@ esac
if [ "${root%%:*}" = "block" ]; then
generator_wait_for_dev "${root#block:}" "$RDRETRY"
generator_fsck_after_pre_mount "${root#block:}"
- grep -q 'root=' /proc/cmdline || generator_mount_rootfs "${root#block:}" "$(getarg rootfstype=)" "$(getarg rootflags=)"
+ cmdline=$(
From dbcb0516d9c3270138849f444f40237d1b14797e Mon Sep 17 00:00:00 2001
From: Julian Wolf
Date: Fri, 24 Oct 2014 17:07:07 +0200
Subject: Enable warning for failed kernel moduiles
Enabled Warning for failed kernel modules per default
and added summary of those to the end of dracut output
References: bnc#886839
Signed-off-by: Julian Wolf
---
dracut-functions.sh | 11 +++++------
dracut.sh | 9 +++++++++
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index 7d81f65..6a58957 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -1642,14 +1642,10 @@ instmods() {
[[ $no_kernel = yes ]] && return
# called [sub]functions inherit _fderr
local _fderr=9
- local _check=no
+ local _check=yes
local _silent=no
- if [[ $1 = '-c' ]]; then
- _check=yes
- shift
- fi
-
if [[ $1 = '-s' ]]; then
+ _check=no
_silent=yes
shift
fi
@@ -1669,6 +1665,7 @@ instmods() {
# Check for aliased modules
_modalias=$(modinfo -k $kernel -F filename $_mod 2> /dev/null)
_modalias=${_modalias%.ko}
+ [[ -z "$_modalias" ]] && return 1
if [ "${_modalias##*/}" != "$_mod" ] ; then
_mod=${_modalias##*/}
fi
@@ -1726,6 +1723,7 @@ instmods() {
if [[ "$_check" == "yes" ]] && [[ "$_silent" == "no" ]]; then
dfatal "Failed to install module $_mod"
fi
+ echo $_mod >> /tmp/dracut_failed_drivers
}
done
fi
@@ -1734,6 +1732,7 @@ instmods() {
if [[ "$_check" == "yes" ]] && [[ "$_silent" == "no" ]]; then
dfatal "Failed to install module $1"
fi
+ echo $1 >> /tmp/dracut_failed_drivers
}
shift
done
diff --git a/dracut.sh b/dracut.sh
index eab56f5..056011c 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -402,6 +402,8 @@ verbosity_mod_l=0
unset kernel
unset outfile
+> /tmp/dracut_failed_drivers
+
rearrange_params "$@"
eval set -- "$TEMP"
@@ -1590,6 +1592,13 @@ if ! ( umask 077; cd "$initdir"; find . -print0 | cpio --null $cpio_owner_root -
fi
dinfo "*** Creating image file done ***"
+if [[ -s /tmp/dracut_failed_drivers ]]; then
+ dwarn "Some kernel modules could not be included: "
+ while read line; do
+ dwarn "$line"
+ done < /tmp/dracut_failed_drivers
+fi
+
if (( maxloglvl >= 5 )); then
if [[ $allowlocal ]]; then
"$dracutbasedir/lsinitrd.sh" "$outfile"| ddebug
--
1.8.4.5
++++++ 0171-also-add-the-cmac.ko-cryptographic-module-to-the-mod.patch ++++++
From 6165d3a2e49a9745d3ec4ed8d87c78c07ac16331 Mon Sep 17 00:00:00 2001
From: Marcus Meissner
Date: Fri, 14 Nov 2014 14:47:10 +0100
Subject: also add the cmac.ko cryptographic module to the modules bnc#905296
Conflicts:
modules.d/01fips/module-setup.sh
---
modules.d/01fips/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh
index 009b2ca..9c46904 100755
--- a/modules.d/01fips/module-setup.sh
+++ b/modules.d/01fips/module-setup.sh
@@ -17,7 +17,7 @@ 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+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 "
+ _fipsmodules+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 cmac "
_fipsmodules+="rmd160 rmd256 rmd320 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 "
_fipsmodules+="sha512-ssse3 sha1-ssse3 sha256-ssse3 "
--
1.8.4.5
++++++ 0172-i18n_add_correct_fontmaps.patch ++++++
From 74a7499726d7be15abaeddf32a59278d69e18a7c Mon Sep 17 00:00:00 2001
From: Fabian Vogt
Date: Thu, 17 Sep 2015 15:10:54 +0200
Subject: [PATCH] Install correct FONT_MAP files
Not all files under /usr/share/kbd/consoletrans follow the same scheme,
some use ${FONT_MAP}, others ${FONT_MAP}.trans or even ${FONT_MAP}_to_uni.trans.
This patch makes sure that the correct files are installed into the initrd.
References: boo#932981 boo#943312 bnc#904214
Signed-off-by: Fabian Vogt
---
modules.d/10i18n/module-setup.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh
index f7ec0d9..494891b 100755
--- a/modules.d/10i18n/module-setup.sh
+++ b/modules.d/10i18n/module-setup.sh
@@ -198,7 +198,11 @@ install() {
if [[ ${FONT_MAP} ]]
then
FONT_MAP=${FONT_MAP%.trans}
- inst_simple ${kbddir}/consoletrans/${FONT_MAP}.trans
+ # There are three different formats that setfont supports
+ inst_simple ${kbddir}/consoletrans/${FONT_MAP} \
+ || inst_simple ${kbddir}/consoletrans/${FONT_MAP}.trans \
+ || inst_simple ${kbddir}/consoletrans/${FONT_MAP}_to_uni.trans \
+ || dwarn "Could not find FONT_MAP ${FONT_MAP}!"
fi
if [[ ${FONT_UNIMAP} ]]
--
2.5.1
++++++ 0173-Follow-symbolic-links-for-kernel-arguments-bnc-90237.patch ++++++
From a1e686b0f08c8a071ff79aa921ceea5890466ebf Mon Sep 17 00:00:00 2001
From: Julian Wolf
Date: Tue, 9 Dec 2014 17:49:24 +0100
Subject: Follow symbolic links for kernel arguments (bnc#902375)
Signed-off-by: Julian Wolf
---
mkinitrd-suse.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/mkinitrd-suse.sh b/mkinitrd-suse.sh
index 5b32e6c..0f19279 100755
--- a/mkinitrd-suse.sh
+++ b/mkinitrd-suse.sh
@@ -211,6 +211,7 @@ while (($# > 0)); do
-k) # Would be nice to get a list of images here
read_arg kernel_images "$@" || shift $?
for kernel_image in $kernel_images;do
+ [ -L "/boot/$kernel_image" ] && kernel_image="$(readlink /boot/$kernel_image)"
kernels="$kernels ${kernel_image#*-}"
done
;;
--
1.8.4.5
++++++ 0174-fips-enable-aesni-interl.patch ++++++
From cd160463ae8dc5ee11dfeaafb989c6ca923eaf3b Mon Sep 17 00:00:00 2001
From: Marcus Meissner
Date: Fri, 6 Feb 2015 12:45:06 +0100
Subject: fips: enable aesni-interl
Put aesni-intel.ko into the initrd for FIPS usage.
References: bsc#914126
Signed-off-by: Marcus Meissner
---
modules.d/01fips/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh
index 9c46904..0e6d9ee 100755
--- a/modules.d/01fips/module-setup.sh
+++ b/modules.d/01fips/module-setup.sh
@@ -21,7 +21,7 @@ installkernel() {
_fipsmodules+="rmd160 rmd256 rmd320 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 "
_fipsmodules+="sha512-ssse3 sha1-ssse3 sha256-ssse3 "
- _fipsmodules+="ghash-clmulni-intel "
+ _fipsmodules+="ghash-clmulni-intel aesni-intel "
_fipsmodules+="drbg"
--
1.8.4.5
++++++ 0175-dracut-Fix-bad-array-subscript-messages.patch ++++++
From b683b230c15d6058367499fa4dc7027ab30a9542 Mon Sep 17 00:00:00 2001
From: Marcus Meissner
Date: Fri, 6 Feb 2015 12:52:29 +0100
Subject: dracut: Fix 'bad array subscript messages
Fix "bad array subscript" messages when adding kernel modules
using "/etc/dracut.conf".
References: bsc#911660
Signed-off-by: Marcus Meissner
---
dracut-functions.sh | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index 6a58957..338714c 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -1428,7 +1428,7 @@ install_kmod_with_fw() {
if [[ $omit_drivers ]]; then
local _kmod=${1##*/}
- _kmod=${_kmod%.ko}
+ _kmod=${_kmod%.ko*}
_kmod=${_kmod/-/_}
if [[ "$_kmod" =~ $omit_drivers ]]; then
dinfo "Omitting driver $_kmod"
@@ -1442,7 +1442,7 @@ install_kmod_with_fw() {
if [[ $silent_omit_drivers ]]; then
local _kmod=${1##*/}
- _kmod=${_kmod%.ko}
+ _kmod=${_kmod%.ko*}
_kmod=${_kmod/-/_}
[[ "$_kmod" =~ $silent_omit_drivers ]] && return 0
[[ "${1##*/lib/modules/$kernel/}" =~ $silent_omit_drivers ]] && return 0
@@ -1576,7 +1576,7 @@ module_is_host_only() {
local _mod=$1
local _modenc a i _k _s _v _aliases
_mod=${_mod##*/}
- _mod=${_mod%.ko}
+ _mod=${_mod%.ko*}
_modenc=${_mod//-/_}
[[ " $add_drivers " == *\ ${_mod}\ * ]] && return 0
@@ -1664,17 +1664,17 @@ instmods() {
_mod=${_mod##*/}
# Check for aliased modules
_modalias=$(modinfo -k $kernel -F filename $_mod 2> /dev/null)
- _modalias=${_modalias%.ko}
+ _modalias=${_modalias%.ko*}
[[ -z "$_modalias" ]] && return 1
- if [ "${_modalias##*/}" != "$_mod" ] ; then
+ if [ "${_modalias##*/}" != "${_mod%.ko*}" ] ; then
_mod=${_modalias##*/}
fi
# if we are already installed, skip this module and go on
# to the next one.
if [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && \
- [[ -f "$DRACUT_KERNEL_LAZY_HASHDIR/${_mod%.ko}.ko" ]]; then
- read _ret <"$DRACUT_KERNEL_LAZY_HASHDIR/${_mod%.ko}.ko"
+ [[ -f "$DRACUT_KERNEL_LAZY_HASHDIR/${_mod%.ko*}" ]]; then
+ read _ret <"$DRACUT_KERNEL_LAZY_HASHDIR/${_mod%.ko*}"
return $_ret
fi
@@ -1704,7 +1704,7 @@ instmods() {
((_ret+=$?))
else
if [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && [ -n "$_mod" ]; then
- echo $_mod >> "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist"
+ echo ${_mod%.ko*} >> "$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
--
1.8.4.5
++++++ 0177-90multipath-start-multipathd-after-udev.patch ++++++
From 142f9b9c2ae913ba258a88ac97735d095754d998 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Wed, 18 Mar 2015 11:27:00 +0100
Subject: 90multipath: start multipathd after udev
libdevmapper has an internal check if udev is running, and will
create device-nodes internally if it's not. So we need to start
multipathd after udev to avoid any failures.
References: bnc#903001
Signed-off-by: Hannes Reinecke
---
modules.d/90multipath/multipathd.service | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules.d/90multipath/multipathd.service b/modules.d/90multipath/multipathd.service
index 44a7b80..180cbff 100644
--- a/modules.d/90multipath/multipathd.service
+++ b/modules.d/90multipath/multipathd.service
@@ -1,6 +1,7 @@
[Unit]
Description=Device-Mapper Multipath Device Controller
Before=iscsi.service iscsid.service lvm2-activation-early.service
+After=systemd-udevd.service
DefaultDependencies=no
Conflicts=shutdown.target
--
1.8.4.5
++++++ 0178-Restore-handling-of-c.patch ++++++
From cd887ea614bc9f86f7e12101cf77f9f27e8b642f Mon Sep 17 00:00:00 2001
From: Marcus Meissner
Date: Mon, 23 Mar 2015 16:25:42 +0100
Subject: Restore handling of '-c'
Leave handling of the -c option in, in case dracut modules,
like fips, used instmod -c -s
References: bsc#886839
Signed-off-by: Marcus Meissner
---
dracut-functions.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index 338714c..8807073 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -1644,6 +1644,12 @@ instmods() {
local _fderr=9
local _check=yes
local _silent=no
+
+ # Leave this in for compatibility reasons.
+ if [[ $1 = '-c' ]]; then
+ _check=yes
+ shift
+ fi
if [[ $1 = '-s' ]]; then
_check=no
_silent=yes
--
1.8.4.5
++++++ 0179-qemu-add-virtio_rng-kernel-module.patch ++++++
From ffa4ff65547bc48b112411cd22ce6b482a7bb22a Mon Sep 17 00:00:00 2001
From: Harald Hoyer
Date: Thu, 8 Jan 2015 13:18:57 +0100
Subject: qemu: add virtio_rng kernel module
References: bsc#918238
---
modules.d/90qemu/module-setup.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules.d/90qemu/module-setup.sh b/modules.d/90qemu/module-setup.sh
index b005f6f..7cd2282 100755
--- a/modules.d/90qemu/module-setup.sh
+++ b/modules.d/90qemu/module-setup.sh
@@ -24,5 +24,8 @@ check() {
# called by dracut
installkernel() {
# qemu specific modules
- hostonly='' instmods virtio_blk virtio virtio_ring virtio_pci ata_piix ata_generic pata_acpi cdrom sr_mod ahci virtio_scsi
+ hostonly='' instmods \
+ ata_piix ata_generic pata_acpi cdrom sr_mod ahci \
+ virtio_blk virtio virtio_ring virtio_pci \
+ virtio_scsi virtio_console virtio_rng
}
--
1.8.4.5
++++++ 0200-fix_nfs_with_ip_instead_of_hostname.patch ++++++
Index: dracut-037/modules.d/95nfs/module-setup.sh
===================================================================
--- dracut-037.orig/modules.d/95nfs/module-setup.sh 2015-05-22 15:59:54.517359010 +0200
+++ dracut-037/modules.d/95nfs/module-setup.sh 2015-05-22 15:59:54.773373353 +0200
@@ -54,9 +54,9 @@
### ip= ###
if [[ $nfs_device = [0-9]*\.[0-9]*\.[0-9]*.[0-9]* ]] || [[ $nfs_device = \[.*\] ]]; then
- nfs_address="$nfs_device"
+ nfs_address="${nfs_device%%:*}"
else
- lookup=$(host $(echo ${nfs_device%%:*})| head -n1)
+ lookup=$(host "${nfs_device%%:*}"| head -n1)
nfs_address=${lookup##* }
fi
ifname=$(ip -o route get to $nfs_address | sed -n 's/.*dev \([^ ]*\).*/\1/p')
++++++ 0201-modsign_fix_keyctl_install.patch ++++++
From: Alexander Tsoy
Subject: modsign: do not hardcode path to keyctl
References: bnc#934736
Patch-Mainline: 039
Git-commit: 8ca5e8c319c3e44bbd06d8c0da429d2df221707b
Git-repo: git.kernel.org/pub/scm/boot/dracut/dracut.git
Signed-off-by: Thomas Renninger
https://bugs.gentoo.org/show_bug.cgi?id=506094
diff --git a/modules.d/03modsign/module-setup.sh b/modules.d/03modsign/module-setup.sh
index 09285d3..cc0e241 100755
--- a/modules.d/03modsign/module-setup.sh
+++ b/modules.d/03modsign/module-setup.sh
@@ -29,7 +29,7 @@ depends() {
# called by dracut
install() {
inst_dir /lib/modules/keys
- inst_binary /usr/bin/keyctl
+ inst_binary keyctl
inst_hook pre-trigger 01 "$moddir/load-modsign-keys.sh"
++++++ 0300-mdraid_tell_mainloop_if_we_make_progress.patch ++++++
From: NeilBrown
Subject: mdraid/mdraid_start.sh: tell mainloop if we make progress.
References: bnc#932735
Patch-Mainline:
Git-commit: 3b82ac169694cf21e6ebd4dbfb6efd89539da10e
Git-repo: git.kernel.org/pub/scm/boot/dracut/dracut.git
Signed-off-by: Thomas Renninger
mdraid_start is a number of scripts which run after a timeout.
If it makes progress, it should tell the main loop so that it
knows that it is worth waiting a bit longer.
So in that case, create the initqueue/work file which the main loop
checks for.
Signed-off-by: NeilBrown
Index: dracut-037/modules.d/90mdraid/mdraid_start.sh
===================================================================
--- dracut-037.orig/modules.d/90mdraid/mdraid_start.sh 2015-06-03 18:44:05.926126393 +0200
+++ dracut-037/modules.d/90mdraid/mdraid_start.sh 2015-06-03 18:44:11.206422671 +0200
@@ -29,6 +29,7 @@
_path_d="${_path_s%/*}/degraded"
[ ! -r "$_path_d" ] && continue
+ > $hookdir/initqueue/work
done
}
++++++ 0301-systemd_initqueue_continue_waiting_if_any_timeout_script_makes_progress.patch ++++++
From: NeilBrown
Subject: systemd/dracut-iniqueue - continue waiting if any timeout script makes progress
References: bnc#932735
Patch-Mainline:
Git-commit: 97cb17c792fd7fd65444a93e58970052ff812768
Git-repo: git.kernel.org/pub/scm/boot/dracut/dracut.git
Signed-off-by: Thomas Renninger
A number of timeout scripts can be registered. If any one of them
makes progress - e.g. assembles a degraded md array - then
the main loop should wait a bit longer rather than pressing forward.
This is particularly important is resume-from-hibernate requires a
degraded md array. Both the script to forcibly assemble the md array
and the script to abort hibernation if the device doesn't appear
are 'timeout' scripts. There needs to be a reasonable delay between
these running.
So: if any script has indicated that progress was made, break of out
the loop and go back to normal waiting.
Signed-off-by: NeilBrown
Index: dracut-037/modules.d/98systemd/dracut-initqueue.sh
===================================================================
--- dracut-037.orig/modules.d/98systemd/dracut-initqueue.sh 2014-03-19 17:16:08.000000000 +0100
+++ dracut-037/modules.d/98systemd/dracut-initqueue.sh 2015-06-03 18:18:56.193582052 +0200
@@ -62,6 +62,7 @@
job=$job . $job
udevadm settle --timeout=0 >/dev/null 2>&1 || main_loop=0
[ -f $hookdir/initqueue/work ] && main_loop=0
+ [ $main_loop -eq 0 ] && break
done
fi
++++++ 0302-dracut-systemd_rootfs-generator.sh_always_create_generated_files.patch ++++++
From: NeilBrown
Subject: dracut-systemd/rootfs-generator.sh: always create generated files.
References: bnc#932735
Patch-Mainline:
Git-commit: f53ede36fb26716301d57706f889124ca20f3397
Git-repo: git.kernel.org/pub/scm/boot/dracut/dracut.git
Signed-off-by: Thomas Renninger
When 'systemctl daemon-reload' is run, systemd will clean out
/run/systemd/generator and re-run all the generators.
So it is important that the generators always create the required
files.
rootfs-generator.sh currently does *not* create the desired files
if $hookdir/initqueue/finished/devexists-${_name}.sh
exists.
This is not removed by "systectl daemon-reload" so the first time this
generator is run it will do the right thing. Subsequent times it
won't.
This results in incorrect timeouts after "daemon-reload" is run.
So let the existence of each file only guard the creation that file.
Signed-off-by: NeilBrown
Index: dracut-037/modules.d/98systemd/rootfs-generator.sh
===================================================================
--- dracut-037.orig/modules.d/98systemd/rootfs-generator.sh 2015-06-03 18:44:04.486045580 +0200
+++ dracut-037/modules.d/98systemd/rootfs-generator.sh 2015-06-03 18:44:16.966745889 +0200
@@ -13,14 +13,15 @@
_timeout=$(getarg rd.timeout)
_timeout=${_timeout:-0}
- [ -e "$hookdir/initqueue/finished/devexists-${_name}.sh" ] && return 0
+ if ! [ -e "$hookdir/initqueue/finished/devexists-${_name}.sh" ]; then
- printf '[ -e "%s" ]\n' $1 \
- >> "$hookdir/initqueue/finished/devexists-${_name}.sh"
- {
- printf '[ -e "%s" ] || ' $1
- printf 'warn "\"%s\" does not exist"\n' $1
- } >> "$hookdir/emergency/80-${_name}.sh"
+ printf '[ -e "%s" ]\n' $1 \
+ >> "$hookdir/initqueue/finished/devexists-${_name}.sh"
+ {
+ printf '[ -e "%s" ] || ' $1
+ printf 'warn "\"%s\" does not exist"\n' $1
+ } >> "$hookdir/emergency/80-${_name}.sh"
+ fi
_name=$(dev_unit_name "$1")
if ! [ -L /run/systemd/generator/initrd.target.wants/${_name}.device ]; then
++++++ 0303-crypt_parse-crypt.sh_hide_encrypted_devices_from_systemd_timeout_warnings.patch ++++++
From: NeilBrown
Subject: crypt/parse-crypt.sh: hide encrypted devices from systemd timeout warnings.
References: bnc#932735
Patch-Mainline:
Git-commit: 4d9d767da2e5928552a9603d91382f8dc34cc26d
Git-repo: git.kernel.org/pub/scm/boot/dracut/dracut.git
Signed-off-by: Thomas Renninger
When systemd's crypttab generator parsed crypttab, it tells
systemd about several devices which may not appear until later
in the boot sequence, and which are not needed while dract is running.
This can particularly happen when an md array is encrypted,
and the array is newly degraded so that it doesn't appear until
dracut runs mdraid_start.sh.
This can result in systemd printing warning messages which are
inappropriate.
So tell systemd that the timeout for each of these is zero.
This is involves splitting some functionality out of wait_for_dev()
That function does two things:
- creates 'finished' hooks so that dracut will wait for the device,
and
- sets the systemd timeout for the device to zero, so systemd doesn't
wait.
We only want the second of these for most encrypted devices.
So split that out into a new function set_systemd_timeout_for_dev(),
and call it from parse-crypt.sh
Signed-off-by: NeilBrown
--
This version fixes the missing redirect from /etc/crypttab
NeilBrown
Index: dracut-037/modules.d/90crypt/parse-crypt.sh
===================================================================
--- dracut-037.orig/modules.d/90crypt/parse-crypt.sh 2015-06-03 18:44:03.786006303 +0200
+++ dracut-037/modules.d/90crypt/parse-crypt.sh 2015-06-03 18:44:20.974970795 +0200
@@ -16,6 +16,10 @@
LUKS=$(getargs rd.luks.uuid -d rd_LUKS_UUID)
tout=$(getarg rd.luks.key.tout)
+ while read _mapper _dev _rest ; do
+ set_systemd_timeout_for_dev $_dev
+ done < /etc/crypttab
+
if [ -n "$LUKS" ]; then
for luksid in $LUKS; do
Index: dracut-037/modules.d/99base/dracut-lib.sh
===================================================================
--- dracut-037.orig/modules.d/99base/dracut-lib.sh 2015-06-03 18:44:03.786006303 +0200
+++ dracut-037/modules.d/99base/dracut-lib.sh 2015-06-03 18:44:20.974970795 +0200
@@ -878,12 +878,10 @@
printf -- "%s" "$dev"
}
-# wait_for_dev <dev>
-#
-# Installs a initqueue-finished script,
-# which will cause the main loop only to exit,
-# if the device <dev> is recognized by the system.
-wait_for_dev()
+# set_systemd_timeout_for_dev <dev>
+# Set 'rd.timeout' as the systemd timeout for <dev>
+
+set_systemd_timeout_for_dev()
{
local _name
local _needreload
@@ -898,17 +896,6 @@
_timeout=$(getarg rd.timeout)
_timeout=${_timeout:-0}
- _name="$(str_replace "$1" '/' '\x2f')"
-
- [ -e "${PREFIX}$hookdir/initqueue/finished/devexists-${_name}.sh" ] && return 0
-
- printf '[ -e "%s" ]\n' $1 \
- >> "${PREFIX}$hookdir/initqueue/finished/devexists-${_name}.sh"
- {
- printf '[ -e "%s" ] || ' $1
- printf 'warn "\"%s\" does not exist"\n' $1
- } >> "${PREFIX}$hookdir/emergency/80-${_name}.sh"
-
if [ -n "$DRACUT_SYSTEMD" ]; then
_name=$(dev_unit_name "$1")
if ! [ -L ${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device ]; then
@@ -931,6 +918,36 @@
fi
fi
}
+# wait_for_dev <dev>
+#
+# Installs a initqueue-finished script,
+# which will cause the main loop only to exit,
+# if the device <dev> is recognized by the system.
+wait_for_dev()
+{
+ local _name
+ local _noreload
+
+ if [ "$1" = "-n" ]; then
+ _noreload=-n
+ shift
+ fi
+
+ _name="$(str_replace "$1" '/' '\x2f')"
+
+ type mark_hostonly >/dev/null 2>&1 && mark_hostonly "$hookdir/initqueue/finished/devexists-${_name}.sh"
+
+ [ -e "${PREFIX}$hookdir/initqueue/finished/devexists-${_name}.sh" ] && return 0
+
+ printf '[ -e "%s" ]\n' $1 \
+ >> "${PREFIX}$hookdir/initqueue/finished/devexists-${_name}.sh"
+ {
+ printf '[ -e "%s" ] || ' $1
+ printf 'warn "\"%s\" does not exist"\n' $1
+ } >> "${PREFIX}$hookdir/emergency/80-${_name}.sh"
+
+ set_systemd_timeout_for_dev $_noreload $1
+}
cancel_wait_for_dev()
{
++++++ 0305-static_network_setup_return_zero.patch ++++++
diff -Naur a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
--- a/modules.d/40network/ifup.sh 2015-07-14 09:33:13.573902381 +0200
+++ b/modules.d/40network/ifup.sh 2015-07-29 07:43:43.652788589 +0200
@@ -298,10 +298,12 @@
# note no ip addr flush for ipv6
ip addr add $ip/$prefix ${srv:+peer $srv} dev $netif
wait_for_ipv6_dad $netif
+ [ "$gw" = "::" ] && gw=""
else
# Assume /24 prefix for IPv4
[ -z "$prefix" ] && prefix=24
ip addr add $ip/$prefix ${srv:+peer $srv} brd + dev $netif
+ [ "$gw" = "0.0.0.0" ] && gw=""
fi
[ -n "$gw" ] && echo ip route add default via $gw dev $netif > /tmp/net.$netif.gw
@@ -319,6 +321,9 @@
done
[ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
+
+ [ $? -ne 0 ] && info "Static network setup returned $?"
+ return 0
}
# loopback is always handled the same way
++++++ dracut-installkernel ++++++
#! /bin/sh
#
# /sbin/installkernel - written by tyson@rwii.com
#
# May 21, 2003 - agruen@suse.de
# * Adapted for SuSE and cleaned up.
#
# This file is kept in the following CVS repository:
#
# $Source: /suse/yast2/cvsroot/mkinitrd/installkernel,v $
# $Revision: 1.8 $
#
: ${INSTALL_PATH:=/boot}
KERNEL_VERSION=$1
BOOTIMAGE=$2
MAPFILE=$3
CONFIGFILE=config-$KERNEL_VERSION
case "$(uname -m)" in
s390|s390x)
BOOTFILE=image
;;
ppc|ppc64)
BOOTFILE=vmlinux
;;
*)
BOOTFILE=vmlinuz
;;
esac
#
# Move away files from versions up to SuSE Linux 8.2
#
if [ -f $INSTALL_PATH/$BOOTFILE -a ! -L $INSTALL_PATH/$BOOTFILE ]; then
mv $INSTALL_PATH/$BOOTFILE $INSTALL_PATH/$BOOTFILE.old
fi
if [ -L $INSTALL_PATH/System.map ]; then
rm -f $INSTALL_PATH/System.map
elif [ -f $INSTALLPATH/System.map ]; then
mv $INSTALL_PATH/System.map $INSTALL_PATH/System.map.old
fi
#
# Move away files from after SuSE Linux 8.2
#
if [ -f $INSTALL_PATH/$BOOTFILE-$KERNEL_VERSION ]; then
mv $INSTALL_PATH/$BOOTFILE-$KERNEL_VERSION \
$INSTALL_PATH/$BOOTFILE-$KERNEL_VERSION.old;
fi
if [ -f $INSTALL_PATH/System.map-$KERNEL_VERSION ]; then
mv $INSTALL_PATH/System.map-$KERNEL_VERSION \
$INSTALL_PATH/System.map-$KERNEL_VERSION.old;
fi
if [ -f $INSTALL_PATH/$CONFIGFILE ]; then
mv $INSTALL_PATH/$CONFIGFILE \
$INSTALL_PATH/$CONFIGFILE.old;
fi
#
# Install new files
#
cp -fp $BOOTIMAGE $INSTALL_PATH/$BOOTFILE-$KERNEL_VERSION
cp -fp $MAPFILE $INSTALL_PATH/System.map-$KERNEL_VERSION
cp -fp .config $INSTALL_PATH/$CONFIGFILE
# If the kernel has module support, recreate modules.dep using depmod
# since the contents of modules.dep do not have a consistent format across
# releases.
if [ -x /sbin/depmod -a -d /lib/modules/$KERNEL_VERSION ]; then
/sbin/depmod $KERNEL_VERSION;
fi
CONFIG=$(dirname $MAPFILE)/.config
CHECK_SUPPORTED=
if [ -e "$CONFIG" ]; then
if grep -q "^CONFIG_SUSE_KERNEL_SUPPORTED=y" $CONFIG ; then
CHECK_SUPPORTED="--check-supported"
fi
fi
KERNTYPES=$(dirname $MAPFILE)/init/kerntypes.o
if [ -e $KERNTYPES ]; then
cp -fp $KERNTYPES $INSTALL_PATH/Kerntypes-$KERNEL_VERSION
fi
case "$(uname -m)" in
i?86 | x86_64)
KERNBIN=$(dirname $MAPFILE)/vmlinux
if [ -e $KERNBIN ]; then
if [ -f $INSTALL_PATH/vmlinux-$KERNEL_VERSION.gz ]; then
mv $INSTALL_PATH/vmlinux-$KERNEL_VERSION.gz \
$INSTALL_PATH/vmlinux-$KERNEL_VERSION.gz.old;
fi
gzip -c $KERNBIN > $INSTALL_PATH/vmlinux-$KERNEL_VERSION.gz
fi
;;
esac
#
# Generate initial ramdisk
#
if [ -x /usr/bin/dracut -a -d /lib/modules/$KERNEL_VERSION ]; then
/usr/bin/dracut --hostonly --force $CHECK_SUPPORTED \
$INSTALL_PATH/initrd-$KERNEL_VERSION $KERNEL_VERSION
else
echo "You may need to create an initial ramdisk now."
fi
#
# Update boot loader
#
if [ -x /sbin/update-bootloader ]; then
opt_initrd=
[ -e $INSTALL_PATH/initrd-$KERNEL_VERSION ] \
&& opt_initrd="--initrd $INSTALL_PATH/initrd-$KERNEL_VERSION"
/sbin/update-bootloader --name $KERNEL_VERSION \
--image $INSTALL_PATH/$BOOTFILE-$KERNEL_VERSION \
$opt_initrd --add --force
fi
++++++ dracut_dmraid_use_udev.patch ++++++
From: Hannes Reinecke
Use udev rules to create dmraid /dev/mapper/ devices
https://bugzilla.opensuse.org/show_bug.cgi?id=905746
---
modules.d/90dmraid/dmraid.sh | 3 ---
modules.d/90dmraid/module-setup.sh | 2 +-
2 files changed, 1 insertion(+), 4 deletions(-)
Index: dracut-037/modules.d/90dmraid/dmraid.sh
===================================================================
--- dracut-037.orig/modules.d/90dmraid/dmraid.sh 2014-03-19 17:16:08.000000000 +0100
+++ dracut-037/modules.d/90dmraid/dmraid.sh 2015-07-02 14:42:45.401664649 +0200
@@ -28,8 +28,6 @@ if [ -n "$DM_RAIDS" ] || getargbool 0 rd
if [ "${s##$r}" != "$s" ]; then
info "Activating $s"
dmraid -ay -i -p --rm_partitions "$s" 2>&1 | vinfo
- [ -e "/dev/mapper/$s" ] && kpartx -a "/dev/mapper/$s" 2>&1 | vinfo
- udevsettle
fi
done
done
Index: dracut-037/modules.d/90dmraid/module-setup.sh
===================================================================
--- dracut-037.orig/modules.d/90dmraid/module-setup.sh 2015-07-02 14:42:42.925525906 +0200
+++ dracut-037/modules.d/90dmraid/module-setup.sh 2015-07-02 14:43:41.584813205 +0200
@@ -76,7 +76,7 @@ install() {
inst "$moddir/dmraid.sh" /sbin/dmraid_scan
- inst_rules 64-md-raid.rules
+ inst_rules 66-kpartx.rules 67-kpartx-compat.rules
inst_libdir_file "libdmraid-events*.so*"
++++++ dracut_v37_to_HEAD.patch ++++++
++++ 924 lines (skipped)
++++++ mkinitrd_setup_dummy ++++++
#!/bin/bash
true
++++++ purge-kernels ++++++
#!/usr/bin/perl
use strict;
use warnings;
use Getopt::Long;
sub usage {
print "Usage: $0 [--test]\n";
print "Reads list of kernels to keep from /etc/zypp/zypp.conf:multiversion.kernels\n";
print "kernels can be given as <version>, latest(-N), running, oldest(+N).\n";
}
# arch/flavor => version-release => [ subpackages ]
my %kernels;
my %kmps;
my @keep_spec;
my ($want_running, $running_version, $running_flavor);
# do not actually delete anything
my $test_only;
# undocumented debugging options
my ($fake_config, $fake_rpm_qa, $fake_uname_r, $fake_uname_m);
sub get_config_line {
my $file = "/etc/zypp/zypp.conf";
if ($fake_config) {
return $fake_config;
}
if (!-e $file) {
print STDERR "$0: /etc/zypp/zypp.conf does not exist, exiting.\n";
exit 0;
}
open(my $fh, '<', $file) or die "$0: $file: $!\n";
while (<$fh>) {
chomp;
next unless /^\s*multiversion\.kernels\b/;
s/^[^=]*=\s*//;
close($fh);
return $_;
}
close($fh);
return "";
}
sub load_config {
my @kernels;
@kernels = split(/,\s*/, get_config_line());
for my $kernel (@kernels) {
if ($kernel =~ /^\s*(latest|oldest|running)(\s*[-+]\s*\d+)?\s*$/) {
my $new = { whence => $1, offset => $2 || 0 };
$new->{offset} =~ s/\s*//g;
if ($new->{whence} eq "running") {
$want_running = 1;
}
push (@keep_spec, $new);
} elsif ($kernel =~ /^\d+\.\d+/) {
my $new = { version => $kernel };
push (@keep_spec, $new);
} elsif ($kernel =~ /^\s*$/) {
next;
} else {
print STDERR "$0: Ignoring unknow kernel specification in\n";
print STDERR "/etc/zypp/zypp.conf:multiversion.kernels: $kernel\n";
}
}
}
sub add_package {
my ($name, $vr, $arch) = @_;
my ($flavor, $table);
#print STDERR "add_package: $name $vr $arch\n";
if ($name eq "kernel-firmware" || $name eq "kernel-coverage") {
return;
}
if ($name =~ /^kernel-/) {
($flavor = $name) =~ s/^kernel-//;
$table = \%kernels;
} elsif ($name =~ /-kmp-/) {
($flavor = $name) =~ s/.*-kmp-//;
$table = \%kmps;
}
# Put all subpackages into the same group, except for
# kernel-source-{vanilla,rt}, which are packages on their own
if ($flavor !~ /^source/) {
$flavor =~ s/-.*//; # XXX: No dashes in flavor names
}
# kernel-devel is a subpackage of kernel-source
$flavor =~ s/^devel/source/;
$table->{"$arch/$flavor"} ||= {};
$table->{"$arch/$flavor"}{$vr} ||= [];
push(@{$table->{"$arch/$flavor"}{$vr}}, "$name-$vr.$arch");
}
sub load_packages {
my $pipe;
if ($fake_rpm_qa) {
open($pipe, '<', $fake_rpm_qa) or die "$fake_rpm_qa: $!\n";
} else {
open($pipe, '-|', 'rpm', '-qa', '--qf',
'%{n} %{v}-%{r} %{arch}\n', 'kernel-*', '*-kmp-*')
or die "rpm: $!\n";
}
while (<$pipe>) {
chomp;
my ($name, $vr, $arch) = split;
add_package($name, $vr, $arch);
}
close($pipe)
}
sub sort_versions {
my @versions = @_;
pipe (my $read, my $write);
my $pid = fork();
if (!defined($pid)) {
die "Cannot fork: $!\n";
} elsif ($pid == 0) {
# child
close($read);
open STDOUT, '>&', $write;
open(my $fh, '|-', "/usr/lib/rpm/rpmsort") or die "/usr/lib/rpm/rpmsort: $!\n";
print $fh join("\n", @versions), "\n";
close($fh);
die "rpmsort failed ($?)\n" if $? != 0;
exit 0;
}
# parent
close($write);
@versions = <$read>;
chomp @versions;
close($read);
waitpid($pid, 0);
die "rpmsort failed ($?)\n" if $? != 0;
return @versions;
}
# return true if VER1 == VER2 or VER1 == (VER2 minus rebuild counter)
sub version_match {
my ($ver1, $ver2) = @_;
return 1 if $ver1 eq $ver2;
# copied from kernel-source/rpm/kernel-spec-macros
$ver2 =~ s/\.[0-9]+($|\.[^.]*[^.0-9][^.]*$)/$1/;
return $ver1 eq $ver2;
}
sub list_old_versions {
my ($flavor) = @_;
my $is_source = $flavor =~ /\/(source|syms)/;
my $kernels = $kernels{$flavor};
my @versions = sort_versions(keys(%$kernels));
my %idx = (
oldest => 0,
latest => scalar(@versions) - 1,
);
if ($want_running && ($running_flavor eq $flavor || $is_source)) {
for (my $i = scalar(@versions) - 1; $i >= 0; $i--) {
if (version_match($running_version, $versions[$i])) {
$idx{running} = $i;
last;
}
}
if (!exists($idx{running}) && !$is_source) {
print STDERR "$0: Running kernel $running_version-$running_flavor not installed.\n";
print "NOT removing any packages for flavor $flavor.\n";
return;
}
}
my %delete = map { $_ => 1 } @versions;
for my $keep (@keep_spec) {
if ($keep->{version}) {
for my $ver (@versions) {
if (version_match($keep->{version}, $ver)) {
$delete{$ver} = 0;
}
}
} elsif ($keep->{whence}) {
next unless exists($idx{$keep->{whence}});
my $idx = $idx{$keep->{whence}};
$idx += $keep->{offset};
next unless $idx >= 0 && $idx < scalar(@versions);
$delete{$versions[$idx]} = 0;
} else {
die "??";
}
}
return grep { $delete{$_} } @versions;
}
sub package_exists {
my ($version, $archs, $flavors) = @_;
for my $arch (@$archs) {
for my $flavor (@$flavors) {
my $config = "$arch/$flavor";
if (exists($kernels{$config})
&& exists($kernels{$config}->{$version})) {
return 1;
}
}
}
return 0;
}
sub list_old_packages {
my (@packages, @archs, @flavors);
my (@syms_flavors, @binary_flavors, @source_configs);
# there are some inter-dependencies among the kernel packages,
# so we have to be careful
my %t = map { s:/.*::; $_ => 1 } keys(%kernels);
@archs = sort(keys(%t));
%t = map { s:.*/::; $_ => 1 } keys(%kernels);
@flavors = sort(keys(%t));
@syms_flavors = grep { /^syms/ } @flavors;
@binary_flavors = grep { !/^(source|syms)/ } @flavors;
@source_configs = grep { /\/source/ } sort(keys(%kernels));
for my $arch (@archs) {
for my $flavor (@syms_flavors) {
my $config = "$arch/$flavor";
next unless exists($kernels{$config});
my @versions = list_old_versions($config);
for my $ver (@versions) {
push(@packages, @{$kernels{$config}->{$ver}});
delete($kernels{$config}->{$ver});
}
}
for my $flavor (@binary_flavors) {
my $config = "$arch/$flavor";
next unless exists($kernels{$config});
my @versions = list_old_versions($config);
for my $ver (@versions) {
my @pacs = @{$kernels{$config}->{$ver}};
my $remove_all = 1;
# do not remove kernel-$flavor-devel-$ver
# if kernel-syms-$ver still exists
if (grep { /-devel$/ } @pacs) {
my $syms = "syms";
if ($flavor =~ /^rt/) {
$syms = "syms-rt";
}
if (exists($kernels{$syms}->{$ver})) {
$remove_all = 0;
@pacs = grep { !/-devel$/ }
@pacs;
}
}
push(@packages, @pacs);
if ($remove_all) {
delete($kernels{$config}->{$ver});
}
}
}
}
for my $config (@source_configs) {
my @versions = list_old_versions($config);
for my $ver (@versions) {
# Remove kernel-{devel,source} only if no other package
# of the same version exists
next if package_exists($ver, \@archs, \@binary_flavors);
push(@packages, @{$kernels{$config}->{$ver}});
}
}
return @packages;
}
sub remove_packages {
my @packages = @_;
while (1) {
pipe(my $read, my $write);
my $pid = fork();
if (!defined($pid)) {
die "Cannot fork: $!\n";
} elsif($pid == 0) {
# child
close($read);
open STDOUT, '>&', $write;
open STDERR, '>&', $write;
$ENV{LC_ALL} = "C";
my @cmd = qw(rpm -e);
push(@cmd, "--test") if $test_only;
exec(@cmd, @packages) or die "rpm: $!\n";
}
# parent
close($write);
my @out = <$read>;
chomp @out;
close($read);
waitpid($pid, 0);
if ($? == 0) {
print "Removed:\n ", join("\n ", @packages), "\n";
return 1;
}
my ($retry, @problems);
my %old_packages = map { $_ => 1 } @packages;
my %new_packages;
for (@out) {
if (/ is needed by \(installed\) (.*-kmp-.*)/ &&
!$old_packages{$1}) {
push(@packages, $1) unless $new_packages{$1};
$new_packages{$1} = 1;
$retry = 1;
} else {
push(@problems, $_);
}
}
if (!$retry) {
print STDERR join("\n", @problems), "\n";
print STDERR "$0: giving up.\n";
return 0;
}
}
}
if (!GetOptions(
"h|help" => sub { usage(); exit; },
"--test" => \$test_only,
"--fake-config=s" => \$fake_config,
"--fake-rpm-qa=s" => \$fake_rpm_qa,
"--fake-uname-r=s" => \$fake_uname_r,
"--fake-uname-m=s" => \$fake_uname_m)) {
usage();
exit 1;
}
load_config();
if (!@keep_spec) {
print STDERR "$0: multiversion.kernels not configured in /etc/zypp/zypp.conf, exiting.\n";
exit 0;
}
load_packages();
if ($want_running) {
$running_version = $fake_uname_r ? $fake_uname_r : `uname -r`;
chomp($running_version);
($running_flavor = $running_version) =~ s/.*-//;
$running_version =~ s/-[^-]*$//;
(my $release = $running_version) =~ s/.*-//;
$running_version =~ s/-[^-]*$//;
# copied from kernel-source/rpm/mkspec
$running_version =~ s/\.0-rc/.rc/;
$running_version =~ s/-rc\d+//;
$running_version =~ s/-/./g;
$running_version .= "-$release";
my $arch = $fake_uname_m ? $fake_uname_m : `uname -m`;
chomp($arch);
$arch =~ s/^i.86$/i586/;
$running_flavor = "$arch/$running_flavor";
}
my @remove = list_old_packages();
if (!@remove) {
print STDERR "$0: Nothing to do.\n";
exit 0;
}
if (remove_packages(@remove)) {
exit 0;
}
exit 1;
++++++ purge-kernels.service ++++++
[Unit]
Description=Purge old kernels
After=local-fs.target
ConditionPathExists=/boot/do_purge_kernels
[Service]
Type=oneshot
Nice=19
IOSchedulingClass=idle
ExecStartPre=/bin/rm -f /boot/do_purge_kernels
ExecStart=/sbin/purge-kernels
[Install]
WantedBy=multi-user.target