Accepting request 574781 from Base:System
- 95qeth_rules: Add new module to copy qeth rules (FATE#323440) * Adds 0556-95qeth_rules-Add-new-module-to-copy-qeth-rules.patch - Avoid executing emergency hook twice * Adds 0555-Avoid-executing-emergency-hooks-twice.patch (forwarded request 574764 from dmolkentin) OBS-URL: https://build.opensuse.org/request/show/574781 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dracut?expand=0&rev=120
This commit is contained in:
commit
70add3054d
38
0555-Avoid-executing-emergency-hooks-twice.patch
Normal file
38
0555-Avoid-executing-emergency-hooks-twice.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
From 64511ab0b73df0c9d704e61b14beba641818dd56 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ignaz Forster <iforster@suse.com>
|
||||||
|
Date: Tue, 6 Feb 2018 17:32:47 +0100
|
||||||
|
Subject: [PATCH] Avoid executing emergency hooks twice
|
||||||
|
|
||||||
|
When using systemd emergency hooks were executed twice; this patch will avoid
|
||||||
|
that by only calling the hook of systemd is not called anyway.
|
||||||
|
Also see https://github.com/dracutdevs/dracut/pull/374
|
||||||
|
---
|
||||||
|
modules.d/99base/dracut-lib.sh | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
Index: dracut-044/modules.d/99base/dracut-lib.sh
|
||||||
|
===================================================================
|
||||||
|
--- dracut-044.orig/modules.d/99base/dracut-lib.sh
|
||||||
|
+++ dracut-044/modules.d/99base/dracut-lib.sh
|
||||||
|
@@ -1072,6 +1072,7 @@ _emergency_shell()
|
||||||
|
rm -f -- /.console_lock
|
||||||
|
else
|
||||||
|
debug_off
|
||||||
|
+ source_hook "$hook"
|
||||||
|
echo
|
||||||
|
/sbin/rdsosreport
|
||||||
|
echo 'You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot'
|
||||||
|
@@ -1122,12 +1123,12 @@ emergency_shell()
|
||||||
|
|
||||||
|
echo ; echo
|
||||||
|
warn "$*"
|
||||||
|
- source_hook "$hook"
|
||||||
|
echo
|
||||||
|
|
||||||
|
if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then
|
||||||
|
_emergency_shell $_rdshell_name
|
||||||
|
else
|
||||||
|
+ source_hook "$hook"
|
||||||
|
warn "$action has failed. To debug this issue add \"rd.shell rd.debug\" to the kernel command line."
|
||||||
|
# cause a kernel panic
|
||||||
|
exit 1
|
83
0556-95qeth_rules-Add-new-module-to-copy-qeth-rules.patch
Normal file
83
0556-95qeth_rules-Add-new-module-to-copy-qeth-rules.patch
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
From c4f914a33ac07348245b865dd356c60459d81b42 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Daniel Molkentin <dmolkentin@suse.com>
|
||||||
|
Date: Mon, 29 Jan 2018 08:58:31 -0500
|
||||||
|
Subject: [PATCH] 95qeth_rules: Add new module to copy qeth rules
|
||||||
|
|
||||||
|
Only pick rules for interfaces which have a carrier in the running
|
||||||
|
system. Those interfaces will be assembled by udev to allow booting
|
||||||
|
from those devices (i.e. iSCSI).
|
||||||
|
|
||||||
|
Reference: FATE#323440
|
||||||
|
---
|
||||||
|
modules.d/95qeth_rules/module-setup.sh | 59 ++++++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 59 insertions(+)
|
||||||
|
create mode 100755 modules.d/95qeth_rules/module-setup.sh
|
||||||
|
|
||||||
|
diff --git a/modules.d/95qeth_rules/module-setup.sh b/modules.d/95qeth_rules/module-setup.sh
|
||||||
|
new file mode 100755
|
||||||
|
index 00000000..d4d15118
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/modules.d/95qeth_rules/module-setup.sh
|
||||||
|
@@ -0,0 +1,59 @@
|
||||||
|
+#!/bin/bash
|
||||||
|
+
|
||||||
|
+# called by dracut
|
||||||
|
+check() {
|
||||||
|
+ local _arch=$(uname -m)
|
||||||
|
+ local _online=0
|
||||||
|
+ [ "$_arch" = "s390" -o "$_arch" = "s390x" ] || return 1
|
||||||
|
+ require_binaries /usr/lib/udev/collect || return 1
|
||||||
|
+ dracut_module_included network || return 1
|
||||||
|
+
|
||||||
|
+ [[ $hostonly ]] && {
|
||||||
|
+ for i in /sys/devices/qeth/*/online; do
|
||||||
|
+ read _online < $i
|
||||||
|
+ [ $_online -eq 1 ] && return 0
|
||||||
|
+ done
|
||||||
|
+ }
|
||||||
|
+ return 255
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+# called by dracut
|
||||||
|
+installkernel() {
|
||||||
|
+ instmods qeth
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+# called by dracut
|
||||||
|
+install() {
|
||||||
|
+ ccwid() {
|
||||||
|
+ qeth_path=$(readlink -e -q $1/device)
|
||||||
|
+ basename "$qeth_path"
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ inst_rules_qeth() {
|
||||||
|
+ for rule in /etc/udev/rules.d/{4,5}1-qeth-${1}.rules; do
|
||||||
|
+ # prefer chzdev generated 41- rules
|
||||||
|
+ if [ -f "$rule" ]; then
|
||||||
|
+ inst_rules "$rule"
|
||||||
|
+ break
|
||||||
|
+ fi
|
||||||
|
+ done
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ has_carrier() {
|
||||||
|
+ carrier=0
|
||||||
|
+ # not readable in qeth interfaces
|
||||||
|
+ # that have just been assembled, ignore
|
||||||
|
+ # read error and assume no carrier
|
||||||
|
+ read carrier 2>/dev/null < "$1/carrier"
|
||||||
|
+ [ "$carrier" -eq 1 ] && return 0
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ for dev in /sys/class/net/*; do
|
||||||
|
+ has_carrier $dev || continue
|
||||||
|
+ id=$(ccwid $dev)
|
||||||
|
+ [ -n "$id" ] && inst_rules_qeth $id
|
||||||
|
+ done
|
||||||
|
+
|
||||||
|
+ inst_simple /usr/lib/udev/collect
|
||||||
|
+}
|
||||||
|
--
|
||||||
|
2.13.6
|
||||||
|
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Feb 9 16:10:21 UTC 2018 - daniel.molkentin@suse.com
|
||||||
|
|
||||||
|
- 95qeth_rules: Add new module to copy qeth rules (FATE#323440)
|
||||||
|
* Adds 0556-95qeth_rules-Add-new-module-to-copy-qeth-rules.patch
|
||||||
|
|
||||||
|
- Avoid executing emergency hook twice
|
||||||
|
* Adds 0555-Avoid-executing-emergency-hooks-twice.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jan 25 09:19:05 UTC 2018 - daniel.molkentin@suse.com
|
Thu Jan 25 09:19:05 UTC 2018 - daniel.molkentin@suse.com
|
||||||
|
|
||||||
|
13
dracut.spec
13
dracut.spec
@ -36,8 +36,10 @@ Source6: dracut-installkernel
|
|||||||
Source7: 99-debug.conf
|
Source7: 99-debug.conf
|
||||||
Source8: s390x_persistent_device.conf
|
Source8: s390x_persistent_device.conf
|
||||||
|
|
||||||
# Network, none are upstream yet:
|
# Network
|
||||||
|
# Applied upstream as f0094476fd889b27b391e063f456bf8683670bf0
|
||||||
Patch12: 0012-40network-Fix-race-condition-when-wait-for-networks.patch
|
Patch12: 0012-40network-Fix-race-condition-when-wait-for-networks.patch
|
||||||
|
# None are upstream yet:
|
||||||
Patch13: 0013-40network-always-start-netroot-in-ifup.sh.patch
|
Patch13: 0013-40network-always-start-netroot-in-ifup.sh.patch
|
||||||
Patch15: 0015-40network-replace-dhclient-with-wickedd-dhcp-supplic.patch
|
Patch15: 0015-40network-replace-dhclient-with-wickedd-dhcp-supplic.patch
|
||||||
Patch17: 0017-45ifcfg-use-distro-specific-scripts.patch
|
Patch17: 0017-45ifcfg-use-distro-specific-scripts.patch
|
||||||
@ -145,7 +147,7 @@ Patch158: 0158-Add-SUSE-kernel-module-dependencies-in-etc-modprobe.patch
|
|||||||
Patch163: 0163-Install-etc-sysconfig-console-to-see-specific-fonts.patch
|
Patch163: 0163-Install-etc-sysconfig-console-to-see-specific-fonts.patch
|
||||||
# TODO: Verify: Should be obsolete due to fixes in systemd
|
# TODO: Verify: Should be obsolete due to fixes in systemd
|
||||||
Patch164: 0164-Fix-initramfs-ver.img-vs-initrd-ver-in-dracut-initra.patch
|
Patch164: 0164-Fix-initramfs-ver.img-vs-initrd-ver-in-dracut-initra.patch
|
||||||
# Submitted as a check to upstream as 446654703742e6c1d7b1134a7d73b2bf7ce20cda
|
# Applied upstream as ed2cc8c9b96438be4527dbc9f5814196554abec4
|
||||||
Patch168: 0168-remove_plymouth_logo_file.patch
|
Patch168: 0168-remove_plymouth_logo_file.patch
|
||||||
# Applied upstream as 251afd36b2be35b7b27011b6f90b5ab3bbbbff84
|
# Applied upstream as 251afd36b2be35b7b27011b6f90b5ab3bbbbff84
|
||||||
Patch180: 0180-i18n_add_correct_fontmaps.patch
|
Patch180: 0180-i18n_add_correct_fontmaps.patch
|
||||||
@ -362,6 +364,10 @@ Patch552: 0552-98integrity-support-validating-the-IMA-policy-file-s.patch
|
|||||||
Patch553: 0553-98integrity-support-loading-x509-into-the-trusted-bu.patch
|
Patch553: 0553-98integrity-support-loading-x509-into-the-trusted-bu.patch
|
||||||
# Patch submitted to upstream as cb2c9a4338ddc15d55c6c524276a1807bec23485
|
# Patch submitted to upstream as cb2c9a4338ddc15d55c6c524276a1807bec23485
|
||||||
Patch554: 0554-98integrity-support-X.509-only-EVM-configuration.patch
|
Patch554: 0554-98integrity-support-X.509-only-EVM-configuration.patch
|
||||||
|
# Applied upstream as 94f61235d760337fdef692fac5ead589e8f3ab0e
|
||||||
|
Patch555: 0555-Avoid-executing-emergency-hooks-twice.patch
|
||||||
|
# Patch submitted to upstream as 62ceddfd3e3b9da8bdceb1be72dae55abdf35498
|
||||||
|
Patch556: 0556-95qeth_rules-Add-new-module-to-copy-qeth-rules.patch
|
||||||
|
|
||||||
BuildRequires: asciidoc
|
BuildRequires: asciidoc
|
||||||
BuildRequires: bash
|
BuildRequires: bash
|
||||||
@ -638,6 +644,8 @@ chmod a+x modules.d/91zipl/install_zipl_cmdline.sh
|
|||||||
%patch552 -p1
|
%patch552 -p1
|
||||||
%patch553 -p1
|
%patch553 -p1
|
||||||
%patch554 -p1
|
%patch554 -p1
|
||||||
|
%patch555 -p1
|
||||||
|
%patch556 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure\
|
%configure\
|
||||||
@ -870,6 +878,7 @@ ln -s %{dracutlibdir}/modules.d/45ifcfg/write-ifcfg-redhat.sh %{buildroot}/%{dra
|
|||||||
%{dracutlibdir}/modules.d/95lunmask
|
%{dracutlibdir}/modules.d/95lunmask
|
||||||
%{dracutlibdir}/modules.d/95zfcp
|
%{dracutlibdir}/modules.d/95zfcp
|
||||||
%{dracutlibdir}/modules.d/95zfcp_rules
|
%{dracutlibdir}/modules.d/95zfcp_rules
|
||||||
|
%{dracutlibdir}/modules.d/95qeth_rules
|
||||||
%{dracutlibdir}/modules.d/95terminfo
|
%{dracutlibdir}/modules.d/95terminfo
|
||||||
%{dracutlibdir}/modules.d/95udev-rules
|
%{dracutlibdir}/modules.d/95udev-rules
|
||||||
%{dracutlibdir}/modules.d/95virtfs
|
%{dracutlibdir}/modules.d/95virtfs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user