Revert to 044.2 - https://bugzilla.opensuse.org/show_bug.cgi?id=1136977
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dracut?expand=0&rev=141
This commit is contained in:
parent
bf5f662be9
commit
252d13f4dc
@ -0,0 +1,36 @@
|
||||
From e4a8408698ea1a4d77b1c6d9ba76a7eab93b024a Mon Sep 17 00:00:00 2001
|
||||
From: Pawel Wieczorkiewicz <pwieczorkiewicz@suse.de>
|
||||
Date: Tue, 8 Apr 2014 08:50:55 +0200
|
||||
Subject: 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 <hare@suse.de>
|
||||
---
|
||||
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 b1c156c..d591161 100755
|
||||
--- a/modules.d/40network/net-genrules.sh
|
||||
+++ b/modules.d/40network/net-genrules.sh
|
||||
@@ -95,6 +95,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
|
||||
--
|
||||
2.6.6
|
||||
|
64
0013-40network-always-start-netroot-in-ifup.sh.patch
Normal file
64
0013-40network-always-start-netroot-in-ifup.sh.patch
Normal file
@ -0,0 +1,64 @@
|
||||
From a9a919e44e0ce5cc5bc4167889a31d87626058e4 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
modules.d/40network/ifup.sh | 29 +++++++++++------------------
|
||||
1 file changed, 11 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
|
||||
index 109fb4b..31a04bf 100755
|
||||
--- a/modules.d/40network/ifup.sh
|
||||
+++ b/modules.d/40network/ifup.sh
|
||||
@@ -373,27 +373,20 @@ for p in $(getargs ip=); do
|
||||
do_static ;;
|
||||
esac
|
||||
done
|
||||
- ret=$?
|
||||
|
||||
- > /tmp/net.${netif}.up
|
||||
+ if [ $? -eq 0 ]; then
|
||||
+ > /tmp/net.${netif}.up
|
||||
|
||||
- if [ -e /sys/class/net/${netif}/address ]; then
|
||||
- > /tmp/net.$(cat /sys/class/net/${netif}/address).up
|
||||
- fi
|
||||
+ if [ -e /sys/class/net/${netif}/address ]; then
|
||||
+ > /tmp/net.$(cat /sys/class/net/${netif}/address).up
|
||||
+ fi
|
||||
|
||||
- case $autoconf in
|
||||
- dhcp|on|any|dhcp6)
|
||||
- ;;
|
||||
- *)
|
||||
- if [ $ret -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
|
||||
--
|
||||
2.6.6
|
||||
|
241
0015-40network-replace-dhclient-with-wickedd-dhcp-supplic.patch
Normal file
241
0015-40network-replace-dhclient-with-wickedd-dhcp-supplic.patch
Normal file
@ -0,0 +1,241 @@
|
||||
From 3b7df07e27efd2ef2df4d9d40253ee8185eb4152 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Wieczorkiewicz <pwieczorkiewicz@suse.com>
|
||||
Date: Mon, 7 Apr 2014 16:26:57 +0200
|
||||
Subject: 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 <hare@suse.de>
|
||||
---
|
||||
modules.d/40network/dhclient.conf | 3 -
|
||||
modules.d/40network/ifup.sh | 109 ++++++++++++++++++++++++++++-------
|
||||
modules.d/40network/kill-dhclient.sh | 15 -----
|
||||
modules.d/40network/module-setup.sh | 15 +++--
|
||||
4 files changed, 98 insertions(+), 44 deletions(-)
|
||||
delete mode 100644 modules.d/40network/dhclient.conf
|
||||
delete mode 100755 modules.d/40network/kill-dhclient.sh
|
||||
|
||||
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 31a04bf..92e4b38 100755
|
||||
--- a/modules.d/40network/ifup.sh
|
||||
+++ b/modules.d/40network/ifup.sh
|
||||
@@ -87,6 +87,70 @@ 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
|
||||
@@ -98,28 +162,35 @@ do_dhcp() {
|
||||
local _DHCPRETRY=$(getargs rd.net.dhcp.retry=)
|
||||
_DHCPRETRY=${_DHCPRETRY:-1}
|
||||
|
||||
- [ -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
|
||||
- warn "No carrier detected on interface $netif"
|
||||
- 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
|
||||
|
||||
- while [ $_COUNT -lt $_DHCPRETRY ]; do
|
||||
- info "Starting dhcp for interface $netif"
|
||||
- dhclient "$@" \
|
||||
- ${_timeout:+-timeout $_timeout} \
|
||||
- -q \
|
||||
- -cf /etc/dhclient.conf \
|
||||
- -pf /tmp/dhclient.$netif.pid \
|
||||
- -lf /tmp/dhclient.$netif.lease \
|
||||
- $netif \
|
||||
- && return 0
|
||||
- _COUNT=$(($_COUNT+1))
|
||||
- [ $_COUNT -lt $_DHCPRETRY ] && sleep 1
|
||||
- done
|
||||
- warn "dhcp for interface $netif failed"
|
||||
- return 1
|
||||
+ $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() {
|
||||
@@ -262,8 +333,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 9a17495..0000000
|
||||
--- a/modules.d/40network/kill-dhclient.sh
|
||||
+++ /dev/null
|
||||
@@ -1,15 +0,0 @@
|
||||
-#!/bin/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 4bf93cc..2252995 100755
|
||||
--- a/modules.d/40network/module-setup.sh
|
||||
+++ b/modules.d/40network/module-setup.sh
|
||||
@@ -1,10 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
+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
|
||||
}
|
||||
@@ -23,17 +26,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 -H "/etc/dhclient.conf"
|
||||
- cat "$moddir/dhclient.conf" >> "${initdir}/etc/dhclient.conf"
|
||||
inst_hook pre-udev 50 "$moddir/ifname-genrules.sh"
|
||||
inst_hook pre-udev 60 "$moddir/net-genrules.sh"
|
||||
inst_hook cmdline 91 "$moddir/dhcp-root.sh"
|
||||
@@ -44,7 +48,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)
|
||||
|
||||
--
|
||||
2.6.6
|
||||
|
53
0016-Add-new-s390x-specific-rule-files.patch
Normal file
53
0016-Add-new-s390x-specific-rule-files.patch
Normal file
@ -0,0 +1,53 @@
|
||||
From 7995f23a106e28afa0204b5eca68671cb514b1d9 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
modules.d/95dasd_rules/module-setup.sh | 4 ++--
|
||||
modules.d/95zfcp_rules/module-setup.sh | 1 +
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: dracut-042/modules.d/95dasd_rules/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/95dasd_rules/module-setup.sh 2015-06-11 17:39:47.000000000 +0200
|
||||
+++ dracut-042/modules.d/95dasd_rules/module-setup.sh 2015-06-24 18:02:06.297197575 +0200
|
||||
@@ -4,7 +4,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
|
||||
}
|
||||
|
||||
@@ -16,10 +16,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
|
||||
}
|
||||
Index: dracut-042/modules.d/95zfcp_rules/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/95zfcp_rules/module-setup.sh 2015-06-11 17:39:47.000000000 +0200
|
||||
+++ dracut-042/modules.d/95zfcp_rules/module-setup.sh 2015-06-24 18:02:06.297197575 +0200
|
||||
@@ -19,5 +19,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
|
||||
}
|
68
0017-45ifcfg-use-distro-specific-scripts.patch
Normal file
68
0017-45ifcfg-use-distro-specific-scripts.patch
Normal file
@ -0,0 +1,68 @@
|
||||
From afc08d7bbee93db0b81d20aef00f538fde3209e3 Mon Sep 17 00:00:00 2001
|
||||
From: Pawel Wieczorkiewicz <pwieczorkiewicz@suse.de>
|
||||
Date: Tue, 8 Apr 2014 08:48:27 +0200
|
||||
Subject: 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
|
||||
|
||||
- Also revert upstream commit f34e1d6, to not forcibly include 45ifcfg
|
||||
and thus the whole network stack (bsc#960669)
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
Modified-by: Thomas Rennigner <trenn@suse.de>
|
||||
Modified-by: Fabian Vogt <fvogt@suse.com>
|
||||
---
|
||||
modules.d/40network/ifup.sh | 1 +
|
||||
modules.d/40network/module-setup.sh | 7 +++++++
|
||||
modules.d/45ifcfg/module-setup.sh | 1 -
|
||||
3 files changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
|
||||
index 92e4b38..347c7f7 100755
|
||||
--- a/modules.d/40network/ifup.sh
|
||||
+++ b/modules.d/40network/ifup.sh
|
||||
@@ -189,6 +189,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/40network/module-setup.sh b/modules.d/40network/module-setup.sh
|
||||
index 2252995..fa6c7fc 100755
|
||||
--- a/modules.d/40network/module-setup.sh
|
||||
+++ b/modules.d/40network/module-setup.sh
|
||||
@@ -15,6 +15,13 @@ check() {
|
||||
# called by dracut
|
||||
depends() {
|
||||
echo "kernel-network-modules"
|
||||
+ local link=$(readlink $moddir/write-ifcfg.sh)
|
||||
+ [[ "$link" = "write-ifcfg-suse.sh" ]] && \
|
||||
+ [[ -d /etc/sysconfig/network ]] && \
|
||||
+ echo "ifcfg"
|
||||
+ [[ "$link" = "write-ifcfg-redhat.sh" ]] && \
|
||||
+ [[ -d /etc/sysconfig/network-scripts ]] && \
|
||||
+ echo "ifcfg"
|
||||
return 0
|
||||
}
|
||||
|
||||
diff --git a/modules.d/45ifcfg/module-setup.sh b/modules.d/45ifcfg/module-setup.sh
|
||||
index 6791985..60ed92b 100755
|
||||
--- a/modules.d/45ifcfg/module-setup.sh
|
||||
+++ b/modules.d/45ifcfg/module-setup.sh
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
# called by dracut
|
||||
check() {
|
||||
- [[ -d /etc/sysconfig/network-scripts ]] && return 0
|
||||
return 255
|
||||
}
|
||||
|
||||
--
|
||||
2.6.6
|
||||
|
63
0020-00warpclock-Set-correct-timezone.patch
Normal file
63
0020-00warpclock-Set-correct-timezone.patch
Normal file
@ -0,0 +1,63 @@
|
||||
From 8792c2c46d3841ea11b9bd30e388eaeb64549fdc Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
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
|
||||
|
||||
Index: dracut-042/modules.d/00warpclock/module-setup.sh
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ dracut-042/modules.d/00warpclock/module-setup.sh 2015-06-24 18:02:06.917232873 +0200
|
||||
@@ -0,0 +1,27 @@
|
||||
+#!/bin/bash
|
||||
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
+# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
+
|
||||
+# called by dracut
|
||||
+check() {
|
||||
+ # hwclock does not exist on S390(x), bail out silently then
|
||||
+ local _arch=$(uname -m)
|
||||
+ [ "$_arch" = "s390" -o "$_arch" = "s390x" ] && return 1
|
||||
+
|
||||
+ [ -e /etc/localtime -a -e /etc/adjtime ] || return 1
|
||||
+ require_binaries /sbin/hwclock || return 1
|
||||
+}
|
||||
+
|
||||
+# 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
|
||||
+}
|
||||
Index: dracut-042/modules.d/00warpclock/warpclock.sh
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ dracut-042/modules.d/00warpclock/warpclock.sh 2015-06-24 18:02:06.917232873 +0200
|
||||
@@ -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
|
64
0021-95dcssblk-Add-new-module-for-DCSS-block-devices.patch
Normal file
64
0021-95dcssblk-Add-new-module-for-DCSS-block-devices.patch
Normal file
@ -0,0 +1,64 @@
|
||||
From c4a980a8fa7a2a9d5e25063b0d5b5070e59aa2cc Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Renninger <trenn@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
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
|
||||
|
||||
Index: dracut-042/modules.d/95dcssblk/module-setup.sh
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ dracut-042/modules.d/95dcssblk/module-setup.sh 2015-06-24 18:02:07.217249953 +0200
|
||||
@@ -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
|
||||
+}
|
||||
Index: dracut-042/modules.d/95dcssblk/parse-dcssblk.sh
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ dracut-042/modules.d/95dcssblk/parse-dcssblk.sh 2015-06-24 18:02:07.217249953 +0200
|
||||
@@ -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
|
@ -0,0 +1,34 @@
|
||||
From 3a951a971fdaa4b51f5375d9b77af0db3c67414e Mon Sep 17 00:00:00 2001
|
||||
From: Pawel Wieczorkiewicz <pwieczorkiewicz@suse.de>
|
||||
Date: Tue, 27 May 2014 11:48:43 +0200
|
||||
Subject: 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 <pwieczorkiewicz@suse.de>
|
||||
---
|
||||
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 d591161..559b325 100755
|
||||
--- a/modules.d/40network/net-genrules.sh
|
||||
+++ b/modules.d/40network/net-genrules.sh
|
||||
@@ -94,8 +94,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
|
||||
--
|
||||
2.6.6
|
||||
|
65
0053-01fips-fixup-loading-issues.patch
Normal file
65
0053-01fips-fixup-loading-issues.patch
Normal file
@ -0,0 +1,65 @@
|
||||
From a15945f1cd7cac0ad472807ca7979726dd34288b Mon Sep 17 00:00:00 2001
|
||||
From: Marcus Meissner <meissner@suse.de>
|
||||
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 <meissner@suse.de>
|
||||
---
|
||||
modules.d/01fips/fips.sh | 12 ++++++++++++
|
||||
modules.d/01fips/module-setup.sh | 6 +++++-
|
||||
2 files changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh
|
||||
index 6acdf62..835f520 100755
|
||||
--- a/modules.d/01fips/fips.sh
|
||||
+++ b/modules.d/01fips/fips.sh
|
||||
@@ -98,6 +98,18 @@ do_fips()
|
||||
_found=1
|
||||
break
|
||||
done </proc/crypto
|
||||
+ # If we find some hardware specific modules and cannot load them
|
||||
+ # it is not a problem, proceed.
|
||||
+ if [ "$_found" = "0" ]; then
|
||||
+ if [ "$_module" != "${_module%-intel}" \
|
||||
+ -o "$_module" != "${_module%-ssse3}" \
|
||||
+ -o "$_module" != "${_module%-x86_64}" \
|
||||
+ -o "$_module" != "${_module%z90}" \
|
||||
+ ]; then
|
||||
+ _found=1
|
||||
+ fi
|
||||
+ fi
|
||||
+
|
||||
[ "$_found" = "0" ] && return 1
|
||||
fi
|
||||
fi
|
||||
diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh
|
||||
index 7278347..18c8377 100755
|
||||
--- a/modules.d/01fips/module-setup.sh
|
||||
+++ b/modules.d/01fips/module-setup.sh
|
||||
@@ -19,6 +19,8 @@ installkernel() {
|
||||
_fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic "
|
||||
_fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib"
|
||||
_fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key ghash_s390 sha1_s390 sha512_s390"
|
||||
+ _fipsmodules+="sha512-ssse3 sha1-ssse3 sha256-ssse3 "
|
||||
+ _fipsmodules+="ghash-clmulni-intel "
|
||||
|
||||
mkdir -m 0755 -p "${initdir}/etc/modprobe.d"
|
||||
|
||||
@@ -44,7 +46,9 @@ install() {
|
||||
libssl.so 'hmaccalc/sha512hmac.hmac' libssl.so.10 \
|
||||
libfreeblpriv3.so libfreeblpriv3.chk
|
||||
|
||||
- inst_multiple -o prelink
|
||||
+ # we do not use prelink at SUSE
|
||||
+ #inst_multiple -o prelink
|
||||
+
|
||||
inst_simple /etc/system-fips
|
||||
}
|
||||
|
||||
--
|
||||
2.6.6
|
||||
|
132
0056-81cio_ignore-handle-cio_ignore-commandline.patch
Normal file
132
0056-81cio_ignore-handle-cio_ignore-commandline.patch
Normal file
@ -0,0 +1,132 @@
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
|
||||
81cio_ignore: handle cio_ignore commandline
|
||||
|
||||
References: bnc#874902
|
||||
|
||||
Incorporates following on-top patches/fixes:
|
||||
----------------------------
|
||||
Subject: 81cio_ignore: skip module if cio_ignore is not active
|
||||
|
||||
When cio_ignore is not active we should skip the entire module
|
||||
during boot; otherwise it'll lead to adverse effects.
|
||||
|
||||
References: bnc#882685
|
||||
----------------------------
|
||||
Subject: 81cio_ignore: rewrite module
|
||||
|
||||
Rewrite cio_ignore module to rely on the dracut commandline
|
||||
parameter 'rd.cio_accept', which takes a comma-separated list
|
||||
of CCW IDs. Each of those IDs are being removed from the
|
||||
list of devices from cio_ignore.
|
||||
|
||||
The default values for rd.cio_accept are taken from
|
||||
/boot/zipl/active_devices.txt.
|
||||
|
||||
References: bnc#882685
|
||||
-----------------------------
|
||||
Subject: More empty cmdline fixes
|
||||
|
||||
This fixes up some more modules which might print out empty
|
||||
commandline files.
|
||||
|
||||
|
||||
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
||||
Index: dracut-044/dracut.cmdline.7.asc
|
||||
===================================================================
|
||||
--- dracut-044.orig/dracut.cmdline.7.asc
|
||||
+++ dracut-044/dracut.cmdline.7.asc
|
||||
@@ -948,6 +948,21 @@ that memory is given back to the kernel
|
||||
anymore.
|
||||
|
||||
|
||||
+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**::
|
||||
Index: dracut-044/modules.d/81cio_ignore/module-setup.sh
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ dracut-044/modules.d/81cio_ignore/module-setup.sh
|
||||
@@ -0,0 +1,40 @@
|
||||
+#!/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
|
||||
+}
|
||||
+
|
||||
+cmdline() {
|
||||
+ local cio_accept
|
||||
+
|
||||
+ if [ -e /boot/zipl/active_devices.txt ] ; then
|
||||
+ while read dev etc ; do
|
||||
+ [ "$dev" = "#" -o "$dev" = "" ] && continue;
|
||||
+ if [ -z "$cio_accept" ] ; then
|
||||
+ cio_accept="$dev"
|
||||
+ else
|
||||
+ cio_accept="${cio_accept},${dev}"
|
||||
+ fi
|
||||
+ done < /boot/zipl/active_devices.txt
|
||||
+ fi
|
||||
+ if [ -n "$cio_accept" ] ; then
|
||||
+ echo "rd.cio_accept=${cio_accept}"
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
+# called by dracut
|
||||
+install() {
|
||||
+ if [[ $hostonly_cmdline == "yes" ]] ; then
|
||||
+ local _cio_accept=$(cmdline)
|
||||
+ [[ $_cio_accept ]] && printf "%s\n" "$_cio_accept" >> "${initdir}/etc/cmdline.d/01cio_accept.conf"
|
||||
+ fi
|
||||
+
|
||||
+ inst_hook cmdline 20 "$moddir/parse-cio_accept.sh"
|
||||
+ inst_multiple cio_ignore
|
||||
+}
|
||||
Index: dracut-044/modules.d/81cio_ignore/parse-cio_accept.sh
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ dracut-044/modules.d/81cio_ignore/parse-cio_accept.sh
|
||||
@@ -0,0 +1,22 @@
|
||||
+#!/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
|
||||
+ OLDIFS="$IFS"
|
||||
+ IFS=,
|
||||
+ set -- $CIO_ACCEPT
|
||||
+ while (($# > 0)) ; do
|
||||
+ info "Enabling device $1"
|
||||
+ cio_ignore --remove $1
|
||||
+ shift
|
||||
+ done
|
||||
+ IFS="$OLDIFS"
|
||||
+fi
|
29
0057-01fips-Include-some-more-hmacs.patch
Normal file
29
0057-01fips-Include-some-more-hmacs.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From b53bc39cb35dda350b0629036a3eb87d90debe56 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <meissner@suse.de>
|
||||
---
|
||||
modules.d/01fips/module-setup.sh | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: dracut-042/modules.d/01fips/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/01fips/module-setup.sh 2015-06-24 18:02:07.817284113 +0200
|
||||
+++ dracut-042/modules.d/01fips/module-setup.sh 2015-06-24 18:02:08.453320321 +0200
|
||||
@@ -44,6 +44,10 @@ install() {
|
||||
inst_libdir_file libsoftokn3.so libsoftokn3.so \
|
||||
libsoftokn3.chk libfreebl3.so libfreebl3.chk \
|
||||
libssl.so 'hmaccalc/sha512hmac.hmac' libssl.so.10 \
|
||||
+ .libcrypto.so.1.0.0.hmac .libssl.so.1.0.0.hmac \
|
||||
+ .libcryptsetup.so.4.5.0.hmac .libcryptsetup.so.4.hmac \
|
||||
+ .libgcrypt.so.20.hmac \
|
||||
+ .libfipscheck.so.1.hmac .libfipscheck.so.1.1.0.hmac
|
||||
libfreeblpriv3.so libfreeblpriv3.chk
|
||||
|
||||
# we do not use prelink at SUSE
|
125
0058-dracut-add-warning-when-including-unsupported-module.patch
Normal file
125
0058-dracut-add-warning-when-including-unsupported-module.patch
Normal file
@ -0,0 +1,125 @@
|
||||
From 5473e4b5d8d9bbf9bd995dff815647de0ed1b30b Mon Sep 17 00:00:00 2001
|
||||
From: Jeff Mahoney <jeffm@suse.com>
|
||||
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 <jeffm@suse.com>
|
||||
---
|
||||
dracut-init.sh | 21 +++++++++++++++++++++
|
||||
dracut.8.asc | 11 +++++++++++
|
||||
dracut.sh | 5 +++++
|
||||
3 files changed, 37 insertions(+)
|
||||
|
||||
Index: dracut-044/dracut-init.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/dracut-init.sh
|
||||
+++ dracut-044/dracut-init.sh
|
||||
@@ -849,6 +849,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() {
|
||||
@@ -910,6 +921,10 @@ install_kmod_with_fw() {
|
||||
fi
|
||||
fi
|
||||
done
|
||||
+
|
||||
+ if [[ "$check_supported" = "yes" ]]; then
|
||||
+ check_supported_kmod $1
|
||||
+ fi
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -956,6 +971,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 || [ -n "$a" ]; do printf ":$a";done)
|
||||
_pid=${_pid##*:}
|
||||
Index: dracut-044/dracut.8.asc
|
||||
===================================================================
|
||||
--- dracut-044.orig/dracut.8.asc
|
||||
+++ dracut-044/dracut.8.asc
|
||||
@@ -490,6 +490,17 @@ will not be able to boot.
|
||||
Specifies the kernel image, which to include in the UEFI executable. The default is
|
||||
_/lib/modules/<KERNEL-VERSION>/vmlinuz_ or _/boot/vmlinuz-<KERNEL-VERSION>_
|
||||
|
||||
+**--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_::
|
||||
Index: dracut-044/dracut.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/dracut.sh
|
||||
+++ dracut-044/dracut.sh
|
||||
@@ -203,6 +203,9 @@ Creates initial ramdisk images for prelo
|
||||
--printsize Print out the module install size
|
||||
--sshkey [SSHKEY] Add ssh key to initramfs (use with ssh-client module)
|
||||
--logfile [FILE] Logfile to use (overrides configuration setting)
|
||||
+ --check-supported Check to ensure that modules are marked supported when
|
||||
+ using a kernel that is configured to check the
|
||||
+ support status of a module before loading.
|
||||
--reproducible Create reproducible images
|
||||
--no-reproducible Do not create reproducible images
|
||||
--loginstall [DIR] Log all files installed from the host to [DIR]
|
||||
@@ -360,6 +363,7 @@ rearrange_params()
|
||||
--long noimageifnotneeded \
|
||||
--long early-microcode \
|
||||
--long no-early-microcode \
|
||||
+ --long check-supported \
|
||||
--long reproducible \
|
||||
--long no-reproducible \
|
||||
--long loginstall: \
|
||||
@@ -556,6 +560,7 @@ while :; do
|
||||
--printsize) printsize="yes";;
|
||||
--regenerate-all) regenerate_all="yes";;
|
||||
--noimageifnotneeded) noimageifnotneeded="yes";;
|
||||
+ --check-supported) check_supported="yes" ;;
|
||||
--reproducible) reproducible_l="yes";;
|
||||
--no-reproducible) reproducible_l="no";;
|
||||
--uefi) uefi="yes";;
|
84
0059-99suse-Add-SUSE-specific-initrd-parsing.patch
Normal file
84
0059-99suse-Add-SUSE-specific-initrd-parsing.patch
Normal file
@ -0,0 +1,84 @@
|
||||
From 1202041ec3f7b2d8dd58999e72a309c9fba9069f Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Renninger <trenn@suse.de>
|
||||
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 <trenn@suse.de>
|
||||
---
|
||||
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
|
||||
|
||||
Index: dracut-042/modules.d/99suse/module-setup.sh
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ dracut-042/modules.d/99suse/module-setup.sh 2015-06-24 18:02:09.081356075 +0200
|
||||
@@ -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"
|
||||
+}
|
||||
Index: dracut-042/modules.d/99suse/parse-suse-initrd.sh
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ dracut-042/modules.d/99suse/parse-suse-initrd.sh 2015-06-24 18:02:09.081356075 +0200
|
||||
@@ -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
|
203
0060-45ifcfg-Add-SUSE-specific-write-ifcfg-file.patch
Normal file
203
0060-45ifcfg-Add-SUSE-specific-write-ifcfg-file.patch
Normal file
@ -0,0 +1,203 @@
|
||||
From 105e96464320c8acae22ee730717e071e156aa0b Mon Sep 17 00:00:00 2001
|
||||
From: Pawel Wieczorkiewicz <pwieczorkiewicz@suse.com>
|
||||
Date: Wed, 4 Jun 2014 13:00:06 +0200
|
||||
Subject: 45ifcfg: Add SUSE-specific write-ifcfg file
|
||||
|
||||
Signed-off-by: Pawel Wieczorkiewicz <pwieczorkiewicz@suse.com>
|
||||
---
|
||||
modules.d/45ifcfg/write-ifcfg-suse.sh | 183 ++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 183 insertions(+)
|
||||
create mode 100644 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 100644
|
||||
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
|
||||
--
|
||||
2.6.6
|
||||
|
40
0061-45ifcfg-Fixup-error-message-in-write-ifcfg-suse.patch
Normal file
40
0061-45ifcfg-Fixup-error-message-in-write-ifcfg-suse.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From 7104ea8c873ef89c9aacdd12a542bc71fc738aaa Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
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 100644
|
||||
--- 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'"
|
||||
--
|
||||
2.6.6
|
||||
|
@ -0,0 +1,58 @@
|
||||
From 1ab0a485f8e3a3b0ba62ea2f920fd3457039e7f1 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
modules.d/95dasd_rules/parse-dasd.sh | 37 ++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 37 insertions(+)
|
||||
|
||||
Index: dracut-042/modules.d/95dasd_rules/parse-dasd.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/95dasd_rules/parse-dasd.sh 2015-06-11 17:39:47.000000000 +0200
|
||||
+++ dracut-042/modules.d/95dasd_rules/parse-dasd.sh 2015-06-24 18:02:09.969406631 +0200
|
||||
@@ -52,3 +52,40 @@ for dasd_arg in $(getargs root=) $(getar
|
||||
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
|
43
0076-Correctly-set-cio_ignore-for-dynamic-s390-rules.patch
Normal file
43
0076-Correctly-set-cio_ignore-for-dynamic-s390-rules.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From 7a725ea4a1cb606edd3f060f46818250f2a82a1a Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
modules.d/95dasd_rules/parse-dasd.sh | 3 +++
|
||||
modules.d/95zfcp_rules/parse-zfcp.sh | 3 +++
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
Index: dracut-042/modules.d/95dasd_rules/parse-dasd.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/95dasd_rules/parse-dasd.sh 2015-06-24 18:02:09.969406631 +0200
|
||||
+++ dracut-042/modules.d/95dasd_rules/parse-dasd.sh 2015-06-24 18:02:10.257423027 +0200
|
||||
@@ -36,6 +36,9 @@ ACTION=="add", SUBSYSTEM=="ccw", KERNEL=
|
||||
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
|
||||
Index: dracut-042/modules.d/95zfcp_rules/parse-zfcp.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/95zfcp_rules/parse-zfcp.sh 2015-06-11 17:39:47.000000000 +0200
|
||||
+++ dracut-042/modules.d/95zfcp_rules/parse-zfcp.sh 2015-06-24 18:02:10.257423027 +0200
|
||||
@@ -35,6 +35,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
|
68
0079-95dasd_rules-fixup-rd.dasd-parsing.patch
Normal file
68
0079-95dasd_rules-fixup-rd.dasd-parsing.patch
Normal file
@ -0,0 +1,68 @@
|
||||
From b302dd2a53864bdd4ff271275fa244f654cb92ca Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
modules.d/95dasd_rules/parse-dasd.sh | 15 ++++++++-------
|
||||
1 file changed, 8 insertions(+), 7 deletions(-)
|
||||
|
||||
Index: dracut-042/modules.d/95dasd_rules/parse-dasd.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/95dasd_rules/parse-dasd.sh 2015-06-24 18:02:10.257423027 +0200
|
||||
+++ dracut-042/modules.d/95dasd_rules/parse-dasd.sh 2015-06-24 18:02:10.589441929 +0200
|
||||
@@ -29,6 +29,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 <<EOF
|
||||
@@ -36,9 +40,6 @@ ACTION=="add", SUBSYSTEM=="ccw", KERNEL=
|
||||
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
|
||||
@@ -46,7 +47,7 @@ for dasd_arg in $(getargs root=) $(getar
|
||||
case $dasd_arg in
|
||||
/dev/disk/by-path/ccw-*)
|
||||
ccw_arg=${dasd_arg##*/}
|
||||
- break;
|
||||
+ ;;
|
||||
esac
|
||||
if [ -n "$ccw_arg" ] ; then
|
||||
IFS="-"
|
||||
@@ -75,8 +76,8 @@ for dasd_arg in $(getargs rd.dasd=); do
|
||||
end=${1#0.0.}
|
||||
shift
|
||||
unset IFS
|
||||
- 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
|
||||
;;
|
||||
*)
|
||||
@@ -85,7 +86,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
|
71
0080-95dasd_rules-print-out-rd.dasd-commandline.patch
Normal file
71
0080-95dasd_rules-print-out-rd.dasd-commandline.patch
Normal file
@ -0,0 +1,71 @@
|
||||
From 3e2e526a74cdad48d40a1ec58dac9f709d8fef0e Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Thu, 26 Jun 2014 10:50:43 +0200
|
||||
Subject: 95dasd_rules: print out 'rd.dasd' commandline
|
||||
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
modules.d/95dasd_rules/module-setup.sh | 33 +++++++++++++++++++++++++++++++++
|
||||
1 file changed, 33 insertions(+)
|
||||
|
||||
Index: dracut-042/modules.d/95dasd_rules/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/95dasd_rules/module-setup.sh 2015-06-24 18:02:06.297197575 +0200
|
||||
+++ dracut-042/modules.d/95dasd_rules/module-setup.sh 2015-06-24 18:02:10.881458552 +0200
|
||||
@@ -1,10 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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
|
||||
}
|
||||
|
||||
@@ -17,6 +46,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
|
@ -0,0 +1,27 @@
|
||||
From 95dc2742b9304029068a2b320e011bdfcc4087ea Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Thu, 26 Jun 2014 10:53:01 +0200
|
||||
Subject: 95dasd_mod: do not set module parameters if dasd_cio_free is not
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
modules.d/95dasd_mod/parse-dasd-mod.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: dracut-042/modules.d/95dasd_mod/parse-dasd-mod.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/95dasd_mod/parse-dasd-mod.sh 2015-06-11 17:39:47.000000000 +0200
|
||||
+++ dracut-042/modules.d/95dasd_mod/parse-dasd-mod.sh 2015-06-24 18:02:11.169474949 +0200
|
||||
@@ -7,7 +7,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
|
57
0083-95zfcp_rules-Fixup-rd.zfcp-parsing.patch
Normal file
57
0083-95zfcp_rules-Fixup-rd.zfcp-parsing.patch
Normal file
@ -0,0 +1,57 @@
|
||||
From 90b21dafd469ce4a8ac56944ce825f90c0782b16 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
modules.d/95zfcp_rules/parse-zfcp.sh | 11 +++++------
|
||||
1 file changed, 5 insertions(+), 6 deletions(-)
|
||||
|
||||
Index: dracut-042/modules.d/95zfcp_rules/parse-zfcp.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/95zfcp_rules/parse-zfcp.sh 2015-06-24 18:02:10.257423027 +0200
|
||||
+++ dracut-042/modules.d/95zfcp_rules/parse-zfcp.sh 2015-06-24 18:02:11.461491574 +0200
|
||||
@@ -5,9 +5,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
|
||||
@@ -20,6 +18,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
|
||||
@@ -35,9 +37,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
|
||||
@@ -53,7 +52,7 @@ for zfcp_arg in $(getargs root=) $(getar
|
||||
case $zfcp_arg in
|
||||
/dev/disk/by-path/ccw-*)
|
||||
ccw_arg=${zfcp_arg##*/}
|
||||
- break;
|
||||
+ ;;
|
||||
esac
|
||||
if [ -n "$ccw_arg" ] ; then
|
||||
IFS="-"
|
@ -0,0 +1,73 @@
|
||||
From 3d918eb5be673f243dc75b358a35e1ed307f0ea5 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
modules.d/95zfcp_rules/module-setup.sh | 39 +++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 38 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: dracut-042/modules.d/95zfcp_rules/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/95zfcp_rules/module-setup.sh 2015-06-24 18:02:06.297197575 +0200
|
||||
+++ dracut-042/modules.d/95zfcp_rules/module-setup.sh 2015-06-24 18:02:11.753508198 +0200
|
||||
@@ -1,10 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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
|
||||
}
|
||||
|
||||
@@ -17,6 +47,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
|
@ -0,0 +1,56 @@
|
||||
From 754bda4bcf9698837802b31bd74061702edf6c8c Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
modules.d/95zfcp_rules/parse-zfcp.sh | 18 ++++++++++++++++--
|
||||
1 file changed, 16 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: dracut-042/modules.d/95zfcp_rules/parse-zfcp.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/95zfcp_rules/parse-zfcp.sh 2015-06-24 18:02:11.461491574 +0200
|
||||
+++ dracut-042/modules.d/95zfcp_rules/parse-zfcp.sh 2015-06-24 18:02:12.041524595 +0200
|
||||
@@ -39,6 +39,17 @@ EOF
|
||||
fi
|
||||
}
|
||||
|
||||
+if [[ -f /sys/firmware/ipl/ipl_type &&
|
||||
+ $(</sys/firmare/ipl/ipl_type) = "fcp" ]] ; then
|
||||
+ (
|
||||
+ local _wwpn=$(cat /sys/firmware/ipl/wwpn)
|
||||
+ local _lun=$(cat /sys/firmware/ipl/lun)
|
||||
+ local _ccw=$(cat /sys/firmware/ipl/device)
|
||||
+
|
||||
+ create_udev_rule $_ccw $_wwpn $_lun
|
||||
+ )
|
||||
+fi
|
||||
+
|
||||
for zfcp_arg in $(getargs rd.zfcp); do
|
||||
(
|
||||
IFS=","
|
||||
@@ -49,6 +60,9 @@ done
|
||||
|
||||
for zfcp_arg in $(getargs root=) $(getargs resume=); do
|
||||
(
|
||||
+ local _wwpn
|
||||
+ local _lun
|
||||
+
|
||||
case $zfcp_arg in
|
||||
/dev/disk/by-path/ccw-*)
|
||||
ccw_arg=${zfcp_arg##*/}
|
||||
@@ -57,8 +71,8 @@ for zfcp_arg in $(getargs root=) $(getar
|
||||
if [ -n "$ccw_arg" ] ; then
|
||||
IFS="-"
|
||||
set -- $ccw_arg
|
||||
- wwpn=${4%:*}
|
||||
- lun=${4#*:}
|
||||
+ _wwpn=${4%:*}
|
||||
+ _lun=${4#*:}
|
||||
create_udev_rule $2 $wwpn $lun
|
||||
fi
|
||||
)
|
@ -0,0 +1,33 @@
|
||||
From 96af5adcdc4ec9bdbaff4dc053f415060eee301a Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
modules.d/95dasd_rules/parse-dasd.sh | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
Index: dracut-042/modules.d/95dasd_rules/parse-dasd.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/95dasd_rules/parse-dasd.sh 2015-06-24 18:02:10.589441929 +0200
|
||||
+++ dracut-042/modules.d/95dasd_rules/parse-dasd.sh 2015-06-24 18:02:12.329540991 +0200
|
||||
@@ -42,6 +42,15 @@ ACTION=="add", ENV{COLLECT_$ccw}=="0", A
|
||||
EOF
|
||||
}
|
||||
|
||||
+if [[ -f /sys/firmware/ipl/ipl_type &&
|
||||
+ $(</sys/firmare/ipl/ipl_type) = "ccw" ]] ; then
|
||||
+ (
|
||||
+ local _ccw=$(cat /sys/firmware/ipl/device)
|
||||
+
|
||||
+ create_udev_rule $_ccw
|
||||
+ )
|
||||
+fi
|
||||
+
|
||||
for dasd_arg in $(getargs root=) $(getargs resume=); do
|
||||
(
|
||||
case $dasd_arg in
|
180
0088-91zipl-Add-new-module-to-update-s390x-configuration.patch
Normal file
180
0088-91zipl-Add-new-module-to-update-s390x-configuration.patch
Normal file
@ -0,0 +1,180 @@
|
||||
From 78329f4df2afc9fae11ea30dd11839d956d4af08 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
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
|
||||
|
||||
Index: dracut-044/dracut.cmdline.7.asc
|
||||
===================================================================
|
||||
--- dracut-044.orig/dracut.cmdline.7.asc
|
||||
+++ dracut-044/dracut.cmdline.7.asc
|
||||
@@ -963,6 +963,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**::
|
||||
Index: dracut-044/modules.d/91zipl/install_zipl_cmdline.sh
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ dracut-044/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
|
||||
Index: dracut-044/modules.d/91zipl/module-setup.sh
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ dracut-044/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
|
||||
+}
|
||||
Index: dracut-044/modules.d/91zipl/parse-zipl.sh
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ dracut-044/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
|
31
0089-40network-create-var-lib-wicked-in-ifup.sh.patch
Normal file
31
0089-40network-create-var-lib-wicked-in-ifup.sh.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From 16a940a8fb1fe6697474dc4abb1ce5b5ee281068 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
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 347c7f7..c7279df 100755
|
||||
--- a/modules.d/40network/ifup.sh
|
||||
+++ b/modules.d/40network/ifup.sh
|
||||
@@ -18,6 +18,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
|
||||
--
|
||||
2.6.6
|
||||
|
125
0090-dracut-caps-Remove-whole-caps-module.patch
Normal file
125
0090-dracut-caps-Remove-whole-caps-module.patch
Normal file
@ -0,0 +1,125 @@
|
||||
From dccbc0fc7f1b814ad8a03f380a31bed2c9d86a9b Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Renninger <trenn@suse.de>
|
||||
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 <trenn@suse.de>
|
||||
---
|
||||
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
|
||||
|
||||
Index: dracut-042/modules.d/02caps/README
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/02caps/README 2015-06-11 17:39:47.000000000 +0200
|
||||
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
@@ -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
|
||||
Index: dracut-042/modules.d/02caps/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/02caps/module-setup.sh 2015-06-11 17:39:47.000000000 +0200
|
||||
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
@@ -1,24 +0,0 @@
|
||||
-#!/bin/bash
|
||||
-
|
||||
-# 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
|
||||
-}
|
||||
-
|
||||
Index: dracut-042/modules.d/02caps/caps.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/02caps/caps.sh 2015-06-11 17:39:47.000000000 +0200
|
||||
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
@@ -1,34 +0,0 @@
|
||||
-#!/bin/bash
|
||||
-
|
||||
-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 || [ -n "$a" ]; 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
|
||||
-
|
@ -0,0 +1,28 @@
|
||||
From edfae68d9a9af81cd1ff230b72b9c320d4c58e82 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Renninger <trenn@suse.de>
|
||||
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 <trenn@suse.de>
|
||||
---
|
||||
modules.d/97biosdevname/module-setup.sh | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: dracut-042/modules.d/97biosdevname/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/97biosdevname/module-setup.sh 2015-06-11 17:39:47.000000000 +0200
|
||||
+++ dracut-042/modules.d/97biosdevname/module-setup.sh 2015-06-24 18:02:13.557610904 +0200
|
||||
@@ -3,7 +3,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
|
||||
}
|
||||
|
@ -0,0 +1,83 @@
|
||||
From a345cf3c3d7c15cfca5735c531f825062235c135 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
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(-)
|
||||
|
||||
Index: dracut-044/modules.d/40network/ifup.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/40network/ifup.sh
|
||||
+++ dracut-044/modules.d/40network/ifup.sh
|
||||
@@ -421,6 +421,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
|
||||
for s in "$dns1" "$dns2" $(getargs nameserver); do
|
||||
[ -n "$s" ] || continue
|
||||
@@ -434,7 +446,7 @@ for p in $(getargs ip=); do
|
||||
|
||||
for autoopt in $(str_replace "$autoconf" "," " "); do
|
||||
case $autoopt in
|
||||
- dhcp|on|any)
|
||||
+ dhcp4|dhcp|on|any)
|
||||
do_dhcp -4 ;;
|
||||
dhcp6)
|
||||
load_ipv6
|
||||
Index: dracut-044/modules.d/40network/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/40network/module-setup.sh
|
||||
+++ dracut-044/modules.d/40network/module-setup.sh
|
||||
@@ -58,6 +58,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.*"
|
||||
|
||||
Index: dracut-044/modules.d/40network/parse-ip-opts.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/40network/parse-ip-opts.sh
|
||||
+++ dracut-044/modules.d/40network/parse-ip-opts.sh
|
||||
@@ -69,7 +69,13 @@ for p in $(getargs ip=); do
|
||||
for autoopt in $(str_replace "$autoconf" "," " "); do
|
||||
case $autoopt in
|
||||
error) die "Error parsing option 'ip=$p'";;
|
||||
- bootp|rarp|both) die "Sorry, ip=$autoopt is currenty unsupported";;
|
||||
+ bootp|rarp|both) die "Sorry, ip=$autoopt is currently unsupported";;
|
||||
+ static)
|
||||
+ if [ ! -e /etc/sysconfig/network/ifcfg-${dev} ] ; then
|
||||
+ warn "No ifcfg configuration present for interface $dev, skipping"
|
||||
+ continue
|
||||
+ fi
|
||||
+ ;;
|
||||
none|off)
|
||||
[ -z "$ip" ] && \
|
||||
die "For argument 'ip=$p'\nValue '$autoopt' without static configuration does not make sense"
|
37
0107-Fixup-typo-firmare-instead-of-firmware.patch
Normal file
37
0107-Fixup-typo-firmare-instead-of-firmware.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From b723f5fabf7ca5396fbd451e8b2d6ee6b82888c8 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Wed, 9 Jul 2014 09:34:35 +0200
|
||||
Subject: Fixup typo 'firmare' instead of 'firmware'
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
modules.d/95dasd_rules/parse-dasd.sh | 2 +-
|
||||
modules.d/95zfcp_rules/parse-zfcp.sh | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: dracut-042/modules.d/95dasd_rules/parse-dasd.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/95dasd_rules/parse-dasd.sh 2015-06-24 18:02:12.329540991 +0200
|
||||
+++ dracut-042/modules.d/95dasd_rules/parse-dasd.sh 2015-06-24 18:02:14.541666926 +0200
|
||||
@@ -43,7 +43,7 @@ EOF
|
||||
}
|
||||
|
||||
if [[ -f /sys/firmware/ipl/ipl_type &&
|
||||
- $(</sys/firmare/ipl/ipl_type) = "ccw" ]] ; then
|
||||
+ $(</sys/firmware/ipl/ipl_type) = "ccw" ]] ; then
|
||||
(
|
||||
local _ccw=$(cat /sys/firmware/ipl/device)
|
||||
|
||||
Index: dracut-042/modules.d/95zfcp_rules/parse-zfcp.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/95zfcp_rules/parse-zfcp.sh 2015-06-24 18:02:12.041524595 +0200
|
||||
+++ dracut-042/modules.d/95zfcp_rules/parse-zfcp.sh 2015-06-24 18:02:14.541666926 +0200
|
||||
@@ -40,7 +40,7 @@ EOF
|
||||
}
|
||||
|
||||
if [[ -f /sys/firmware/ipl/ipl_type &&
|
||||
- $(</sys/firmare/ipl/ipl_type) = "fcp" ]] ; then
|
||||
+ $(</sys/firmware/ipl/ipl_type) = "fcp" ]] ; then
|
||||
(
|
||||
local _wwpn=$(cat /sys/firmware/ipl/wwpn)
|
||||
local _lun=$(cat /sys/firmware/ipl/lun)
|
26
0108-91zipl-Store-commandline-correctly.patch
Normal file
26
0108-91zipl-Store-commandline-correctly.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 0d9482bf68e9d8f1c9b13d4beb9cecc660dda017 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
modules.d/91zipl/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: dracut-042/modules.d/91zipl/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/91zipl/module-setup.sh 2015-06-24 18:02:12.621557615 +0200
|
||||
+++ dracut-042/modules.d/91zipl/module-setup.sh 2015-06-24 18:02:14.857684916 +0200
|
||||
@@ -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
|
||||
}
|
30
0109-95dasd_rules-Store-all-devices-in-commandline.patch
Normal file
30
0109-95dasd_rules-Store-all-devices-in-commandline.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From 0299c9f31fb0c5794747a6a7f62c32abd9a49754 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
modules.d/95dasd_rules/module-setup.sh | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: dracut-042/modules.d/95dasd_rules/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/95dasd_rules/module-setup.sh 2015-06-24 18:02:10.881458552 +0200
|
||||
+++ dracut-042/modules.d/95dasd_rules/module-setup.sh 2015-06-24 18:02:15.149701540 +0200
|
||||
@@ -12,8 +12,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
|
42
0110-95zfcp_rules-Store-all-devices-in-commandline.patch
Normal file
42
0110-95zfcp_rules-Store-all-devices-in-commandline.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From 0be3d022964d54e8ab769ebed4006ba8b8d65078 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
modules.d/95zfcp_rules/module-setup.sh | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: dracut-042/modules.d/95zfcp_rules/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/95zfcp_rules/module-setup.sh 2015-06-24 18:02:11.753508198 +0200
|
||||
+++ dracut-042/modules.d/95zfcp_rules/module-setup.sh 2015-06-24 18:02:15.445718391 +0200
|
||||
@@ -14,11 +14,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
|
||||
@@ -29,6 +29,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));
|
54
0113-91zipl-Install-script-as-executable.patch
Normal file
54
0113-91zipl-Install-script-as-executable.patch
Normal file
@ -0,0 +1,54 @@
|
||||
From 488cf7ad86eee4cd9138d5e58c1baefeeb5e8c98 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
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
|
||||
|
||||
Index: dracut-042/modules.d/91zipl/install_zipl_cmdline.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/91zipl/install_zipl_cmdline.sh 2015-06-24 18:02:12.621557615 +0200
|
||||
+++ dracut-042/modules.d/91zipl/install_zipl_cmdline.sh 2015-06-24 18:02:15.773737066 +0200
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
-DEV=$1
|
||||
+DEV="$1"
|
||||
MNT=/boot/zipl
|
||||
|
||||
if [ -z "$DEV" ] ; then
|
||||
Index: dracut-042/modules.d/91zipl/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/91zipl/module-setup.sh 2015-06-24 18:02:14.857684916 +0200
|
||||
+++ dracut-042/modules.d/91zipl/module-setup.sh 2015-06-24 18:02:15.773737066 +0200
|
||||
@@ -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)
|
||||
|
||||
Index: dracut-042/modules.d/91zipl/parse-zipl.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/91zipl/parse-zipl.sh 2015-06-24 18:02:12.621557615 +0200
|
||||
+++ dracut-042/modules.d/91zipl/parse-zipl.sh 2015-06-24 18:02:15.773737066 +0200
|
||||
@@ -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
|
42
0114-91zipl-Translate-ext2-3-into-ext4.patch
Normal file
42
0114-91zipl-Translate-ext2-3-into-ext4.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From 12131d99811c9829ed1c19e164f2ef22634ba4e5 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
modules.d/91zipl/module-setup.sh | 15 ++++++++++++++-
|
||||
1 file changed, 14 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: dracut-042/modules.d/91zipl/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/91zipl/module-setup.sh 2015-06-24 18:02:15.773737066 +0200
|
||||
+++ dracut-042/modules.d/91zipl/module-setup.sh 2015-06-24 18:02:16.101755740 +0200
|
||||
@@ -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
|
47
0116-Mark-scripts-as-executable.patch
Normal file
47
0116-Mark-scripts-as-executable.patch
Normal file
@ -0,0 +1,47 @@
|
||||
From 941b55f8d9d50b3ba20ba0a2bb64c7509d38ee72 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
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
|
||||
|
@ -0,0 +1,40 @@
|
||||
From 22c039c79eb496af10fbc811854e07822b063616 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
modules.d/95dasd_rules/parse-dasd.sh | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
Index: dracut-042/modules.d/95dasd_rules/parse-dasd.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/95dasd_rules/parse-dasd.sh 2015-06-24 18:02:14.541666926 +0200
|
||||
+++ dracut-042/modules.d/95dasd_rules/parse-dasd.sh 2015-06-24 18:02:16.761793314 +0200
|
||||
@@ -5,6 +5,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
|
||||
@@ -29,10 +33,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 <<EOF
|
@ -0,0 +1,40 @@
|
||||
From d4245680ba1cd00a15b86f5ccecd4b8be124f6e5 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
modules.d/95zfcp_rules/parse-zfcp.sh | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
Index: dracut-042/modules.d/95zfcp_rules/parse-zfcp.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/95zfcp_rules/parse-zfcp.sh 2015-06-24 18:02:14.541666926 +0200
|
||||
+++ dracut-042/modules.d/95zfcp_rules/parse-zfcp.sh 2015-06-24 18:02:17.057810167 +0200
|
||||
@@ -7,6 +7,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
|
||||
@@ -18,10 +22,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
|
@ -0,0 +1,41 @@
|
||||
From 05bee849390ba39a5a441cbcc921634ddc298232 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Renninger <trenn@suse.de>
|
||||
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 <trenn@suse.de>
|
||||
---
|
||||
dracut.sh | 2 +-
|
||||
lsinitrd.sh | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: dracut-044/dracut.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/dracut.sh
|
||||
+++ dracut-044/dracut.sh
|
||||
@@ -632,7 +632,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
|
||||
|
||||
Index: dracut-044/lsinitrd.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/lsinitrd.sh
|
||||
+++ dracut-044/lsinitrd.sh
|
||||
@@ -89,7 +89,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
|
||||
|
28
0123-95zfcp_rules-fix-typo-in-module_setup.patch
Normal file
28
0123-95zfcp_rules-fix-typo-in-module_setup.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 9e0bf05cd6e0a0ff50502dbce31a8d5031219fe7 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
modules.d/95zfcp_rules/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: dracut-042/modules.d/95zfcp_rules/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/95zfcp_rules/module-setup.sh 2015-06-24 18:02:15.445718391 +0200
|
||||
+++ dracut-042/modules.d/95zfcp_rules/module-setup.sh 2015-06-24 18:02:22.510120561 +0200
|
||||
@@ -52,7 +52,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
|
@ -0,0 +1,96 @@
|
||||
From de870b8879974927873264010b6294a70b6c7980 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
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 135c378..d41920a 100755
|
||||
--- a/modules.d/40network/net-lib.sh
|
||||
+++ b/modules.d/40network/net-lib.sh
|
||||
@@ -241,23 +241,54 @@ 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)
|
||||
[ "$gateway" = "0.0.0.0" ] && unset $gateway
|
||||
[ -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)
|
||||
[ "$dns1" = "0.0.0.0" ] && unset $dns1
|
||||
[ -e ${iface}/secondary-dns ] && dns2=$(read a < ${iface}/secondary-dns; echo $a)
|
||||
[ "$dns2" = "0.0.0.0" ] && unset $dns2
|
||||
[ -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"
|
||||
@@ -436,6 +467,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>
|
||||
--
|
||||
2.6.6
|
||||
|
175
0125-40network-separate-mask-and-prefix.patch
Normal file
175
0125-40network-separate-mask-and-prefix.patch
Normal file
@ -0,0 +1,175 @@
|
||||
From de3ab1c75c5f97a9935db4ce9f0cba332e5ca1ee Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
modules.d/40network/ifup.sh | 9 ++++----
|
||||
modules.d/40network/net-lib.sh | 43 +++++++++++++++++++++++++++++++++---
|
||||
modules.d/40network/parse-ip-opts.sh | 2 +-
|
||||
3 files changed, 46 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
|
||||
index ef8828d..b384dab 100755
|
||||
--- a/modules.d/40network/ifup.sh
|
||||
+++ b/modules.d/40network/ifup.sh
|
||||
@@ -240,9 +240,10 @@ 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 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
|
||||
if ! arping -f -q -D -c 2 -I $netif $ip; then
|
||||
@@ -250,7 +251,7 @@ do_static() {
|
||||
return 1
|
||||
fi
|
||||
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 replace default via $gw dev $netif > /tmp/net.$netif.gw
|
||||
@@ -426,7 +427,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}
|
||||
@@ -440,7 +441,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 d41920a..d963029 100755
|
||||
--- a/modules.d/40network/net-lib.sh
|
||||
+++ b/modules.d/40network/net-lib.sh
|
||||
@@ -20,6 +20,36 @@ get_ip() {
|
||||
echo $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
|
||||
+ echo $prefix
|
||||
+}
|
||||
+
|
||||
iface_for_remote_addr() {
|
||||
set -- $(ip -o route get to $1)
|
||||
echo $5
|
||||
@@ -232,7 +262,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)
|
||||
@@ -280,6 +310,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=
|
||||
@@ -287,6 +318,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}"
|
||||
@@ -295,6 +331,7 @@ ibft_to_cmdline() {
|
||||
warn "ip-addr=$ip"
|
||||
warn "gateway=$gw"
|
||||
warn "subnet-mask=$mask"
|
||||
+ warn "prefix-len=$prefix"
|
||||
warn "hostname=$hostname"
|
||||
fi
|
||||
else
|
||||
@@ -442,7 +479,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 ;;
|
||||
@@ -470,7 +507,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 a3a3a3f..099a21c 100755
|
||||
--- a/modules.d/40network/parse-ip-opts.sh
|
||||
+++ b/modules.d/40network/parse-ip-opts.sh
|
||||
@@ -79,7 +79,7 @@ for p in $(getargs ip=); do
|
||||
none|off)
|
||||
[ -z "$ip" ] && \
|
||||
die "For argument 'ip=$p'\nValue '$autoopt' without static configuration does not make sense"
|
||||
- [ -z "$mask" ] && \
|
||||
+ [ -z "$mask" -a -z "$prefix" ] && \
|
||||
die "Sorry, automatic calculation of netmask is not yet supported"
|
||||
;;
|
||||
auto6);;
|
||||
--
|
||||
2.6.6
|
||||
|
28
0126-01fips-Add-drbg-module-to-force-loaded-modules.patch
Normal file
28
0126-01fips-Add-drbg-module-to-force-loaded-modules.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 58f937144d9f206c06052791456599e48c37c417 Mon Sep 17 00:00:00 2001
|
||||
From: Marcus Meissner <meissner@suse.de>
|
||||
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 <meissner@suse.de>
|
||||
---
|
||||
modules.d/01fips/module-setup.sh | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh
|
||||
index 0e90246..04d5113 100755
|
||||
--- a/modules.d/01fips/module-setup.sh
|
||||
+++ b/modules.d/01fips/module-setup.sh
|
||||
@@ -22,6 +22,8 @@ installkernel() {
|
||||
_fipsmodules+="sha512-ssse3 sha1-ssse3 sha256-ssse3 "
|
||||
_fipsmodules+="ghash-clmulni-intel "
|
||||
|
||||
+ _fipsmodules+="drbg"
|
||||
+
|
||||
mkdir -m 0755 -p "${initdir}/etc/modprobe.d"
|
||||
|
||||
for _mod in $_fipsmodules; do
|
||||
--
|
||||
2.6.6
|
||||
|
26
0128-90lvm-Install-dm-snapshot-module.patch
Normal file
26
0128-90lvm-Install-dm-snapshot-module.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 68b8183fc65c2ff1c7d178e782ea5bff7be74d70 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Renninger <trenn@suse.com>
|
||||
Date: Wed, 4 May 2016 13:32:56 +0200
|
||||
Subject: 90lvm: Install dm-snapshot module
|
||||
|
||||
Signed-off-by: Thomas Renninger <trenn@suse.com>
|
||||
---
|
||||
modules.d/90lvm/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
|
||||
index c4db779..6ca4ee4 100755
|
||||
--- a/modules.d/90lvm/module-setup.sh
|
||||
+++ b/modules.d/90lvm/module-setup.sh
|
||||
@@ -43,7 +43,7 @@ cmdline() {
|
||||
}
|
||||
|
||||
installkernel() {
|
||||
- instmods dm-snapshot
|
||||
+ hostonly='' instmods dm-snapshot
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
--
|
||||
2.6.6
|
||||
|
25
0130-nfs-Always-add-all-kernel-modules-for-kdump.patch
Normal file
25
0130-nfs-Always-add-all-kernel-modules-for-kdump.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 520f0e9185774956e5739841ce87474fcee52594 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Renninger <trenn@suse.de>
|
||||
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 <trenn@suse.de>
|
||||
---
|
||||
modules.d/95nfs/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: dracut-042/modules.d/95nfs/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/95nfs/module-setup.sh 2015-06-11 17:39:47.000000000 +0200
|
||||
+++ dracut-042/modules.d/95nfs/module-setup.sh 2015-06-24 18:02:23.718189334 +0200
|
||||
@@ -25,7 +25,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
|
||||
}
|
||||
|
||||
cmdline() {
|
44
0131-40network-handle-prefixed-IP-addresses-correctly.patch
Normal file
44
0131-40network-handle-prefixed-IP-addresses-correctly.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From fc03504435d8bf5d0a31b8c566c2e783fbb96ec6 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
modules.d/40network/ifup.sh | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
Index: dracut-044/modules.d/40network/ifup.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/40network/ifup.sh
|
||||
+++ dracut-044/modules.d/40network/ifup.sh
|
||||
@@ -241,7 +241,13 @@ 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 strglobin $ip '*:*:*'; then
|
||||
+ 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
|
||||
@@ -250,6 +256,8 @@ do_static() {
|
||||
warn "Duplicate address detected for $ip for interface $netif."
|
||||
return 1
|
||||
fi
|
||||
+ # 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
|
57
0132-40network-fixup-static-network-configuration.patch
Normal file
57
0132-40network-fixup-static-network-configuration.patch
Normal file
@ -0,0 +1,57 @@
|
||||
From 6fd2c01a1cd2dcbd7d2fc3bbe6e62c7d8336bf24 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
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(-)
|
||||
|
||||
Index: dracut-044/modules.d/40network/ifup.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/40network/ifup.sh
|
||||
+++ dracut-044/modules.d/40network/ifup.sh
|
||||
@@ -263,6 +263,19 @@ if strglobin $ip '*:*:*'; then
|
||||
fi
|
||||
|
||||
[ -n "$gw" ] && echo ip route replace default via $gw dev $netif > /tmp/net.$netif.gw
|
||||
+
|
||||
+ for ifroute in /etc/sysconfig/network/ifroute-${netif} /etc/sysconfig/netwrk/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
|
||||
Index: dracut-044/modules.d/40network/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/40network/module-setup.sh
|
||||
+++ dracut-044/modules.d/40network/module-setup.sh
|
||||
@@ -60,6 +60,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.*" \
|
273
0133-Allow-multiple-configurations-per-network-interface-.patch
Normal file
273
0133-Allow-multiple-configurations-per-network-interface-.patch
Normal file
@ -0,0 +1,273 @@
|
||||
From 114aadff326cb6ac63d2b3926fafe944b1670a62 Mon Sep 17 00:00:00 2001
|
||||
From: Julian Wolf <juwolf@suse.com>
|
||||
Date: Thu, 31 Jul 2014 17:11:16 +0200
|
||||
Subject: Allow multiple configurations per network interface bnc#887906
|
||||
|
||||
Signed-off-by: Julian Wolf <juwolf@suse.com>
|
||||
---
|
||||
modules.d/40network/ifup.sh | 90 +++++++++++++++++++++++-------------
|
||||
modules.d/40network/net-genrules.sh | 2 +-
|
||||
modules.d/40network/net-lib.sh | 4 +-
|
||||
modules.d/40network/parse-ip-opts.sh | 14 +++---
|
||||
4 files changed, 66 insertions(+), 44 deletions(-)
|
||||
|
||||
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
|
||||
index 1b71a3c..1cd1677 100755
|
||||
--- a/modules.d/40network/ifup.sh
|
||||
+++ b/modules.d/40network/ifup.sh
|
||||
@@ -90,6 +90,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
|
||||
@@ -131,23 +132,36 @@ 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
|
||||
+ # 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
|
||||
- [ -e /tmp/net.$netif.resolv.conf ] && \
|
||||
- cp -f /tmp/net.$netif.resolv.conf /etc/resolv.conf
|
||||
|
||||
info "DHCP is finished successfully"
|
||||
return 0
|
||||
@@ -175,9 +189,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..."
|
||||
@@ -191,7 +202,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
|
||||
}
|
||||
@@ -222,6 +232,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
|
||||
|
||||
if ! linkup $netif; then
|
||||
@@ -258,7 +293,6 @@ if strglobin $ip '*:*:*'; then
|
||||
fi
|
||||
# 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
|
||||
|
||||
@@ -277,8 +311,6 @@ if strglobin $ip '*:*:*'; then
|
||||
done
|
||||
|
||||
[ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
|
||||
-
|
||||
- return 0
|
||||
}
|
||||
|
||||
# loopback is always handled the same way
|
||||
@@ -427,6 +459,14 @@ for p in $(getargs ip=); do
|
||||
# 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
|
||||
_dev=$(iface_for_mac $dev)
|
||||
@@ -443,29 +483,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
|
||||
for s in "$dns1" "$dns2" $(getargs nameserver); do
|
||||
[ -n "$s" ] || continue
|
||||
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
|
||||
-
|
||||
for autoopt in $(str_replace "$autoconf" "," " "); do
|
||||
case $autoopt in
|
||||
dhcp4|dhcp|on|any)
|
||||
@@ -493,8 +516,6 @@ for p in $(getargs ip=); do
|
||||
/sbin/netroot $netif
|
||||
fi
|
||||
fi
|
||||
-
|
||||
- exit 0
|
||||
done
|
||||
|
||||
# netif isn't the top stack? Then we should exit here.
|
||||
@@ -523,4 +544,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 559b325..843bd98 100755
|
||||
--- a/modules.d/40network/net-genrules.sh
|
||||
+++ b/modules.d/40network/net-genrules.sh
|
||||
@@ -96,7 +96,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 d963029..5aa1468 100755
|
||||
--- a/modules.d/40network/net-lib.sh
|
||||
+++ b/modules.d/40network/net-lib.sh
|
||||
@@ -131,6 +131,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?
|
||||
@@ -203,9 +204,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-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh
|
||||
index 099a21c..7926b6b 100755
|
||||
--- a/modules.d/40network/parse-ip-opts.sh
|
||||
+++ b/modules.d/40network/parse-ip-opts.sh
|
||||
@@ -83,25 +83,23 @@ 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 '$autoopt'"
|
||||
- ;;
|
||||
+ dhcp|dhcp6|on|any);;
|
||||
*) die "For argument 'ip=$p'\nSorry, unknown value '$autoopt'";;
|
||||
esac
|
||||
done
|
||||
|
||||
+ 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?
|
||||
--
|
||||
2.6.6
|
||||
|
@ -0,0 +1,62 @@
|
||||
From 6a85f188d671723ad76bb729307c12e89199b7bd Mon Sep 17 00:00:00 2001
|
||||
From: Marcus Meissner <meissner@suse.com>
|
||||
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 <trenn@suse.de>
|
||||
---
|
||||
modules.d/01fips/fips.sh | 6 ++----
|
||||
modules.d/01fips/module-setup.sh | 13 +++++++------
|
||||
2 files changed, 9 insertions(+), 10 deletions(-)
|
||||
|
||||
Index: dracut-042/modules.d/01fips/fips.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/01fips/fips.sh 2015-06-24 18:02:07.817284113 +0200
|
||||
+++ dracut-042/modules.d/01fips/fips.sh 2015-06-24 18:02:28.266448262 +0200
|
||||
@@ -59,9 +59,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 || [ -n "$a" ]; do printf "%s\n" $a; done)
|
||||
- HMAC_SUM_CALC=$(sha512hmac $kpath | while read a b || [ -n "$a" ]; 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
|
||||
@@ -126,7 +124,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"
|
||||
Index: dracut-042/modules.d/01fips/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/01fips/module-setup.sh 2015-06-24 18:02:23.422172483 +0200
|
||||
+++ dracut-042/modules.d/01fips/module-setup.sh 2015-06-24 18:02:28.266448262 +0200
|
||||
@@ -41,15 +41,16 @@ install() {
|
||||
inst_hook pre-pivot 01 "$moddir/fips-noboot.sh"
|
||||
inst_script "$moddir/fips.sh" /sbin/fips.sh
|
||||
|
||||
- inst_multiple sha512hmac rmmod insmod mount uname umount fipscheck
|
||||
+ inst_multiple rmmod insmod mount uname umount fipscheck
|
||||
|
||||
- inst_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
|
||||
libfreeblpriv3.so libfreeblpriv3.chk
|
||||
|
||||
# we do not use prelink at SUSE
|
28
0138-fips_add_aesni-intel.patch
Normal file
28
0138-fips_add_aesni-intel.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From d74cd280562cc316cbf94db71cb30fd935d26b8b Mon Sep 17 00:00:00 2001
|
||||
From: Marcus Meissner <meissner@suse.com>
|
||||
Date: Wed, 4 May 2016 13:02:50 +0200
|
||||
Subject: 01fips: Put aesni-intel into the initrd for FIPS usage
|
||||
|
||||
References: bsc#914126
|
||||
|
||||
Signed-off-by: Marcus Meissner <meissner@suse.com>
|
||||
---
|
||||
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 7e20b21..2aa9f4f 100755
|
||||
--- a/modules.d/01fips/module-setup.sh
|
||||
+++ b/modules.d/01fips/module-setup.sh
|
||||
@@ -20,7 +20,7 @@ installkernel() {
|
||||
_fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib"
|
||||
_fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key ghash_s390 sha1_s390 sha512_s390"
|
||||
_fipsmodules+="sha512-ssse3 sha1-ssse3 sha256-ssse3 "
|
||||
- _fipsmodules+="ghash-clmulni-intel "
|
||||
+ _fipsmodules+="ghash-clmulni-intel aesni-intel"
|
||||
|
||||
_fipsmodules+="drbg"
|
||||
|
||||
--
|
||||
2.6.6
|
||||
|
62
0139-fips-kernel-4.4-fixes.patch
Normal file
62
0139-fips-kernel-4.4-fixes.patch
Normal file
@ -0,0 +1,62 @@
|
||||
From 2477f53068b4a59af89b2ad89dd2fa174eab7db3 Mon Sep 17 00:00:00 2001
|
||||
From: Marcus Meissner <meissner@suse.com>
|
||||
Date: Tue, 23 Aug 2016 12:26:00 +0200
|
||||
Subject: 01fips: Adjust kernel module list for SLES12 SP2
|
||||
|
||||
Adjust the kernel module list to match the SLES12 SP2 kernel.
|
||||
|
||||
References: bsc#976577
|
||||
|
||||
Signed-off-by: Marcus Meissner <meissner@suse.com>
|
||||
---
|
||||
modules.d/01fips/fips.sh | 1 +
|
||||
modules.d/01fips/module-setup.sh | 21 +++++++++++----------
|
||||
2 files changed, 12 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh
|
||||
index 1cd9852..f33481a 100755
|
||||
--- a/modules.d/01fips/fips.sh
|
||||
+++ b/modules.d/01fips/fips.sh
|
||||
@@ -103,6 +103,7 @@ do_fips()
|
||||
-o "$_module" != "${_module%-ssse3}" \
|
||||
-o "$_module" != "${_module%-x86_64}" \
|
||||
-o "$_module" != "${_module%z90}" \
|
||||
+ -o "$_module" != "${_module%s390}" \
|
||||
]; then
|
||||
_found=1
|
||||
fi
|
||||
diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh
|
||||
index 2aa9f4f..0bca7a1 100755
|
||||
--- a/modules.d/01fips/module-setup.sh
|
||||
+++ b/modules.d/01fips/module-setup.sh
|
||||
@@ -13,16 +13,17 @@ depends() {
|
||||
# called by dracut
|
||||
installkernel() {
|
||||
local _fipsmodules _mod
|
||||
- _fipsmodules="aead aes_generic aes-x86_64 ansi_cprng arc4 authenc authencesn blowfish camellia cast6 cbc ccm "
|
||||
- _fipsmodules+="chainiv crc32c crct10dif_generic cryptomgr crypto_null ctr cts deflate des des3_ede dm-crypt dm-mod drbg "
|
||||
- _fipsmodules+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 "
|
||||
- _fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic "
|
||||
- _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib"
|
||||
- _fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key ghash_s390 sha1_s390 sha512_s390"
|
||||
- _fipsmodules+="sha512-ssse3 sha1-ssse3 sha256-ssse3 "
|
||||
- _fipsmodules+="ghash-clmulni-intel aesni-intel"
|
||||
-
|
||||
- _fipsmodules+="drbg"
|
||||
+ _fipsmodules="ansi_cprng arc4 authenc ccm "
|
||||
+ _fipsmodules+="ctr cts deflate drbg "
|
||||
+ _fipsmodules+="ecb fcrypt gcm ghash_generic khazad md4 michael_mic rmd128 "
|
||||
+ _fipsmodules+="rmd160 rmd256 rmd320 seed "
|
||||
+ _fipsmodules+="sha512_generic tcrypt tea wp512 xts zlib "
|
||||
+ _fipsmodules+="aes_s390 des_s390 sha256_s390 ghash_s390 sha1_s390 sha512_s390 "
|
||||
+ _fipsmodules+="gf128mul "
|
||||
+ _fipsmodules+="cmac vmac xcbc salsa20_generic salsa20_x86_64 camellia_generic camellia_x86_64 pcbc tgr192 anubis "
|
||||
+ _fipsmodules+="cast6_generic cast5_generic cast_common sha512_ssse3 serpent_sse2_x86_64 serpent_generic twofish_generic "
|
||||
+ _fipsmodules+="ablk_helper cryptd twofish_x86_64_3way lrw glue_helper twofish_x86_64 twofish_common blowfish_generic "
|
||||
+ _fipsmodules+="blowfish_x86_64 blowfish_common des_generic "
|
||||
|
||||
mkdir -m 0755 -p "${initdir}/etc/modprobe.d"
|
||||
|
||||
--
|
||||
2.6.6
|
||||
|
@ -0,0 +1,24 @@
|
||||
From fac3fb787b0a74cf8d9d32939dd6d6831342a25d Mon Sep 17 00:00:00 2001
|
||||
From: Julian Wolf <juwolf@suse.de>
|
||||
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 <juwolf@suse.de>
|
||||
---
|
||||
modules.d/40network/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: dracut-044/modules.d/40network/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/40network/module-setup.sh
|
||||
+++ dracut-044/modules.d/40network/module-setup.sh
|
||||
@@ -60,7 +60,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
|
||||
}
|
||||
|
@ -0,0 +1,69 @@
|
||||
From 7f4dea242398cc369ff3fecd599faa00d81a522c Mon Sep 17 00:00:00 2001
|
||||
From: Julian Wolf <juwolf@suse.de>
|
||||
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 <juwolf@suse.de>
|
||||
---
|
||||
modules.d/90crypt/crypt-lib.sh | 9 +++++++++
|
||||
modules.d/90crypt/module-setup.sh | 4 ++++
|
||||
2 files changed, 13 insertions(+)
|
||||
|
||||
Index: dracut-044/modules.d/90crypt/crypt-lib.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/90crypt/crypt-lib.sh
|
||||
+++ dracut-044/modules.d/90crypt/crypt-lib.sh
|
||||
@@ -16,6 +16,14 @@ crypttab_contains() {
|
||||
[ "$dev" -ef "$_dev" ] && return 0
|
||||
done
|
||||
fi
|
||||
+ 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
|
||||
Index: dracut-044/modules.d/90crypt/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/90crypt/module-setup.sh
|
||||
+++ dracut-044/modules.d/90crypt/module-setup.sh
|
||||
@@ -64,6 +64,8 @@ install() {
|
||||
inst_hook cleanup 30 "$moddir/crypt-cleanup.sh"
|
||||
fi
|
||||
|
||||
+ # Have to use exit here, return value gets ignored in dracut.sh...
|
||||
+ uuid_map_file=$(mktemp /tmp/dracut.XXXXXXXXXX) || exit 1
|
||||
if [[ $hostonly ]] && [[ -f /etc/crypttab ]]; then
|
||||
# filter /etc/crypttab for the devices we need
|
||||
while read _mapper _dev _rest || [ -n "$_mapper" ]; do
|
||||
@@ -73,6 +75,8 @@ install() {
|
||||
[[ $_dev == UUID=* ]] && \
|
||||
_dev="/dev/disk/by-uuid/${_dev#UUID=}"
|
||||
|
||||
+ echo "$_dev $(blkid $_dev -s UUID -o value)" >> $uuid_map_file
|
||||
+
|
||||
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 +89,8 @@ install() {
|
||||
fi
|
||||
|
||||
inst_simple "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh"
|
||||
+ inst_simple $uuid_map_file "/usr/lib/dracut/modules.d/90crypt/block_uuid.map"
|
||||
+ rm -f $uuid_map_file
|
||||
|
||||
if dracut_module_included "systemd"; then
|
||||
inst_multiple -o \
|
105
0145-40network-handle-ip-ifname-static-correctly.patch
Normal file
105
0145-40network-handle-ip-ifname-static-correctly.patch
Normal file
@ -0,0 +1,105 @@
|
||||
From 4b0e5841ce7dbeca5186e0d47f8835b00007cd6e Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
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 <hare@suse.de>
|
||||
---
|
||||
modules.d/40network/ifup.sh | 40 ++++++++++++++++++++++++++++++----------
|
||||
1 file changed, 30 insertions(+), 10 deletions(-)
|
||||
|
||||
Index: dracut-044/modules.d/40network/ifup.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/40network/ifup.sh
|
||||
+++ dracut-044/modules.d/40network/ifup.sh
|
||||
@@ -182,11 +182,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
|
||||
@@ -230,33 +232,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
|
||||
|
||||
if ! linkup $netif; then
|
||||
@@ -498,6 +516,8 @@ for p in $(getargs ip=); do
|
||||
do_dhcp -6 ;;
|
||||
auto6)
|
||||
do_ipv6auto ;;
|
||||
+ static)
|
||||
+ do_ifcfg ;;
|
||||
*)
|
||||
do_static ;;
|
||||
esac
|
@ -0,0 +1,23 @@
|
||||
From b5a5fb4486dee09287df825ecd1d2f8b76a98682 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <martin.wilck@ts.fujitsu.com>
|
||||
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 <trenn@suse.de>
|
||||
---
|
||||
dracut-init.sh | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
Index: dracut-044/dracut-init.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/dracut-init.sh
|
||||
+++ dracut-044/dracut-init.sh
|
||||
@@ -1058,7 +1058,7 @@ find_kernel_modules_by_path () {
|
||||
_OLDIFS=$IFS
|
||||
IFS=:
|
||||
while read a rest || [ -n "$a" ]; 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
|
24
0157-Add-boot-zipl-to-host-devs-if-it-is-a-mount-point.patch
Normal file
24
0157-Add-boot-zipl-to-host-devs-if-it-is-a-mount-point.patch
Normal file
@ -0,0 +1,24 @@
|
||||
From 7067073ca16b10749edd6a508e3c4b1c38c3c7c2 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Renninger <trenn@suse.de>
|
||||
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 <trenn@suse.de>
|
||||
---
|
||||
dracut.sh | 1 +
|
||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
||||
|
||||
Index: dracut-044/dracut.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/dracut.sh
|
||||
+++ dracut-044/dracut.sh
|
||||
@@ -1121,6 +1121,7 @@ if [[ $hostonly ]]; then
|
||||
"/usr/lib64" \
|
||||
"/boot" \
|
||||
"/boot/efi" \
|
||||
+ "/boot/zipl" \
|
||||
;
|
||||
do
|
||||
mp=$(readlink -f "$mp")
|
@ -0,0 +1,70 @@
|
||||
From 75faba5ea84fe53df7d3ca3e4f4b6cf390c824bb Mon Sep 17 00:00:00 2001
|
||||
From: Jan Loeser <jloeser@suse.de>
|
||||
Date: Thu, 11 Sep 2014 15:20:23 +0200
|
||||
Subject: Add SUSE kernel module dependencies (in /etc/modprobe.d/*)
|
||||
|
||||
bnc#895331
|
||||
|
||||
Fixed-by: Fabian Vogt <fvogt@suse.com>
|
||||
---
|
||||
dracut-init.sh | 6 +++++-
|
||||
dracut.sh | 12 ++++++++++++
|
||||
2 files changed, 17 insertions(+), 1 deletions(-)
|
||||
|
||||
Index: dracut-044/dracut-init.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/dracut-init.sh
|
||||
+++ dracut-044/dracut-init.sh
|
||||
@@ -944,6 +944,13 @@ for_each_kmod_dep() {
|
||||
$_func ${_modpath} || exit $?
|
||||
done
|
||||
)
|
||||
+
|
||||
+ for suse_mod_dep in ${suse_mod_deps["${_kmod%.ko*}"]}; do
|
||||
+ _modpath=$(modinfo -k "$kernel" -F filename "$suse_mod_dep" 2> /dev/null)
|
||||
+ [ -n "$_modpath" ] || continue
|
||||
+ for_each_kmod_dep "$_func" "$_modpath" "$@"
|
||||
+ $_func ${_modpath} || exit $?
|
||||
+ done
|
||||
}
|
||||
|
||||
dracut_kernel_post() {
|
||||
@@ -1141,8 +1148,14 @@ instmods() {
|
||||
--set-version $kernel ${_moddirname} $_mpargs
|
||||
((_ret+=$?))
|
||||
else
|
||||
- [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && \
|
||||
+ if [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] \
|
||||
+ && [ -n "${_mod%.ko*}" ]; then
|
||||
echo ${_mod%.ko*} >> "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist"
|
||||
+ for suse_mod_dep in ${suse_mod_deps["${_mod%.ko*}"]}; do
|
||||
+ echo $suse_mod_dep >> "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist"
|
||||
+ done
|
||||
+ fi
|
||||
+
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
Index: dracut-044/dracut.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/dracut.sh
|
||||
+++ dracut-044/dracut.sh
|
||||
@@ -767,6 +767,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.
|
||||
if [[ $_no_compress_l = "cat" ]]; then
|
||||
compress="cat"
|
25
0159-network-Try-to-load-xennet.patch
Normal file
25
0159-network-Try-to-load-xennet.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 2a73a8c956bd3b34f19cadd17b44303d8c104a53 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Renninger <trenn@suse.de>
|
||||
Date: Fri, 19 Sep 2014 15:34:54 +0200
|
||||
Subject: network: Try to load xennet
|
||||
|
||||
bnc#896464, bnc#896259
|
||||
|
||||
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
||||
---
|
||||
modules.d/40network/module-setup.sh | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
Index: dracut-044/modules.d/90kernel-network-modules/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/90kernel-network-modules/module-setup.sh
|
||||
+++ dracut-044/modules.d/90kernel-network-modules/module-setup.sh
|
||||
@@ -61,7 +61,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
|
||||
hostonly="" instmods iscsi_ibft crc32c iscsi_boot_sysfs
|
||||
}
|
||||
|
25
0160-s390-update_active_devices_initrd.patch
Normal file
25
0160-s390-update_active_devices_initrd.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From: Thomas Blume <thomas.blume@suse.com>
|
||||
Subject: 91zipl: Update active_devices.txt from /boot/zipl device
|
||||
|
||||
References: bsc#939101
|
||||
|
||||
Signed-off-by: Thomas Blume <thomas.blume@suse.com>
|
||||
|
||||
Index: dracut-044/modules.d/91zipl/install_zipl_cmdline.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/91zipl/install_zipl_cmdline.sh 2016-04-12 15:48:34.620382686 +0200
|
||||
+++ dracut-044/modules.d/91zipl/install_zipl_cmdline.sh 2016-04-12 15:48:35.140412123 +0200
|
||||
@@ -22,6 +22,13 @@ if [ -f ${MNT}/dracut-cmdline.conf ] ; t
|
||||
cp ${MNT}/dracut-cmdline.conf /etc/cmdline.d/99zipl.conf
|
||||
fi
|
||||
|
||||
+if [ -f ${MNT}/active_devices.txt ] ; then
|
||||
+ while read dev etc ; do
|
||||
+ [ "$dev" = "#" -o "$dev" = "" ] && continue;
|
||||
+ cio_ignore -r $dev
|
||||
+ done < ${MNT}/active_devices.txt
|
||||
+fi
|
||||
+
|
||||
umount ${MNT}
|
||||
|
||||
if [ -f /etc/cmdline.d/99zipl.conf ] ; then
|
@ -0,0 +1,94 @@
|
||||
From 61d345654fbdd895a406a5a7517f01a7c984a7ed Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Thu, 10 Mar 2016 15:45:43 +0100
|
||||
Subject: [PATCH] 95zfcp_rules: simplified rd.zfcp commandline for NPIV
|
||||
|
||||
When NPIV is enabled and the allow_lun_scan parameter is set to 'Y'
|
||||
the HBA will initiate a LUN scan automatically, so there is no need
|
||||
to specify the WWPN and LUN number manually.
|
||||
|
||||
References: bsc#964456
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.com>
|
||||
---
|
||||
dracut.cmdline.7.asc | 9 ++++++++-
|
||||
modules.d/95zfcp_rules/module-setup.sh | 23 +++++++++++++++++++----
|
||||
modules.d/95zfcp_rules/parse-zfcp.sh | 1 +
|
||||
3 files changed, 28 insertions(+), 5 deletions(-)
|
||||
|
||||
Index: dracut-044/dracut.cmdline.7.asc
|
||||
===================================================================
|
||||
--- dracut-044.orig/dracut.cmdline.7.asc 2016-04-12 15:48:42.072804543 +0200
|
||||
+++ dracut-044/dracut.cmdline.7.asc 2016-04-12 15:48:46.869076048 +0200
|
||||
@@ -771,12 +771,19 @@ DASD
|
||||
ZFCP
|
||||
~~~~
|
||||
**rd.zfcp=**__<zfcp adaptor device bus ID>__,__<WWPN>__,__<FCPLUN>__::
|
||||
- rd.zfcp can be specified multiple times on the kernel command line.
|
||||
+ rd.zfcp can be specified multiple times on the kernel command
|
||||
+ line.
|
||||
+
|
||||
+**rd.zfcp=**__<zfcp adaptor device bus ID>__::
|
||||
+ If NPIV is enabled and the 'allow_lun_scan' parameter to the zfcp
|
||||
+ module is set to 'Y' then the zfcp adaptor will be initiating a
|
||||
+ scan internally and the <WWPN> and <FCPLUN> parameters can be omitted.
|
||||
+
|
||||
[listing]
|
||||
.Example
|
||||
--
|
||||
rd.zfcp=0.0.4000,0x5005076300C213e9,0x5022000000000000
|
||||
+rd.zfcp=0.0.4000
|
||||
--
|
||||
|
||||
**rd.zfcp.conf=0**::
|
||||
Index: dracut-044/modules.d/95zfcp_rules/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/95zfcp_rules/module-setup.sh 2016-04-12 15:48:42.072804543 +0200
|
||||
+++ dracut-044/modules.d/95zfcp_rules/module-setup.sh 2016-04-12 15:48:46.869076048 +0200
|
||||
@@ -5,15 +5,30 @@ cmdline() {
|
||||
is_zfcp() {
|
||||
local _dev=$1
|
||||
local _devpath=$(cd -P /sys/dev/block/$_dev ; echo $PWD)
|
||||
- local _sdev _lun _wwpn _ccw
|
||||
+ local _sdev _scsiid _hostno _lun _wwpn _ccw _port_type
|
||||
+ local _allow_lun_scan _is_npiv
|
||||
|
||||
+ _allow_lun_scan=$(cat /sys/module/zfcp/parameters/allow_lun_scan)
|
||||
[ "${_devpath#*/sd}" == "$_devpath" ] && return 1
|
||||
_sdev="${_devpath%%/block/*}"
|
||||
[ -e ${_sdev}/fcp_lun ] || return 1
|
||||
- _lun=$(cat ${_sdev}/fcp_lun)
|
||||
- _wwpn=$(cat ${_sdev}/wwpn)
|
||||
+ _scsiid="${_sdev##*/}"
|
||||
+ _hostno="${_scsiid%%:*}"
|
||||
+ [ -d /sys/class/fc_host/host${_hostno} ] || return 1
|
||||
+ _port_type=$(cat /sys/class/fc_host/host${_hostno}/port_type)
|
||||
+ case "$_port_type" in
|
||||
+ NPIV*)
|
||||
+ _is_npiv=1
|
||||
+ ;;
|
||||
+ esac
|
||||
_ccw=$(cat ${_sdev}/hba_id)
|
||||
- echo "rd.zfcp=${_ccw},${_wwpn},${_lun}"
|
||||
+ if [ "$_is_npiv" ] && [ "$_allow_lun_scan" = "Y" ] ; then
|
||||
+ echo "rd.zfcp=${_ccw}"
|
||||
+ else
|
||||
+ _lun=$(cat ${_sdev}/fcp_lun)
|
||||
+ _wwpn=$(cat ${_sdev}/wwpn)
|
||||
+ echo "rd.zfcp=${_ccw},${_wwpn},${_lun}"
|
||||
+ fi
|
||||
return 0
|
||||
}
|
||||
[[ $hostonly ]] || [[ $mount_needs ]] && {
|
||||
Index: dracut-044/modules.d/95zfcp_rules/parse-zfcp.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/95zfcp_rules/parse-zfcp.sh 2016-04-12 15:48:42.072804543 +0200
|
||||
+++ dracut-044/modules.d/95zfcp_rules/parse-zfcp.sh 2016-04-12 15:48:46.869076048 +0200
|
||||
@@ -31,6 +31,7 @@ ACTION=="add", SUBSYSTEM=="drivers", KER
|
||||
ACTION=="add", ENV{COLLECT_$ccw}=="0", ATTR{[ccw/$ccw]online}="1"
|
||||
EOF
|
||||
fi
|
||||
+ [ -z "$wwpn" -o -z "$lun" ] && return
|
||||
m=$(sed -n "/.*${wwpn}.*${lun}.*/p" $_rule)
|
||||
if [ -z "$m" ] ; then
|
||||
cat >> $_rule <<EOF
|
@ -0,0 +1,69 @@
|
||||
From b4216546ff3254f2ca21c6b29c745e1bfd4956cc Mon Sep 17 00:00:00 2001
|
||||
From: Pawel Wieczorkiewicz <pwieczorkiewicz@suse.de>
|
||||
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 <pwieczorkiewicz@suse.de>
|
||||
---
|
||||
modules.d/40network/ifup.sh | 20 ++++++++++++++++----
|
||||
1 files changed, 16 insertions(+), 4 deletions(-)
|
||||
|
||||
Index: dracut-044/modules.d/40network/ifup.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/40network/ifup.sh
|
||||
+++ dracut-044/modules.d/40network/ifup.sh
|
||||
@@ -186,9 +186,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
|
||||
@@ -201,10 +207,14 @@ do_dhcp() {
|
||||
fi
|
||||
fi
|
||||
|
||||
- $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
|
||||
}
|
||||
|
||||
@@ -224,6 +234,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
|
||||
|
||||
@@ -515,6 +526,7 @@ for p in $(getargs ip=); do
|
||||
load_ipv6
|
||||
do_dhcp -6 ;;
|
||||
auto6)
|
||||
+ echo $netif > /tmp/net.$netif.auto6
|
||||
do_ipv6auto ;;
|
||||
static)
|
||||
do_ifcfg ;;
|
@ -0,0 +1,28 @@
|
||||
From 4ef054c0510f24e8652726674461833a33643b26 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Renninger <trenn@suse.de>
|
||||
Date: Tue, 30 Sep 2014 16:58:05 +0200
|
||||
Subject: Install /etc/sysconfig/console to see specific fonts
|
||||
|
||||
bnc#897972
|
||||
|
||||
Author: Werner Fink <werner@suse.de>
|
||||
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
||||
---
|
||||
modules.d/10i18n/module-setup.sh | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
Index: dracut-042/modules.d/10i18n/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/modules.d/10i18n/module-setup.sh 2015-06-11 17:39:47.000000000 +0200
|
||||
+++ dracut-042/modules.d/10i18n/module-setup.sh 2015-06-24 18:02:33.938771180 +0200
|
||||
@@ -219,6 +219,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
|
||||
}
|
||||
|
@ -0,0 +1,25 @@
|
||||
From 76396977ee19d97697226bda13de007030433854 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <crrodriguez@opensuse.org>
|
||||
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(-)
|
||||
|
||||
Index: dracut-042/dracut-initramfs-restore.sh
|
||||
===================================================================
|
||||
--- dracut-042.orig/dracut-initramfs-restore.sh 2015-06-11 17:39:47.000000000 +0200
|
||||
+++ dracut-042/dracut-initramfs-restore.sh 2015-06-24 18:02:34.238788260 +0200
|
||||
@@ -19,7 +19,7 @@ mount -o ro /boot &>/dev/null
|
||||
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
|
||||
|
32
0168-remove_plymouth_logo_file.patch
Normal file
32
0168-remove_plymouth_logo_file.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From 280d52085fe2876bc08ce1dcdbf1522f8861801c Mon Sep 17 00:00:00 2001
|
||||
From: Shawn W Dunn <sfalken@opensuse.org>
|
||||
Date: Tue, 23 Aug 2016 13:16:20 +0200
|
||||
Subject: 50plymouth: remove PLYMOUTH_LOGO_FILE
|
||||
|
||||
Remove PLYMOUTH_LOGO_FILE from plymouth-populate-initrd.sh
|
||||
|
||||
References: bnc#910952
|
||||
|
||||
Signed-off-by: Shawn W Dunn <sfalken@opensuse.org>
|
||||
---
|
||||
modules.d/50plymouth/plymouth-populate-initrd.sh | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/50plymouth/plymouth-populate-initrd.sh b/modules.d/50plymouth/plymouth-populate-initrd.sh
|
||||
index 6c184ac..3294878 100755
|
||||
--- a/modules.d/50plymouth/plymouth-populate-initrd.sh
|
||||
+++ b/modules.d/50plymouth/plymouth-populate-initrd.sh
|
||||
@@ -1,10 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
-PLYMOUTH_LOGO_FILE="/usr/share/pixmaps/system-logo-white.png"
|
||||
PLYMOUTH_THEME=$(plymouth-set-default-theme)
|
||||
|
||||
inst_multiple plymouthd plymouth \
|
||||
- "${PLYMOUTH_LOGO_FILE}" \
|
||||
/etc/system-release
|
||||
|
||||
mkdir -m 0755 -p "${initdir}/usr/share/plymouth"
|
||||
--
|
||||
2.6.6
|
||||
|
106
0169-network_set_mtu_macaddr_for_dhcp.patch
Normal file
106
0169-network_set_mtu_macaddr_for_dhcp.patch
Normal file
@ -0,0 +1,106 @@
|
||||
From b27ca9cfcb5df2066e87f673cb5c060bcf4016fa Mon Sep 17 00:00:00 2001
|
||||
From: Pawel Wieczorkiewicz <pwieczorkiewicz@suse.de>
|
||||
Date: Tue, 23 Aug 2016 12:29:03 +0200
|
||||
Subject: Set MTU and LLADDR for DHCP if specified
|
||||
|
||||
References: boo#959803
|
||||
|
||||
Signed-off-by: Pawel Wieczorkiewicz <pwieczorkiewicz@suse.de>
|
||||
---
|
||||
modules.d/40network/ifup.sh | 52 ++++++++++++++++++++++++++++-----------------
|
||||
1 file changed, 32 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
|
||||
index 0aaea72..3b92854 100755
|
||||
--- a/modules.d/40network/ifup.sh
|
||||
+++ b/modules.d/40network/ifup.sh
|
||||
@@ -90,7 +90,7 @@ else
|
||||
fi
|
||||
|
||||
dhcp_apply() {
|
||||
- unset IPADDR INTERFACE BROADCAST NETWORK PREFIXLEN ROUTES GATEWAYS HOSTNAME DNSDOMAIN DNSSEARCH DNSSERVERS
|
||||
+ unset IPADDR INTERFACE BROADCAST NETWORK PREFIXLEN ROUTES GATEWAYS MTU HOSTNAME DNSDOMAIN DNSSEARCH DNSSERVERS
|
||||
if [ -f /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1} ]; then
|
||||
. /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1}
|
||||
else
|
||||
@@ -128,6 +128,9 @@ dhcp_apply() {
|
||||
done
|
||||
fi
|
||||
|
||||
+ # Set MTU
|
||||
+ [ -n "${MTU}" ] && ip $1 link set mtu "$MTU" dev "$INTERFACE"
|
||||
+
|
||||
# Setup hostname
|
||||
[ -n "${HOSTNAME}" ] && hostname "$HOSTNAME"
|
||||
|
||||
@@ -167,6 +170,25 @@ dhcp_apply() {
|
||||
return 0
|
||||
}
|
||||
|
||||
+read_ifcfg() {
|
||||
+ unset PREFIXLEN LLADDR MTU REMOTE_IPADDR GATEWAY BOOTPROTO
|
||||
+
|
||||
+ if [ -e /etc/sysconfig/network/ifcfg-${netif} ] ; then
|
||||
+ # Pull in existing configuration
|
||||
+ . /etc/sysconfig/network/ifcfg-${netif}
|
||||
+
|
||||
+ # The first configuration can be anything
|
||||
+ [ -n "$PREFIXLEN" ] && prefix=${PREFIXLEN}
|
||||
+ [ -n "$LLADDR" ] && macaddr=${LLADDR}
|
||||
+ [ -n "$MTU" ] && mtu=${MTU}
|
||||
+ [ -n "$REMOTE_IPADDR" ] && server=${REMOTE_IPADDR}
|
||||
+ [ -n "$GATEWAY" ] && gw=${GATEWAY}
|
||||
+ [ -n "$BOOTPROTO" ] && autoconf=${BOOTPROTO}
|
||||
+ return 0
|
||||
+ fi
|
||||
+ return 1
|
||||
+}
|
||||
+
|
||||
# Run dhclient
|
||||
do_dhcp() {
|
||||
# dhclient-script will mark the netif up and generate the online
|
||||
@@ -197,14 +219,14 @@ do_dhcp() {
|
||||
dhclient="wickedd-dhcp4 --test"
|
||||
fi
|
||||
|
||||
- if ! iface_has_link $netif; then
|
||||
- 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
|
||||
+ if ! linkup $netif; then
|
||||
+ warn "Could not bring interface $netif up!"
|
||||
+ return 1
|
||||
+ fi
|
||||
+
|
||||
+ if read_ifcfg ; then
|
||||
+ [ -n "$macaddr" ] && ip $1 link set address $macaddr dev $netif
|
||||
+ [ -n "$mtu" ] && ip $1 link set mtu $mtu dev $netif
|
||||
fi
|
||||
|
||||
$dhclient --test-format leaseinfo --test-output /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1} --test-request - $netif << EOF
|
||||
@@ -245,17 +267,7 @@ do_ipv6auto() {
|
||||
|
||||
# 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}
|
||||
+ if [ "$autoconf" = "static" ] && read_ifcfg; then
|
||||
case "$autoconf" in
|
||||
dhcp6)
|
||||
load_ipv6
|
||||
--
|
||||
2.6.6
|
||||
|
28
0170-iscsi-skip-ibft-invalid-dhcp.patch
Normal file
28
0170-iscsi-skip-ibft-invalid-dhcp.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From e5d14a8adbfc875517e5d873bea18bf9d997b91f Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Renninger <trenn@suse.com>
|
||||
Date: Tue, 23 Aug 2016 12:30:21 +0200
|
||||
Subject: 40network: fixup invalid DHCP setting for iBFT
|
||||
|
||||
References: bsc#953361
|
||||
|
||||
Signed-off-by: Thomas Renninger <trenn@suse.com>
|
||||
---
|
||||
modules.d/40network/net-lib.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
||||
index 5aa1468..0a77d4b 100755
|
||||
--- a/modules.d/40network/net-lib.sh
|
||||
+++ b/modules.d/40network/net-lib.sh
|
||||
@@ -288,7 +288,7 @@ ibft_to_cmdline() {
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
- if [ -n "$dhcp" ] || [ "$origin" -eq 3 ]; then
|
||||
+ if [ -n "$dhcp" -a "$dhcp" != "0.0.0.0" ] || [ -z "$dhcp" -a "$origin" -eq 3 ]; then
|
||||
if [ "$family" = "ipv6" ] ; then
|
||||
echo "ip=$dev:dhcp6"
|
||||
else
|
||||
--
|
||||
2.6.6
|
||||
|
32
0180-i18n_add_correct_fontmaps.patch
Normal file
32
0180-i18n_add_correct_fontmaps.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From 5f56e6a34ddbc27eee6f7fbe5776bd23629b2e4d Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fvogt@suse.com>
|
||||
Date: Wed, 4 May 2016 13:08:19 +0200
|
||||
Subject: 10i18n: Add correct fontmaps
|
||||
|
||||
References: bsc#943312, bsc#932981
|
||||
|
||||
Signed-off-by: Fabian Vogt <fvogt@suse.com>
|
||||
---
|
||||
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 398d02b..4fd0b26 100755
|
||||
--- a/modules.d/10i18n/module-setup.sh
|
||||
+++ b/modules.d/10i18n/module-setup.sh
|
||||
@@ -196,7 +196,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.6.6
|
||||
|
41
0182-fix-include-parsing.patch
Normal file
41
0182-fix-include-parsing.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From 11d6560d7bbd8a4c4610a39c0985e50d728920fb Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fvogt@suse.com>
|
||||
Date: Mon, 21 Sep 2015 15:15:07 +0200
|
||||
Subject: [PATCH] Fix parsing of "-i" and "--include"
|
||||
|
||||
- dracut replaced every instance of "-i" in the cmdline,
|
||||
even if it was part of a kernel image name, e.g. "vmlinuz-i"
|
||||
- Fixes boo#908452
|
||||
|
||||
Signed-off-by: Fabian Vogt <fvogt@suse.com>
|
||||
---
|
||||
dracut.sh | 12 +++++++-----
|
||||
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
Index: dracut-044/dracut.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/dracut.sh
|
||||
+++ dracut-044/dracut.sh
|
||||
@@ -279,11 +279,17 @@ dropindirs_sort()
|
||||
rearrange_params()
|
||||
{
|
||||
# Workaround -i, --include taking 2 arguments
|
||||
- set -- "${@/--include/++include}"
|
||||
-
|
||||
- # This prevents any long argument ending with "-i"
|
||||
- # -i, like --opt-i but I think we can just prevent that
|
||||
- set -- "${@/%-i/++include}"
|
||||
+ newat=()
|
||||
+ for i in "$@"; do
|
||||
+ if [[ $i =~ ^-i(.*) ]]; then
|
||||
+ newat+=("++include" "${BASH_REMATCH[1]}") # Replace -i by ++include
|
||||
+ elif [[ $i == "--include" ]]; then
|
||||
+ newat+=("++include") # Replace --include by ++include
|
||||
+ else
|
||||
+ newat+=("$i")
|
||||
+ fi
|
||||
+ done
|
||||
+ set -- "${newat[@]}" # Set new $@
|
||||
|
||||
TEMP=$(unset POSIXLY_CORRECT; getopt \
|
||||
-o "a:m:o:d:I:k:c:L:fvqlHhMN" \
|
25
0183-fix_add_drivers_hang.patch
Normal file
25
0183-fix_add_drivers_hang.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From d774a6f49771b9f55de2956c3c0038a7655b6e94 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fvogt@suse.com>
|
||||
Date: Wed, 23 Sep 2015 12:12:08 +0200
|
||||
Subject: [PATCH] Fix possible hang in dracut
|
||||
|
||||
- Caused by add_drivers+=" " in dracut.conf (bsc#923116)
|
||||
|
||||
Signed-off-by: Fabian Vogt <fvogt@suse.com>
|
||||
---
|
||||
dracut.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: dracut-044/dracut.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/dracut.sh
|
||||
+++ dracut-044/dracut.sh
|
||||
@@ -1441,7 +1441,7 @@ if [[ $no_kernel != yes ]]; then
|
||||
hostonly='' instmods $drivers
|
||||
fi
|
||||
|
||||
- if [[ $add_drivers ]]; then
|
||||
+ if [[ -n "${add_drivers// }" ]]; then
|
||||
hostonly='' instmods -c $add_drivers
|
||||
fi
|
||||
if [[ $force_drivers ]]; then
|
25
0188-95dasd_rules-Install-collect-udev-helper-binary.patch
Normal file
25
0188-95dasd_rules-Install-collect-udev-helper-binary.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From: Thomas Renninger <trenn@suse.com>
|
||||
Date: Mon, 3 Aug 2015 14:07:59 +0200
|
||||
Subject: 95dasd_rules: Install 'collect' udev helper binary
|
||||
|
||||
Install the 'collect' udev helper binary for s390-specific rules.
|
||||
|
||||
References: bsc#938867
|
||||
|
||||
Signed-off-by: Thomas Renninger <trenn@suse.com>
|
||||
---
|
||||
modules.d/95dasd_rules/module-setup.sh | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
Index: dracut-044/modules.d/95dasd_rules/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/95dasd_rules/module-setup.sh 2016-04-25 15:02:50.532329644 +0200
|
||||
+++ dracut-044/modules.d/95dasd_rules/module-setup.sh 2016-04-25 15:02:52.384434310 +0200
|
||||
@@ -45,6 +45,7 @@ depends() {
|
||||
|
||||
# called by dracut
|
||||
install() {
|
||||
+ inst_multiple /usr/lib/udev/collect
|
||||
inst_hook cmdline 30 "$moddir/parse-dasd.sh"
|
||||
if [[ $hostonly_cmdline == "yes" ]] ; then
|
||||
local _dasd=$(cmdline)
|
182
0190-replace-iscsistart-with-systemd-service-files.patch
Normal file
182
0190-replace-iscsistart-with-systemd-service-files.patch
Normal file
@ -0,0 +1,182 @@
|
||||
From c426dc773fe654aed309375e20e398e9299ca34e Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Blume <Thomas.Blume@suse.com>
|
||||
Date: Mon, 19 Oct 2015 09:14:53 +0200
|
||||
Subject: Replace iscsistart with iscsiadm
|
||||
References: FATE#319024
|
||||
|
||||
iscsistart allows for a single connection only, and offers no means
|
||||
or terminating or re-establishing another one.
|
||||
So replace iscsistart with iscsiadm to allow several connection for
|
||||
multipath booting and also to ease maintenance in case of error.
|
||||
|
||||
Signed-off-by: Thomas Blume <thomas.blume@suse.com>
|
||||
---
|
||||
modules.d/95iscsi/iscsiroot.sh | 48 ++++++++++++++++++++++++------------
|
||||
modules.d/95iscsi/module-setup.sh | 19 ++++++++++++--
|
||||
modules.d/95iscsi/parse-iscsiroot.sh | 2 +-
|
||||
3 files changed, 50 insertions(+), 19 deletions(-)
|
||||
|
||||
Index: dracut-044/modules.d/95iscsi/iscsiroot.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/95iscsi/iscsiroot.sh 2016-04-18 17:43:51.198589298 +0200
|
||||
+++ dracut-044/modules.d/95iscsi/iscsiroot.sh 2016-04-18 17:53:11.962323970 +0200
|
||||
@@ -43,17 +43,13 @@ fi
|
||||
|
||||
handle_firmware()
|
||||
{
|
||||
- if ! iscsistart -f; then
|
||||
- warn "iscistart: Could not get list of targets from firmware."
|
||||
+ if ! iscsiadm -m fw; then
|
||||
+ warn "iscsiadm: Could not get list of targets from firmware."
|
||||
return 1
|
||||
fi
|
||||
|
||||
- for p in $(getargs rd.iscsi.param -d iscsi_param); do
|
||||
- iscsi_param="$iscsi_param --param $p"
|
||||
- done
|
||||
-
|
||||
- if ! iscsistart -b $iscsi_param; then
|
||||
- warn "'iscsistart -b $iscsi_param' failed with return code $?"
|
||||
+ if ! iscsiadm -m fw -l; then
|
||||
+ warn "iscsiadm: Log-in to iscsi target failed"
|
||||
fi
|
||||
|
||||
echo 'started' > "/tmp/iscsistarted-iscsi:"
|
||||
@@ -77,7 +73,7 @@ handle_netroot()
|
||||
# override conf settings by command line options
|
||||
arg=$(getarg rd.iscsi.initiator -d iscsi_initiator=)
|
||||
[ -n "$arg" ] && iscsi_initiator=$arg
|
||||
- arg=$(getarg rd.iscsi.target.name -d iscsi_target_name=)
|
||||
+ arg=$(getargs rd.iscsi.target.name -d iscsi_target_name=)
|
||||
[ -n "$arg" ] && iscsi_target_name=$arg
|
||||
arg=$(getarg rd.iscsi.target.ip -d iscsi_target_ip)
|
||||
[ -n "$arg" ] && iscsi_target_ip=$arg
|
||||
@@ -94,7 +90,7 @@ handle_netroot()
|
||||
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"
|
||||
+ iscsi_param="$iscsi_param $p"
|
||||
done
|
||||
|
||||
parse_iscsi_root "$1" || return 1
|
||||
@@ -182,45 +178,37 @@ handle_netroot()
|
||||
echo "iscsi_lun=$iscsi_lun . /bin/mount-lun.sh " > $hookdir/mount/01-$$-iscsi.sh
|
||||
fi
|
||||
|
||||
- if [ -n "$DRACUT_SYSTEMD" ] && command -v systemd-run >/dev/null 2>&1; then
|
||||
- netroot_enc=$(systemd-escape "iscsistart_${1}")
|
||||
- status=$(systemctl is-active "$netroot_enc" 2>/dev/null)
|
||||
- is_active=$?
|
||||
- if [ $is_active -ne 0 ]; then
|
||||
- if [ "$status" != "activating" ] && ! systemctl is-failed "$netroot_enc" >/dev/null 2>&1; then
|
||||
- systemd-run --no-block --service-type=oneshot --remain-after-exit --quiet \
|
||||
- --description="Login iSCSI Target $iscsi_target_name" \
|
||||
- --unit="$netroot_enc" -- \
|
||||
- $(command -v iscsistart) \
|
||||
- -i "$iscsi_initiator" -t "$iscsi_target_name" \
|
||||
- -g "$iscsi_target_group" -a "$iscsi_target_ip" \
|
||||
- -p "$iscsi_target_port" \
|
||||
- ${iscsi_username:+-u "$iscsi_username"} \
|
||||
- ${iscsi_password:+-w "$iscsi_password"} \
|
||||
- ${iscsi_in_username:+-U "$iscsi_in_username"} \
|
||||
- ${iscsi_in_password:+-W "$iscsi_in_password"} \
|
||||
- ${iscsi_iface_name:+--param "iface.iscsi_ifacename=$iscsi_iface_name"} \
|
||||
- ${iscsi_netdev_name:+--param "iface.net_ifacename=$iscsi_netdev_name"} \
|
||||
- ${iscsi_param} >/dev/null 2>&1 \
|
||||
- && { > $hookdir/initqueue/work ; }
|
||||
+ ### ToDo: Upstream calls systemd-run - Shall we, do we have to port this?
|
||||
+
|
||||
+ if iscsiadm -m node; then
|
||||
+ targets=$(iscsiadm -m node | sed 's/^.*iqn/iqn/')
|
||||
+ else
|
||||
+ targets=$(iscsiadm -m discovery -t st -p $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} | sed 's/^.*iqn/iqn/')
|
||||
+ [ -z "$targets" ] && echo "Target discovery to $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} failed with status $?" && exit 1
|
||||
+ fi
|
||||
+
|
||||
+ for target in $iscsi_target_name; do
|
||||
+ if [[ "$targets" =~ "$target" ]]; then
|
||||
+ if [ -n "$iscsi_iface_name" ]; then
|
||||
+ $(iscsiadm -m iface -I $iscsi_iface_name --op=new)
|
||||
+ [ -n "$iscsi_initiator" ] && $(iscsiadm -m iface -I $iscsi_iface_name --op=update --name=iface.initiatorname --value=$iscsi_initiator)
|
||||
+ [ -n "$iscsi_netdev_name" ] && $(iscsiadm -m iface -I $iscsi_iface_name --op=update --name=iface.net_ifacename --value=$iscsi_netdev_name)
|
||||
+ COMMAND="iscsiadm -m node -T $target -p $iscsi_target_ip${iscsi_target_port:+:$iscsi_target_port} -I $iscsi_iface_name --op=update"
|
||||
else
|
||||
- systemctl --no-block restart "$netroot_enc" >/dev/null 2>&1 \
|
||||
- && { > $hookdir/initqueue/work ; }
|
||||
+ COMMAND="iscsiadm -m node -T $target -p $iscsi_target_ip${iscsi_target_port:+:$iscsi_target_port} --op=update"
|
||||
fi
|
||||
+ $($COMMAND --name=node.startup --value=onboot)
|
||||
+ [ -n "$iscsi_username" ] && $($COMMAND --name=node.session.auth.username --value=$iscsi_username)
|
||||
+ [ -n "$iscsi_password" ] && $($COMMAND --name=node.session.auth.password --value=$iscsi_password)
|
||||
+ [ -n "$iscsi_in_username" ] && $($COMMAND --name=node.session.auth.username_in --value=$iscsi_in_username)
|
||||
+ [ -n "$iscsi_in_password" ] && $($COMMAND --name=node.session.auth.password_in --value=$iscsi_in_password)
|
||||
+ [ -n "$iscsi_param" ] && $($COMMAND --name=${iscsi_param%=*} --value=${iscsi_param#*=}
|
||||
fi
|
||||
- else
|
||||
- iscsistart -i "$iscsi_initiator" -t "$iscsi_target_name" \
|
||||
- -g "$iscsi_target_group" -a "$iscsi_target_ip" \
|
||||
- -p "$iscsi_target_port" \
|
||||
- ${iscsi_username:+-u "$iscsi_username"} \
|
||||
- ${iscsi_password:+-w "$iscsi_password"} \
|
||||
- ${iscsi_in_username:+-U "$iscsi_in_username"} \
|
||||
- ${iscsi_in_password:+-W "$iscsi_in_password"} \
|
||||
- ${iscsi_iface_name:+--param "iface.iscsi_ifacename=$iscsi_iface_name"} \
|
||||
- ${iscsi_netdev_name:+--param "iface.net_ifacename=$iscsi_netdev_name"} \
|
||||
- ${iscsi_param} \
|
||||
- && { > $hookdir/initqueue/work ; }
|
||||
- fi
|
||||
+ done
|
||||
+
|
||||
+ iscsiadm -m node -L onboot || :
|
||||
+ > $hookdir/initqueue/work
|
||||
+
|
||||
netroot_enc=$(str_replace "$1" '/' '\2f')
|
||||
echo 'started' > "/tmp/iscsistarted-iscsi:${netroot_enc}"
|
||||
return 0
|
||||
Index: dracut-044/modules.d/95iscsi/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/95iscsi/module-setup.sh 2016-04-18 17:43:51.198589298 +0200
|
||||
+++ dracut-044/modules.d/95iscsi/module-setup.sh 2016-04-18 17:53:11.962323970 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
check() {
|
||||
local _rootdev
|
||||
# If our prerequisites are not met, fail anyways.
|
||||
- require_binaries iscsistart hostname iscsi-iname || return 1
|
||||
+ require_binaries hostname iscsi-iname iscsiadm iscsid || return 1
|
||||
|
||||
# If hostonly was requested, fail the check if we are not actually
|
||||
# booting from root.
|
||||
@@ -211,9 +211,22 @@ cmdline() {
|
||||
|
||||
# called by dracut
|
||||
install() {
|
||||
- inst_multiple umount iscsistart hostname iscsi-iname
|
||||
inst_multiple -o iscsiuio
|
||||
inst_libdir_file 'libgcc_s.so*'
|
||||
+ inst_multiple umount hostname iscsi-iname iscsiadm iscsid
|
||||
+
|
||||
+ ln -sf $systemdsystemunitdir/iscsid.socket $systemdsystemunitdir/sockets.target.wants/iscsid.socket
|
||||
+ ln -sf $systemdsystemunitdir/iscsiuio.socket $systemdsystemunitdir/sockets.target.wants/iscsiuio.socket
|
||||
+
|
||||
+ inst_multiple -o \
|
||||
+ $systemdsystemunitdir/iscsid.socket \
|
||||
+ $systemdsystemunitdir/iscsid.service \
|
||||
+ $systemdsystemunitdir/iscsiuio.service \
|
||||
+ $systemdsystemunitdir/iscsiuio.socket \
|
||||
+ $systemdsystemunitdir/sockets.target.wants/iscsid.socket \
|
||||
+ $systemdsystemunitdir/sockets.target.wants/iscsiuio.socket
|
||||
+
|
||||
+ [[ -d /etc/iscsi ]] && inst_dir $(/usr/bin/find /etc/iscsi)
|
||||
|
||||
# Detect iBFT and perform mandatory steps
|
||||
if [[ $hostonly_cmdline == "yes" ]] ; then
|
||||
@@ -221,6 +234,8 @@ install() {
|
||||
[[ $_iscsiconf ]] && printf "%s\n" "$_iscsiconf" >> "${initdir}/etc/cmdline.d/95iscsi.conf"
|
||||
fi
|
||||
|
||||
+ echo 'rd.neednet=1' >> "${initdir}/etc/cmdline.d/95iscsi.conf"
|
||||
+
|
||||
inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh"
|
||||
inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh"
|
||||
inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot"
|
40
0191-static_network_setup_return_zero.patch
Normal file
40
0191-static_network_setup_return_zero.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From: Thomas Blume <thomas.blume@suse.com>
|
||||
Subject: Unset gateway variable if emtpy
|
||||
|
||||
If the gateway variable is empty (ie '::' for IPv6 or '0.0.0.0' for IPv4)
|
||||
it should be unset.
|
||||
|
||||
References: bsc#919179
|
||||
|
||||
Signed-off-by: Thomas Blume <thomas.blume@suse.com>
|
||||
|
||||
Index: dracut-044/modules.d/40network/ifup.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/40network/ifup.sh 2016-04-11 17:41:48.628218989 +0200
|
||||
+++ dracut-044/modules.d/40network/ifup.sh 2016-04-11 17:43:45.250819391 +0200
|
||||
@@ -327,6 +327,7 @@ if strglobin $ip '*:*:*'; then
|
||||
# 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
|
||||
if ! arping -f -q -D -c 2 -I $netif $ip; then
|
||||
warn "Duplicate address detected for $ip for interface $netif."
|
||||
@@ -335,6 +336,7 @@ if strglobin $ip '*:*:*'; then
|
||||
# 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 replace default via $gw dev $netif > /tmp/net.$netif.gw
|
||||
@@ -352,6 +354,9 @@ if strglobin $ip '*:*:*'; then
|
||||
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
|
27
0192-iscsi_set_boot_protocol_from_ifcfg.patch
Normal file
27
0192-iscsi_set_boot_protocol_from_ifcfg.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From: Thomas Blume <thomas.blume@suse.com>
|
||||
Subject: set boot protocol for iscsi from ifcfg file
|
||||
|
||||
References: bsc#919179
|
||||
|
||||
Signed-off-by: Thomas Blume <thomas.blume@suse.com>
|
||||
|
||||
Index: dracut-044/modules.d/95iscsi/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/95iscsi/module-setup.sh 2016-04-14 14:12:39.693392427 +0200
|
||||
+++ dracut-044/modules.d/95iscsi/module-setup.sh 2016-04-14 14:53:00.630227712 +0200
|
||||
@@ -104,7 +104,14 @@ install_iscsiroot() {
|
||||
[ -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}
|
||||
+
|
||||
+ #follow ifcfg settings for boot protocol
|
||||
+ bootproto=$(sed -n "/BOOTPROTO/s/BOOTPROTO='\([[:alpha:]]*6\?\)4\?'/\1/p" /etc/sysconfig/network/ifcfg-$ifname)
|
||||
+ if [ $bootproto ]; then
|
||||
+ printf 'ip=%s:%s ' ${ifname} ${bootproto}
|
||||
+ else
|
||||
+ printf 'ip=%s:static ' ${ifname}
|
||||
+ fi
|
||||
|
||||
if [ -e /sys/class/net/$ifname/address ] ; then
|
||||
ifmac=$(cat /sys/class/net/$ifname/address)
|
66
0193-95iscsi-Set-number-of-login-retries.patch
Normal file
66
0193-95iscsi-Set-number-of-login-retries.patch
Normal file
@ -0,0 +1,66 @@
|
||||
From: Thomas Blume <thomas.blume@suse.com>
|
||||
Date: Mon, 19 Oct 2015 09:39:41 +0200
|
||||
Subject: Set number of login retries
|
||||
|
||||
Allow to set the number of login retries from the kernel commandline.
|
||||
|
||||
References: bsc#919179
|
||||
|
||||
Signed-off-by: Thomas Blume <thomas.blume@suse.com>
|
||||
---
|
||||
modules.d/95iscsi/iscsiroot.sh | 25 +++++++++++++++++++++----
|
||||
1 file changed, 21 insertions(+), 4 deletions(-)
|
||||
|
||||
Index: dracut-044/modules.d/95iscsi/iscsiroot.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/95iscsi/iscsiroot.sh 2016-04-14 14:52:44.685325362 +0200
|
||||
+++ dracut-044/modules.d/95iscsi/iscsiroot.sh 2016-04-14 14:57:07.628188324 +0200
|
||||
@@ -41,6 +41,14 @@ if [ -z "${DRACUT_SYSTEMD}" ] && [ -e /s
|
||||
> /tmp/iscsiuio-started
|
||||
fi
|
||||
|
||||
+#set value for initial login retry
|
||||
+set_login_retries() {
|
||||
+ local default retries
|
||||
+ default=2
|
||||
+ retries=$(getarg rd.iscsilogin.retries)
|
||||
+ return ${retries:-$default}
|
||||
+}
|
||||
+
|
||||
handle_firmware()
|
||||
{
|
||||
if ! iscsiadm -m fw; then
|
||||
@@ -67,7 +75,7 @@ handle_netroot()
|
||||
local iscsi_username iscsi_password
|
||||
local iscsi_in_username iscsi_in_password
|
||||
local iscsi_iface_name iscsi_netdev_name
|
||||
- local iscsi_param
|
||||
+ local iscsi_param param
|
||||
local p
|
||||
|
||||
# override conf settings by command line options
|
||||
@@ -100,6 +108,15 @@ handle_netroot()
|
||||
ip route get "$iscsi_target_ip" >/dev/null 2>&1 || return 0
|
||||
fi
|
||||
|
||||
+ #limit iscsistart login retries
|
||||
+ if [[ ! "$iscsi_param" =~ "node.session.initial_login_retry_max" ]]; then
|
||||
+ set_login_retries
|
||||
+ retries=$?
|
||||
+ if [ $retries -gt 0 ]; then
|
||||
+ iscsi_param="${iscsi_param% } node.session.initial_login_retry_max=$retries"
|
||||
+ fi
|
||||
+ fi
|
||||
+
|
||||
# XXX is this needed?
|
||||
getarg ro && iscsirw=ro
|
||||
getarg rw && iscsirw=rw
|
||||
@@ -202,7 +219,7 @@ handle_netroot()
|
||||
[ -n "$iscsi_password" ] && $($COMMAND --name=node.session.auth.password --value=$iscsi_password)
|
||||
[ -n "$iscsi_in_username" ] && $($COMMAND --name=node.session.auth.username_in --value=$iscsi_in_username)
|
||||
[ -n "$iscsi_in_password" ] && $($COMMAND --name=node.session.auth.password_in --value=$iscsi_in_password)
|
||||
- [ -n "$iscsi_param" ] && $($COMMAND --name=${iscsi_param%=*} --value=${iscsi_param#*=}
|
||||
+ [ -n "$iscsi_param" ] && for param in $iscsi_param; do $($COMMAND --name=${param%=*} --value=${param#*=}); done
|
||||
fi
|
||||
done
|
||||
|
43
0196-ibft-wait-for-session-on-all-paths.patch
Normal file
43
0196-ibft-wait-for-session-on-all-paths.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From 3944cdfd4d99c3d7cd8e801f786e75ed6d254e51 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Renninger <trenn@suse.com>
|
||||
Date: Tue, 23 Aug 2016 12:33:34 +0200
|
||||
Subject: 95iscsi: Wait for session on all paths
|
||||
|
||||
References: bsc#951003
|
||||
|
||||
Signed-off-by: Thomas Renninger <trenn@suse.com>
|
||||
---
|
||||
modules.d/95iscsi/iscsiroot.sh | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh
|
||||
index 4412188..6ef6276 100755
|
||||
--- a/modules.d/95iscsi/iscsiroot.sh
|
||||
+++ b/modules.d/95iscsi/iscsiroot.sh
|
||||
@@ -51,11 +51,23 @@ set_login_retries() {
|
||||
|
||||
handle_firmware()
|
||||
{
|
||||
+ local ifaces retry
|
||||
+
|
||||
if ! iscsiadm -m fw; then
|
||||
warn "iscsiadm: Could not get list of targets from firmware."
|
||||
return 1
|
||||
fi
|
||||
|
||||
+ ifaces=( $(echo /sys/firmware/ibft/ethernet*) )
|
||||
+ [ -f /tmp/session-retry ] || echo 1 > /tmp/session-retry
|
||||
+ retry=$(cat /tmp/session-retry)
|
||||
+
|
||||
+ if [ $retry -lt ${#ifaces[*]} ]; then
|
||||
+ let retry++
|
||||
+ echo $retry > /tmp/session-retry
|
||||
+ return 1
|
||||
+ fi
|
||||
+
|
||||
if ! iscsiadm -m fw -l; then
|
||||
warn "iscsiadm: Log-in to iscsi target failed"
|
||||
fi
|
||||
--
|
||||
2.6.6
|
||||
|
@ -0,0 +1,70 @@
|
||||
From 4287dca195e2435c7ab20265db6225f97b576fd3 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Mon, 19 Oct 2015 14:02:19 +0200
|
||||
Subject: 95iscsi: Do not require network for qla4xxx flash sessions
|
||||
|
||||
qla4xxx can store boot sessions in flash, which will then
|
||||
not show up with iBFT. These boot sesssions will be maintained
|
||||
by the driver; no specific network configuration is required
|
||||
here. So suppress network setup for these cases.
|
||||
|
||||
References: bsc#935320
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
modules.d/95iscsi/module-setup.sh | 18 +++++++++++++++---
|
||||
1 file changed, 15 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
|
||||
index 6dca212..797d4e1 100755
|
||||
--- a/modules.d/95iscsi/module-setup.sh
|
||||
+++ b/modules.d/95iscsi/module-setup.sh
|
||||
@@ -70,7 +70,7 @@ install_ibft() {
|
||||
|
||||
install_iscsiroot() {
|
||||
local devpath=$1
|
||||
- local scsi_path iscsi_lun session c d conn
|
||||
+ local scsi_path iscsi_lun session c d conn host flash
|
||||
local iscsi_session iscsi_address iscsi_port iscsi_targetname iscsi_tpgt
|
||||
|
||||
scsi_path=${devpath%%/block*}
|
||||
@@ -81,6 +81,19 @@ install_iscsiroot() {
|
||||
[ "$session" = "$devpath" ] && return 1
|
||||
iscsi_session=${session##*/}
|
||||
[ "$iscsi_session" = "$session" ] && return 1
|
||||
+ host=${session%%/session*}
|
||||
+ [ "$host" = "$session" ] && return 1
|
||||
+ iscsi_host=${host##*/}
|
||||
+
|
||||
+ for flash in ${host}/flashnode_sess-* ; do
|
||||
+ is_boot=$(cat $flash/is_boot_target)
|
||||
+ if [ $is_boot -eq 1 ] ; then
|
||||
+ # qla4xxx flashnode session; skip iBFT discovery
|
||||
+ iscsi_initiator=$(cat /sys/class/iscsi_host/${iscsi_host}/initiatorname)
|
||||
+ echo "rd.iscsi.initiator=${iscsi_initiator}"
|
||||
+ return;
|
||||
+ fi
|
||||
+ done
|
||||
|
||||
for d in ${session}/* ; do
|
||||
case $d in
|
||||
@@ -135,6 +148,7 @@ install_iscsiroot() {
|
||||
# can sort out rd.iscsi.initiator= duplicates
|
||||
echo "rd.iscsi.initiator=${iscsi_initiator}"
|
||||
echo "netroot=iscsi:${iscsi_address}::${iscsi_port}:${iscsi_lun}:${iscsi_targetname}"
|
||||
+ echo "rd.neednet=1"
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
@@ -241,8 +255,6 @@ install() {
|
||||
[[ $_iscsiconf ]] && printf "%s\n" "$_iscsiconf" >> "${initdir}/etc/cmdline.d/95iscsi.conf"
|
||||
fi
|
||||
|
||||
- echo 'rd.neednet=1' >> "${initdir}/etc/cmdline.d/95iscsi.conf"
|
||||
-
|
||||
inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh"
|
||||
inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh"
|
||||
inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot"
|
||||
--
|
||||
2.6.6
|
||||
|
@ -0,0 +1,82 @@
|
||||
From c56c855754914283bb930ef1a2b2dd5e8d5a6f25 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Tue, 20 Oct 2015 07:59:43 +0200
|
||||
Subject: 95iscsi: set 'rd.iscsi.firmware' for qla4xxx sessions
|
||||
|
||||
The qla4xxx driver can run with or without open-iscsi support,
|
||||
depending on the setting of the 'ql4xdisablesysfsboot' module
|
||||
parameter.
|
||||
When the parameter is set to '0', dracut needs to call
|
||||
'iscsiadm -m fw' to trigger iSCSI login, so we need to set
|
||||
the 'rd.iscsi.firmware' dracut variable. But this will then
|
||||
fail if the parameter is set to '1', as in these cases the
|
||||
list of firmware targets is empty.
|
||||
To cover both scenarios this patch reshuffles 'handle_firmware'
|
||||
in iscsiroot.sh to continue if iscsiadm -m fw fails but iscsi
|
||||
sessions are present.
|
||||
|
||||
References: bsc#951003
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
modules.d/95iscsi/iscsiroot.sh | 37 +++++++++++++++++++++----------------
|
||||
1 file changed, 21 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh
|
||||
index 6ef6276..77755fb 100755
|
||||
--- a/modules.d/95iscsi/iscsiroot.sh
|
||||
+++ b/modules.d/95iscsi/iscsiroot.sh
|
||||
@@ -53,29 +53,34 @@ handle_firmware()
|
||||
{
|
||||
local ifaces retry
|
||||
|
||||
+ # Depending on the 'ql4xdisablesysfsboot' qla4xxx
|
||||
+ # will be autostarting sessions without presenting
|
||||
+ # them via the firmware interface.
|
||||
+ # In these cases 'iscsiadm -m fw' will fail, but
|
||||
+ # the iSCSI sessions will still be present.
|
||||
if ! iscsiadm -m fw; then
|
||||
warn "iscsiadm: Could not get list of targets from firmware."
|
||||
- return 1
|
||||
- fi
|
||||
-
|
||||
- ifaces=( $(echo /sys/firmware/ibft/ethernet*) )
|
||||
- [ -f /tmp/session-retry ] || echo 1 > /tmp/session-retry
|
||||
- retry=$(cat /tmp/session-retry)
|
||||
-
|
||||
- if [ $retry -lt ${#ifaces[*]} ]; then
|
||||
- let retry++
|
||||
- echo $retry > /tmp/session-retry
|
||||
- return 1
|
||||
- fi
|
||||
+ else
|
||||
+ ifaces=( $(echo /sys/firmware/ibft/ethernet*) )
|
||||
+ [ -f /tmp/session-retry ] || echo 1 > /tmp/session-retry
|
||||
+ retry=$(cat /tmp/session-retry)
|
||||
+
|
||||
+ if [ $retry -lt ${#ifaces[*]} ]; then
|
||||
+ let retry++
|
||||
+ echo $retry > /tmp/session-retry
|
||||
+ return 1
|
||||
+ fi
|
||||
|
||||
- if ! iscsiadm -m fw -l; then
|
||||
- warn "iscsiadm: Log-in to iscsi target failed"
|
||||
+ if ! iscsiadm -m fw -l; then
|
||||
+ warn "iscsiadm: Log-in to iscsi target failed"
|
||||
+ else
|
||||
+ need_shutdown
|
||||
+ fi
|
||||
fi
|
||||
-
|
||||
+ [ -d /sys/class/iscsi_session ] || return 1
|
||||
echo 'started' > "/tmp/iscsistarted-iscsi:"
|
||||
echo 'started' > "/tmp/iscsistarted-firmware"
|
||||
|
||||
- need_shutdown
|
||||
return 0
|
||||
}
|
||||
|
||||
--
|
||||
2.6.6
|
||||
|
55
0199-rd-iscsi-waitnet-default-false.patch
Normal file
55
0199-rd-iscsi-waitnet-default-false.patch
Normal file
@ -0,0 +1,55 @@
|
||||
From fbd1ae50f37d4d904dc69844de869ff2daf02ded Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Tue, 27 Sep 2016 12:38:21 +0200
|
||||
Subject: 95iscsi: wait for network devices when starting iscsi
|
||||
|
||||
rd.iscsi.waitnet should default to false in order for dracut to
|
||||
wait for any network devices to come up.
|
||||
|
||||
References: bsc#997598
|
||||
|
||||
Signed-off-by: Thomas Blume <thomas.blume@suse.com>
|
||||
---
|
||||
modules.d/95iscsi/iscsiroot.sh | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh
|
||||
index 77755fb..6f0a15d 100755
|
||||
--- a/modules.d/95iscsi/iscsiroot.sh
|
||||
+++ b/modules.d/95iscsi/iscsiroot.sh
|
||||
@@ -62,13 +62,14 @@ handle_firmware()
|
||||
warn "iscsiadm: Could not get list of targets from firmware."
|
||||
else
|
||||
ifaces=( $(echo /sys/firmware/ibft/ethernet*) )
|
||||
- [ -f /tmp/session-retry ] || echo 1 > /tmp/session-retry
|
||||
retry=$(cat /tmp/session-retry)
|
||||
|
||||
if [ $retry -lt ${#ifaces[*]} ]; then
|
||||
let retry++
|
||||
echo $retry > /tmp/session-retry
|
||||
return 1
|
||||
+ else
|
||||
+ rm /tmp/session-retry
|
||||
fi
|
||||
|
||||
if ! iscsiadm -m fw -l; then
|
||||
@@ -250,7 +251,7 @@ handle_netroot()
|
||||
|
||||
ret=0
|
||||
|
||||
-if [ "$netif" != "timeout" ] && getargbool 1 rd.iscsi.waitnet; then
|
||||
+if [ "$netif" != "timeout" ] && getargbool 0 rd.iscsi.waitnet; then
|
||||
all_ifaces_setup || exit 0
|
||||
fi
|
||||
|
||||
@@ -264,6 +265,7 @@ fi
|
||||
|
||||
if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then
|
||||
if [ "$netif" = "timeout" ] || [ "$netif" = "online" ]; then
|
||||
+ [ -f /tmp/session-retry ] || echo 1 > /tmp/session-retry
|
||||
handle_firmware
|
||||
ret=$?
|
||||
fi
|
||||
--
|
||||
2.6.6
|
||||
|
38
0200-dracut_fix_multipath_without_config.patch
Normal file
38
0200-dracut_fix_multipath_without_config.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From 796000a6afd2fa20dc40eae053ee71480b16b49c Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Tue, 27 Sep 2016 12:40:22 +0200
|
||||
Subject: 90multipath: do not fail startup on missing configuration
|
||||
|
||||
References: bsc#930019
|
||||
|
||||
If rootfs is on multipath, but platform does not have an /etc/multipath.conf
|
||||
file which is not urgently needed, they system will not boot, due to:
|
||||
|
||||
multipathd is not started and rootfs and swap are not found:
|
||||
systemctl status multipathd.service
|
||||
* multipathd.service - Device-Mapper Multipath Device Controller
|
||||
Loaded: loaded (/usr/lib/systemd/system/multipathd.service; disabled; vendor preset: enabled)
|
||||
Active: inactive (dead)
|
||||
Condition: start condition failed at Thu 2015-05-07 11:49:11 CEST; 7min ago
|
||||
ConditionPathExists=/etc/multipath.conf was not met
|
||||
|
||||
and exit to dracut shell.
|
||||
---
|
||||
modules.d/90multipath/multipathd.service | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/90multipath/multipathd.service b/modules.d/90multipath/multipathd.service
|
||||
index b64b02c..f7bc65f 100644
|
||||
--- a/modules.d/90multipath/multipathd.service
|
||||
+++ b/modules.d/90multipath/multipathd.service
|
||||
@@ -6,7 +6,6 @@ Conflicts=shutdown.target
|
||||
ConditionKernelCommandLine=!nompath
|
||||
ConditionKernelCommandLine=!rd.multipath=0
|
||||
ConditionKernelCommandLine=!rd_NO_MULTIPATH
|
||||
-ConditionPathExists=/etc/multipath.conf
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
--
|
||||
2.6.6
|
||||
|
29
0201-fix_nfs_with_ip_instead_of_hostname.patch
Normal file
29
0201-fix_nfs_with_ip_instead_of_hostname.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From 7b4b832aded41e25cebbb8807b8e60bf58fd122e Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Renninger <trenn@suse.com>
|
||||
Date: Wed, 4 May 2016 13:33:43 +0200
|
||||
Subject: 95nfs: Fix mount if IPv4 address is used in /etc/fstab
|
||||
|
||||
Signed-off-by: Thomas Renninger <trenn@suse.com>
|
||||
---
|
||||
modules.d/95nfs/module-setup.sh | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh
|
||||
index dc97aba..6644c07 100755
|
||||
--- a/modules.d/95nfs/module-setup.sh
|
||||
+++ b/modules.d/95nfs/module-setup.sh
|
||||
@@ -51,9 +51,9 @@ cmdline() {
|
||||
|
||||
### 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')
|
||||
--
|
||||
2.6.6
|
||||
|
36
0202-dracut_dmraid_use_udev.patch
Normal file
36
0202-dracut_dmraid_use_udev.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From: Hannes Reinecke <hare@suse.com>
|
||||
|
||||
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-044/modules.d/90dmraid/dmraid.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/90dmraid/dmraid.sh
|
||||
+++ dracut-044/modules.d/90dmraid/dmraid.sh
|
||||
@@ -33,8 +33,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-044/modules.d/90dmraid/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/90dmraid/module-setup.sh
|
||||
+++ dracut-044/modules.d/90dmraid/module-setup.sh
|
||||
@@ -74,6 +74,8 @@ install() {
|
||||
|
||||
inst "$moddir/dmraid.sh" /sbin/dmraid_scan
|
||||
|
||||
+ inst_rules 66-kpartx.rules 67-kpartx-compat.rules
|
||||
+
|
||||
inst_libdir_file "libdmraid-events*.so*"
|
||||
|
||||
inst_rules "$moddir/61-dmraid-imsm.rules"
|
28
0203-no-fail-builtin-module.patch
Normal file
28
0203-no-fail-builtin-module.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From a7996e5e33c0456c96764dfb1ab35c0a59134ccc Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fvogt@suse.com>
|
||||
Date: Tue, 3 Nov 2015 16:29:21 +0100
|
||||
Subject: [PATCH] Don't let inst1mod fail if module is built-in
|
||||
|
||||
- Fixes bsc#935563
|
||||
|
||||
Signed-off-by: Fabian Vogt <fvogt@suse.com>
|
||||
---
|
||||
dracut-init.sh | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
Index: dracut-044/dracut-init.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/dracut-init.sh 2016-04-14 14:12:39.421377052 +0200
|
||||
+++ dracut-044/dracut-init.sh 2016-04-14 14:58:46.285764636 +0200
|
||||
@@ -1129,6 +1129,11 @@ instmods() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
+ if grep -q "/${_mod}.ko" /lib/modules/$kernel/modules.builtin; then
|
||||
+ # Module is built-in
|
||||
+ return 0
|
||||
+ fi
|
||||
+
|
||||
# If we are building a host-specific initramfs and this
|
||||
# module is not already loaded, move on to the next one.
|
||||
[[ $hostonly ]] \
|
25
0204-mkinitrd-fix-monster.patch
Normal file
25
0204-mkinitrd-fix-monster.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From: Fabian Vogt <fvogt@suse.com>
|
||||
Subject: Implement functionality of -A option
|
||||
References: boo#935993
|
||||
|
||||
- Without this patch, -A sets host_only=0,
|
||||
but host_only wasn't used
|
||||
- Translates into --no-host-only now
|
||||
|
||||
---
|
||||
mkinitrd-suse.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: dracut-043/mkinitrd-suse.sh
|
||||
===================================================================
|
||||
--- dracut-043.orig/mkinitrd-suse.sh
|
||||
+++ dracut-043/mkinitrd-suse.sh
|
||||
@@ -263,7 +263,7 @@ while (($# > 0)); do
|
||||
;;
|
||||
-M) read_arg map_file "$@" || shift $?
|
||||
;;
|
||||
- -A) host_only=0;;
|
||||
+ -A) dracut_args="${dracut_args} --no-host-only";;
|
||||
-B) skip_update_bootloader=1;;
|
||||
-v|--verbose) dracut_args="${dracut_args} -v";;
|
||||
-L) logfile=;;
|
24
0205-mdraid_ignore_hostonly.patch
Normal file
24
0205-mdraid_ignore_hostonly.patch
Normal file
@ -0,0 +1,24 @@
|
||||
From: Fabian Vogt <fvogt@suse.com>
|
||||
Subject: [PATCH] Always install mdraid modules
|
||||
References: boo#935993
|
||||
|
||||
- Even if not currently loaded
|
||||
- hostonly logic seems to be broken
|
||||
|
||||
---
|
||||
modules.d/90mdraid/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: dracut-043/modules.d/90mdraid/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-043.orig/modules.d/90mdraid/module-setup.sh
|
||||
+++ dracut-043/modules.d/90mdraid/module-setup.sh
|
||||
@@ -33,7 +33,7 @@ depends() {
|
||||
|
||||
# called by dracut
|
||||
installkernel() {
|
||||
- instmods =drivers/md
|
||||
+ hostonly='' instmods =drivers/md
|
||||
}
|
||||
|
||||
# called by dracut
|
27
0206-nfs_dns_alias.patch
Normal file
27
0206-nfs_dns_alias.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From: Fabian Vogt <fvogt@suse.com>
|
||||
Subject: NFS: Support host being a DNS ALIAS
|
||||
|
||||
The "host" command may also print something else than
|
||||
"asdf.local.lan has address 1.2.3.4", like:
|
||||
"rootserver.local.net is an alias for rainbow.local.net.".
|
||||
So "head -n1" is not enough.
|
||||
|
||||
Fixes boo#955592
|
||||
|
||||
---
|
||||
modules.d/95nfs/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: dracut-043/modules.d/95nfs/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-043.orig/modules.d/95nfs/module-setup.sh
|
||||
+++ dracut-043/modules.d/95nfs/module-setup.sh
|
||||
@@ -53,7 +53,7 @@ cmdline() {
|
||||
if [[ $nfs_device = [0-9]*\.[0-9]*\.[0-9]*.[0-9]* ]] || [[ $nfs_device = \[.*\] ]]; then
|
||||
nfs_address="${nfs_device%%:*}"
|
||||
else
|
||||
- lookup=$(host "${nfs_device%%:*}"| head -n1)
|
||||
+ lookup=$(host "${nfs_device%%:*}"| grep " address " | head -n1)
|
||||
nfs_address=${lookup##* }
|
||||
fi
|
||||
ifname=$(ip -o route get to $nfs_address | sed -n 's/.*dev \([^ ]*\).*/\1/p')
|
44
0207-handle_module_aliases.patch
Normal file
44
0207-handle_module_aliases.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From: Fabian Vogt <fvogt@suse.com>
|
||||
Date: Thu, 21 Jan 2016 12:38:05 +0100
|
||||
Subject: [PATCH] Correctly handle module aliases
|
||||
|
||||
Handle module aliases correctly to not generate unbootable
|
||||
initrds with different kernel versions. Fix for boo#962694
|
||||
See the diff for a detailed explanation.
|
||||
|
||||
---
|
||||
dracut.sh | 20 ++++++++++++++++++++
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
Index: dracut-044/dracut.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/dracut.sh
|
||||
+++ dracut-044/dracut.sh
|
||||
@@ -1214,6 +1214,27 @@ if [[ $hostonly ]]; then
|
||||
while read m rest || [ -n "$m" ]; do
|
||||
host_modules["$m"]=1
|
||||
done </proc/modules
|
||||
+
|
||||
+ # Explanation of the following section:
|
||||
+ # Since kernel 4.4, mpt3sas is a complete replacement for mpt2sas.
|
||||
+ # mpt3sas has an alias to mpt2sas now, but since mpt3sas isn't loaded
|
||||
+ # when generating the initrd from kernel < 4.4, it's not included.
|
||||
+ # The other direction has the same issue:
|
||||
+ # When generating the initrd from kernel >= 4.4, mpt2sas isn't loaded,
|
||||
+ # so it's not included.
|
||||
+ # Both ways result in an unbootable initrd.
|
||||
+
|
||||
+ # also add aliases of loaded modules
|
||||
+ for mod in "${!host_modules[@]}"; do
|
||||
+ aliases=$(modinfo -F alias "$mod" 2>&1)
|
||||
+ for alias in $aliases; do
|
||||
+ host_modules["$alias"]=1
|
||||
+ done
|
||||
+ # mod might be an alias in the target kernel, find the real module
|
||||
+ mod_filename=$(modinfo -k "$kernel" "$mod" -F filename)
|
||||
+ [ $? -ne 0 ] && continue
|
||||
+ host_modules["$(basename -s .ko "$mod_filename")"]=1
|
||||
+ done
|
||||
fi
|
||||
|
||||
unset m
|
87
0208-no_forced_virtnet.patch
Normal file
87
0208-no_forced_virtnet.patch
Normal file
@ -0,0 +1,87 @@
|
||||
From: Fabian Vogt <fvogt@suse.com>
|
||||
Subject: Don't include qemu network modules without reason
|
||||
|
||||
virtio-net without other network tools does not make sense
|
||||
and causes various bugs, like bsc#960669.
|
||||
This patch merges 90qemu-net into 90-kernel-network-modules.
|
||||
|
||||
---
|
||||
modules.d/90kernel-network-modules/module-setup.sh | 24 ++++++++++++++++++++-
|
||||
modules.d/90qemu-net/module-setup.sh | 1
|
||||
2 files changed, 24 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: dracut-044/modules.d/90kernel-network-modules/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/90kernel-network-modules/module-setup.sh
|
||||
+++ dracut-044/modules.d/90kernel-network-modules/module-setup.sh
|
||||
@@ -10,6 +10,25 @@ depends() {
|
||||
return 0
|
||||
}
|
||||
|
||||
+running_in_qemu() {
|
||||
+ if type -P systemd-detect-virt >/dev/null 2>&1; then
|
||||
+ vm=$(systemd-detect-virt --vm 2>&1)
|
||||
+ (($? != 0)) && return 255
|
||||
+ [[ $vm = "qemu" ]] && return 0
|
||||
+ [[ $vm = "kvm" ]] && return 0
|
||||
+ [[ $vm = "bochs" ]] && return 0
|
||||
+ fi
|
||||
+
|
||||
+ for i in /sys/class/dmi/id/*_vendor; do
|
||||
+ [[ -f $i ]] || continue
|
||||
+ read vendor < $i
|
||||
+ [[ "$vendor" == "QEMU" ]] && return 0
|
||||
+ [[ "$vendor" == "Bochs" ]] && return 0
|
||||
+ done
|
||||
+
|
||||
+ return 255
|
||||
+}
|
||||
+
|
||||
# called by dracut
|
||||
installkernel() {
|
||||
# Include wired net drivers, excluding wireless
|
||||
@@ -63,6 +82,12 @@ installkernel() {
|
||||
=drivers/net/ethernet \
|
||||
ecb arc4 bridge stp llc ipv6 bonding 8021q af_packet virtio_net xennet
|
||||
hostonly="" instmods iscsi_ibft crc32c iscsi_boot_sysfs
|
||||
+
|
||||
+ if running_in_qemu; then
|
||||
+ hostonly='' instmods virtio_net e1000 8139cp pcnet32 e100 ne2k_pci
|
||||
+ else
|
||||
+ return 0
|
||||
+ fi
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
Index: dracut-044/modules.d/90qemu-net/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/90qemu-net/module-setup.sh
|
||||
+++ /dev/null
|
||||
@@ -1,27 +0,0 @@
|
||||
-#!/bin/bash
|
||||
-
|
||||
-# called by dracut
|
||||
-check() {
|
||||
- if type -P systemd-detect-virt >/dev/null 2>&1; then
|
||||
- vm=$(systemd-detect-virt --vm >/dev/null 2>&1)
|
||||
- (($? != 0)) && return 255
|
||||
- [[ $vm = "qemu" ]] && return 0
|
||||
- [[ $vm = "kvm" ]] && return 0
|
||||
- [[ $vm = "bochs" ]] && return 0
|
||||
- fi
|
||||
-
|
||||
- for i in /sys/class/dmi/id/*_vendor; do
|
||||
- [[ -f $i ]] || continue
|
||||
- read vendor < $i
|
||||
- [[ "$vendor" == "QEMU" ]] && return 0
|
||||
- [[ "$vendor" == "Bochs" ]] && return 0
|
||||
- done
|
||||
-
|
||||
- return 255
|
||||
-}
|
||||
-
|
||||
-# called by dracut
|
||||
-installkernel() {
|
||||
- # qemu specific modules
|
||||
- hostonly='' instmods virtio_net e1000 8139cp pcnet32 e100 ne2k_pci
|
||||
-}
|
34
0209-fix_modules_load_d_hostonly.patch
Normal file
34
0209-fix_modules_load_d_hostonly.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From: Fabian Vogt <fvogt@suse.com>
|
||||
Subject: Fix loading of modules in modules-load.d
|
||||
|
||||
With hostonly enabled, only modules that are currently
|
||||
loaded are included in the initrd. Modules which are
|
||||
explicitly listed in modules-load.d do not need to
|
||||
be filtered that way. Fix for boo#962224.
|
||||
|
||||
---
|
||||
modules.d/00systemd/module-setup.sh | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: dracut-044/modules.d/00systemd/module-setup.sh
|
||||
===================================================================
|
||||
--- dracut-044.orig/modules.d/00systemd/module-setup.sh
|
||||
+++ dracut-044/modules.d/00systemd/module-setup.sh
|
||||
@@ -154,7 +154,7 @@ install() {
|
||||
}
|
||||
|
||||
_mods=$(modules_load_get /usr/lib/modules-load.d)
|
||||
- [[ $_mods ]] && instmods $_mods
|
||||
+ [[ $_mods ]] && hostonly='' instmods $_mods
|
||||
|
||||
if [[ $hostonly ]]; then
|
||||
inst_multiple -H -o \
|
||||
@@ -169,7 +169,7 @@ install() {
|
||||
/etc/sysctl.conf
|
||||
|
||||
_mods=$(modules_load_get /etc/modules-load.d)
|
||||
- [[ $_mods ]] && instmods $_mods
|
||||
+ [[ $_mods ]] && hostonly='' instmods $_mods
|
||||
fi
|
||||
|
||||
if ! [[ -e "$initdir/etc/machine-id" ]]; then
|
34
0210-add_fcoe_uefi_check.patch
Normal file
34
0210-add_fcoe_uefi_check.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From c5fd4748ecff45dfaf707af30b649153ae88ea20 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fvogt@suse.com>
|
||||
Date: Tue, 27 Sep 2016 12:41:17 +0200
|
||||
Subject: fcoe-uefi: Add check for usage
|
||||
|
||||
References: boo#965477
|
||||
|
||||
fcoe-uefi gets included by default on EFI systems,
|
||||
as it does not do the same check that fcoe does,
|
||||
therefore needlessly pulling in network modules.
|
||||
This patch copies the check from fcoe to fcoe-uefi.
|
||||
---
|
||||
modules.d/95fcoe-uefi/module-setup.sh | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/modules.d/95fcoe-uefi/module-setup.sh b/modules.d/95fcoe-uefi/module-setup.sh
|
||||
index 5d8477c..66af804 100755
|
||||
--- a/modules.d/95fcoe-uefi/module-setup.sh
|
||||
+++ b/modules.d/95fcoe-uefi/module-setup.sh
|
||||
@@ -4,6 +4,11 @@
|
||||
check() {
|
||||
[[ $hostonly ]] || [[ $mount_needs ]] && {
|
||||
[ -d /sys/firmware/efi ] || return 255
|
||||
+ for c in /sys/bus/fcoe/devices/ctlr_* ; do
|
||||
+ [ -L $c ] || continue
|
||||
+ fcoe_ctlr=$c
|
||||
+ done
|
||||
+ [ -z "$fcoe_ctlr" ] && return 255
|
||||
}
|
||||
require_binaries dcbtool fipvlan lldpad ip readlink || return 1
|
||||
return 0
|
||||
--
|
||||
2.6.6
|
||||
|
58
0212-fcoe_reorder_init_path.patch
Normal file
58
0212-fcoe_reorder_init_path.patch
Normal file
@ -0,0 +1,58 @@
|
||||
From 77b3a15c6673dfce2dbd76cceffb7d5d4819c694 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Thumshirn <jthumshirn@suse.com>
|
||||
Date: Tue, 27 Sep 2016 12:41:22 +0200
|
||||
Subject: 95fcoe: Reorder initialisation for bnx2x
|
||||
|
||||
References: bsc#982588
|
||||
|
||||
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.com>
|
||||
---
|
||||
modules.d/95fcoe/fcoe-up.sh | 22 ++++++++++++----------
|
||||
1 file changed, 12 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh
|
||||
index fb3b4c4..a525ade 100755
|
||||
--- a/modules.d/95fcoe/fcoe-up.sh
|
||||
+++ b/modules.d/95fcoe/fcoe-up.sh
|
||||
@@ -45,7 +45,16 @@ write_fcoemon_cfg() {
|
||||
echo MODE=\"fabric\" >> /etc/fcoe/cfg-$netif
|
||||
}
|
||||
|
||||
-if [ "$dcb" = "dcb" ]; then
|
||||
+if [ "$netdriver" = "bnx2x" ]; then
|
||||
+ # If driver is bnx2x, do not use /sys/module/fcoe/parameters/create but fipvlan
|
||||
+ modprobe 8021q
|
||||
+ udevadm settle --timeout=30
|
||||
+ # Sleep for 3 s to allow dcb negotiation
|
||||
+ sleep 3
|
||||
+ write_fcoemon_cfg
|
||||
+ fcoemon --syslog=yes
|
||||
+ fipvlan -c -s "$netif"
|
||||
+elif [ "$dcb" = "dcb" ]; then
|
||||
# wait for lldpad to be ready
|
||||
i=0
|
||||
while [ $i -lt 60 ]; do
|
||||
@@ -79,18 +88,11 @@ if [ "$dcb" = "dcb" ]; then
|
||||
sleep 1
|
||||
|
||||
write_fcoemon_cfg
|
||||
- fcoemon --syslog
|
||||
-elif [ "$netdriver" = "bnx2x" ]; then
|
||||
- # If driver is bnx2x, do not use /sys/module/fcoe/parameters/create but fipvlan
|
||||
- modprobe 8021q
|
||||
- udevadm settle --timeout=30
|
||||
- # Sleep for 3 s to allow dcb negotiation
|
||||
- sleep 3
|
||||
- fipvlan "$netif" -c -s
|
||||
+ fcoemon --syslog=yes
|
||||
else
|
||||
vlan="no"
|
||||
write_fcoemon_cfg
|
||||
- fcoemon --syslog
|
||||
+ fcoemon --syslog=yes
|
||||
fi
|
||||
|
||||
need_shutdown
|
||||
--
|
||||
2.6.6
|
||||
|
30
0213-Fix-wrong-keymap-inclusion.patch
Normal file
30
0213-Fix-wrong-keymap-inclusion.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From 234283235ba52a50b84b396b85ff8cf6e16d80a0 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fvogt@suse.com>
|
||||
Date: Fri, 26 Aug 2016 09:44:05 +0200
|
||||
Subject: [PATCH] Fix wrong keymap inclusion
|
||||
|
||||
For MAP=lt, dracut would choose lt.std.map instead of lt.map.
|
||||
|
||||
References: bsc#942896
|
||||
---
|
||||
modules.d/10i18n/module-setup.sh | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh
|
||||
index 4fd0b26..e5bf5eb 100755
|
||||
--- a/modules.d/10i18n/module-setup.sh
|
||||
+++ b/modules.d/10i18n/module-setup.sh
|
||||
@@ -30,8 +30,9 @@ install() {
|
||||
# This is from 10redhat-i18n.
|
||||
findkeymap () {
|
||||
local MAP=$1
|
||||
+ local MAPNAME=${1%.map*}
|
||||
[[ ! -f $MAP ]] && \
|
||||
- MAP=$(find ${kbddir}/keymaps -type f -name $MAP -o -name $MAP.\* | head -n1)
|
||||
+ MAP=$(find ${kbddir}/keymaps -type f -name ${MAPNAME} -o -name ${MAPNAME}.map -o -name ${MAPNAME}.map.\* | head -n1)
|
||||
[[ " $KEYMAPS " = *" $MAP "* ]] && return
|
||||
KEYMAPS="$KEYMAPS $MAP"
|
||||
case $MAP in
|
||||
--
|
||||
2.6.6
|
||||
|
45
0214-95fcoe-Do-not-overwrite-FCoE-configuration.patch
Normal file
45
0214-95fcoe-Do-not-overwrite-FCoE-configuration.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From 581b48e2e171f1afb01b89a9a4089400d9b20829 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Tue, 16 Aug 2016 13:26:07 +0200
|
||||
Subject: [PATCH] 95fcoe: Do not overwrite FCoE configuration
|
||||
|
||||
If the installation already has a FCoE configuration we should
|
||||
not attempt to overwrite it but rather use the pre-defined
|
||||
configuration.
|
||||
|
||||
References: bsc#993861
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.com>
|
||||
---
|
||||
modules.d/95fcoe/fcoe-up.sh | 1 +
|
||||
modules.d/95fcoe/module-setup.sh | 2 ++
|
||||
2 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh
|
||||
index a525ade..662b21a 100755
|
||||
--- a/modules.d/95fcoe/fcoe-up.sh
|
||||
+++ b/modules.d/95fcoe/fcoe-up.sh
|
||||
@@ -31,6 +31,7 @@ netdriver=$(readlink -f /sys/class/net/$netif/device/driver)
|
||||
netdriver=${netdriver##*/}
|
||||
|
||||
write_fcoemon_cfg() {
|
||||
+ [ -f /etc/fcoe/cfg-$netif ] && return
|
||||
echo FCOE_ENABLE=\"yes\" > /etc/fcoe/cfg-$netif
|
||||
if [ "$dcb" = "dcb" ]; then
|
||||
echo DCB_REQUIRED=\"yes\" >> /etc/fcoe/cfg-$netif
|
||||
diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh
|
||||
index 059bfde..a78516d 100755
|
||||
--- a/modules.d/95fcoe/module-setup.sh
|
||||
+++ b/modules.d/95fcoe/module-setup.sh
|
||||
@@ -77,6 +77,8 @@ install() {
|
||||
local _fcoeconf=$(cmdline)
|
||||
[[ $_fcoeconf ]] && printf "%s\n" "$_fcoeconf" >> "${initdir}/etc/cmdline.d/95fcoe.conf"
|
||||
fi
|
||||
+ inst_multiple /etc/fcoe/cfg-*
|
||||
+
|
||||
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"
|
||||
--
|
||||
2.6.6
|
||||
|
35
0215-95fcoe-Do-not-complain-about-missing-etc-hba.conf.patch
Normal file
35
0215-95fcoe-Do-not-complain-about-missing-etc-hba.conf.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From 46736da0be28e579b53ac3c0dd982f3765d48f4a Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Tue, 23 Aug 2016 14:09:12 +0200
|
||||
Subject: [PATCH] 95fcoe: Do not complain about missing /etc/hba.conf
|
||||
|
||||
The file '/etc/hba.conf' got dropped by an updated fcoe-utils
|
||||
package, so do not complain if it doesn't exist.
|
||||
|
||||
References: bsc#980539
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.com>
|
||||
---
|
||||
modules.d/95fcoe/module-setup.sh | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh
|
||||
index a78516d..d08e917 100755
|
||||
--- a/modules.d/95fcoe/module-setup.sh
|
||||
+++ b/modules.d/95fcoe/module-setup.sh
|
||||
@@ -67,8 +67,10 @@ cmdline() {
|
||||
# called by dracut
|
||||
install() {
|
||||
inst_multiple ip dcbtool fipvlan lldpad readlink lldptool fcoemon fcoeadm
|
||||
- inst_libdir_file 'libhbalinux.so*'
|
||||
- inst "/etc/hba.conf" "/etc/hba.conf"
|
||||
+ if [ -f "/etc/hba.conf" ] ; then
|
||||
+ inst_libdir_file 'libhbalinux.so*'
|
||||
+ inst "/etc/hba.conf" "/etc/hba.conf"
|
||||
+ fi
|
||||
|
||||
mkdir -m 0755 -p "$initdir/var/lib/lldpad"
|
||||
mkdir -m 0755 -p "$initdir/etc/fcoe"
|
||||
--
|
||||
2.6.6
|
||||
|
35
0216-95fcoe-silence-lldpad-warnings.patch
Normal file
35
0216-95fcoe-silence-lldpad-warnings.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From 4d9ec023b6c4a20cc7ffc6ea4ccf86b008a3cbcf Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Tue, 23 Aug 2016 14:35:04 +0200
|
||||
Subject: [PATCH] 95fcoe: silence lldpad warnings
|
||||
|
||||
When lldpad is not running, any calls to 'dcbtool' will be printing
|
||||
out a warning. As it perfectly legit to have FCoE running without
|
||||
DCB we should not be printing out the error.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.com>
|
||||
---
|
||||
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 d08e917..18c00b3 100755
|
||||
--- a/modules.d/95fcoe/module-setup.sh
|
||||
+++ b/modules.d/95fcoe/module-setup.sh
|
||||
@@ -48,11 +48,11 @@ cmdline() {
|
||||
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')
|
||||
+ s=$(dcbtool gc ${i##*/} dcb 2>/dev/null | 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')
|
||||
+ s=$(dcbtool gc ${p} dcb 2>/dev/null | sed -n 's/^DCB State:\t*\(.*\)/\1/p')
|
||||
fi
|
||||
fi
|
||||
if [ "$s" = "on" ] ; then
|
||||
--
|
||||
2.6.6
|
||||
|
169
0217-95fcoe-Allow-to-specify-the-FCoE-mode-via-the-fcoe-p.patch
Normal file
169
0217-95fcoe-Allow-to-specify-the-FCoE-mode-via-the-fcoe-p.patch
Normal file
@ -0,0 +1,169 @@
|
||||
From 77a524b3659529b14abfdb574094b92216b59af5 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Wed, 24 Aug 2016 08:32:04 +0200
|
||||
Subject: [PATCH] 95fcoe: Allow to specify the FCoE mode via the fcoe=
|
||||
parameter
|
||||
|
||||
FCoE can run in Fabric (ie FCF) or VN2VN mode, so we should allowing
|
||||
to set this parameter from the commandline, too.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.com>
|
||||
---
|
||||
dracut.cmdline.7.asc | 8 +++++---
|
||||
modules.d/95fcoe/fcoe-genrules.sh | 4 ++--
|
||||
modules.d/95fcoe/fcoe-up.sh | 9 +++++++--
|
||||
modules.d/95fcoe/module-setup.sh | 8 +++++++-
|
||||
modules.d/95fcoe/parse-fcoe.sh | 22 ++++++++++++++++++----
|
||||
5 files changed, 39 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
|
||||
index 7368aa1..b885946 100644
|
||||
--- a/dracut.cmdline.7.asc
|
||||
+++ b/dracut.cmdline.7.asc
|
||||
@@ -746,10 +746,12 @@ iscsistart -b --param node.session.timeo.replacement_timeout=30
|
||||
|
||||
FCoE
|
||||
~~~~
|
||||
-**fcoe=**__<edd|interface|MAC>__:__{dcb|nodcb}__::
|
||||
+**fcoe=**__<edd|interface|MAC>__:__{dcb|nodcb}__:__{fabric|vn2vn}__::
|
||||
Try to connect to a FCoE SAN through the NIC specified by _<interface>_ or
|
||||
- _<MAC>_ or EDD settings. For the second argument, currently only nodcb is
|
||||
- supported. This parameter can be specified multiple times.
|
||||
+ _<MAC>_ or EDD settings. The second argument specifies if DCB
|
||||
+ should be used. The optional third argument specifies whether
|
||||
+ fabric or VN2VN mode should be used.
|
||||
+ This parameter can be specified multiple times.
|
||||
+
|
||||
NOTE: letters in the MAC-address must be lowercase!
|
||||
|
||||
diff --git a/modules.d/95fcoe/fcoe-genrules.sh b/modules.d/95fcoe/fcoe-genrules.sh
|
||||
index eb58601..af15a58 100755
|
||||
--- a/modules.d/95fcoe/fcoe-genrules.sh
|
||||
+++ b/modules.d/95fcoe/fcoe-genrules.sh
|
||||
@@ -7,8 +7,8 @@
|
||||
# Write udev rules
|
||||
{
|
||||
if [ -n "$fcoe_mac" ] ; then
|
||||
- printf 'ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="%s", RUN+="/sbin/initqueue --onetime --unique --name fcoe-up-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s"\n' "$fcoe_mac" "$fcoe_dcb"
|
||||
+ printf 'ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="%s", RUN+="/sbin/initqueue --onetime --unique --name fcoe-up-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s"\n' "$fcoe_mac" "$fcoe_dcb" "$fcoe_mode"
|
||||
else
|
||||
- printf 'ACTION=="add", SUBSYSTEM=="net", NAME=="%s", RUN+="/sbin/initqueue --onetime --unique --name fcoe-up-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s"\n' "$fcoe_interface" "$fcoe_dcb"
|
||||
+ printf 'ACTION=="add", SUBSYSTEM=="net", NAME=="%s", RUN+="/sbin/initqueue --onetime --unique --name fcoe-up-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s"\n' "$fcoe_interface" "$fcoe_dcb" "$fcoe_mode"
|
||||
fi
|
||||
} >> /etc/udev/rules.d/92-fcoe.rules
|
||||
diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh
|
||||
index 662b21a..ffcc4e3 100755
|
||||
--- a/modules.d/95fcoe/fcoe-up.sh
|
||||
+++ b/modules.d/95fcoe/fcoe-up.sh
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# We get called like this:
|
||||
-# fcoe-up <network-device> <dcb|nodcb>
|
||||
+# fcoe-up <network-device> <dcb|nodcb> <fabric|vn2vn>
|
||||
#
|
||||
# Note currently only nodcb is supported, the dcb option is reserved for
|
||||
# future use.
|
||||
@@ -15,6 +15,7 @@ type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh
|
||||
|
||||
netif=$1
|
||||
dcb=$2
|
||||
+mode=$3
|
||||
vlan="yes"
|
||||
|
||||
iflink=$(cat /sys/class/net/$netif/iflink)
|
||||
@@ -43,7 +44,11 @@ write_fcoemon_cfg() {
|
||||
else
|
||||
echo AUTO_VLAN=\"no\" >> /etc/fcoe/cfg-$netif
|
||||
fi
|
||||
- echo MODE=\"fabric\" >> /etc/fcoe/cfg-$netif
|
||||
+ if [ "$mode" = "vn2vn" ] ; then
|
||||
+ echo MODE=\"vn2vn\" >> /etc/fcoe/cfg-$netif
|
||||
+ else
|
||||
+ echo MODE=\"fabric\" >> /etc/fcoe/cfg-$netif
|
||||
+ fi
|
||||
}
|
||||
|
||||
if [ "$netdriver" = "bnx2x" ]; then
|
||||
diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh
|
||||
index 18c00b3..2a5c71a 100755
|
||||
--- a/modules.d/95fcoe/module-setup.sh
|
||||
+++ b/modules.d/95fcoe/module-setup.sh
|
||||
@@ -44,7 +44,13 @@ cmdline() {
|
||||
for c in /sys/bus/fcoe/devices/ctlr_* ; do
|
||||
[ -L $c ] || continue
|
||||
read enabled < $c/enabled
|
||||
+ read mode < $c/mode
|
||||
[ $enabled -eq 0 ] && continue
|
||||
+ if [ $mode = "VN2VN" ] ; then
|
||||
+ mode="vn2vn"
|
||||
+ else
|
||||
+ mode="fabric"
|
||||
+ fi
|
||||
d=$(cd -P $c; echo $PWD)
|
||||
i=${d%/*}
|
||||
read mac < ${i}/address
|
||||
@@ -60,7 +66,7 @@ cmdline() {
|
||||
else
|
||||
dcb="nodcb"
|
||||
fi
|
||||
- echo "fcoe=${mac}:${dcb}"
|
||||
+ echo "fcoe=${mac}:${dcb}:${mode}"
|
||||
done
|
||||
}
|
||||
|
||||
diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh
|
||||
index 9f47184..75cca9a 100755
|
||||
--- a/modules.d/95fcoe/parse-fcoe.sh
|
||||
+++ b/modules.d/95fcoe/parse-fcoe.sh
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Supported formats:
|
||||
-# fcoe=<networkdevice>:<dcb|nodcb>
|
||||
-# fcoe=<macaddress>:<dcb|nodcb>
|
||||
+# fcoe=<networkdevice>:<dcb|nodcb>:<fabric|vn2vn>
|
||||
+# fcoe=<macaddress>:<dcb|nodcb>:<fabric|vn2vn>
|
||||
#
|
||||
# Note currently only nodcb is supported, the dcb option is reserved for
|
||||
# future use.
|
||||
@@ -10,8 +10,8 @@
|
||||
# Note letters in the macaddress must be lowercase!
|
||||
#
|
||||
# Examples:
|
||||
-# fcoe=eth0:nodcb
|
||||
-# fcoe=4a:3f:4c:04:f8:d7:nodcb
|
||||
+# fcoe=eth0:nodcb:vn2vn
|
||||
+# fcoe=4a:3f:4c:04:f8:d7:nodcb:fabric
|
||||
|
||||
[ -z "$fcoe" ] && fcoe=$(getarg fcoe=)
|
||||
|
||||
@@ -32,11 +32,25 @@ parse_fcoe_opts() {
|
||||
2)
|
||||
fcoe_interface=$1
|
||||
fcoe_dcb=$2
|
||||
+ fcoe_mode="fabric"
|
||||
+ return 0
|
||||
+ ;;
|
||||
+ 3)
|
||||
+ fcoe_interface=$1
|
||||
+ fcoe_dcb=$2
|
||||
+ fcoe_mode=$3
|
||||
return 0
|
||||
;;
|
||||
7)
|
||||
fcoe_mac=$1:$2:$3:$4:$5:$6
|
||||
fcoe_dcb=$7
|
||||
+ fcoe_mode="fabric"
|
||||
+ return 0
|
||||
+ ;;
|
||||
+ 8)
|
||||
+ fcoe_mac=$1:$2:$3:$4:$5:$6
|
||||
+ fcoe_dcb=$7
|
||||
+ fcoe_mode=$8
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
--
|
||||
2.6.6
|
||||
|
38
0218-40network-allow-persistent-interface-names.patch
Normal file
38
0218-40network-allow-persistent-interface-names.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From 47831cf386dd4d49c2b56f3bbbaf719348b9862f Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Wed, 24 Aug 2016 15:12:52 +0200
|
||||
Subject: [PATCH] 40network: allow persistent interface names
|
||||
|
||||
We are using persistent interface names even for kernel device
|
||||
names on SLES, so we should be removing the warning.
|
||||
|
||||
References: bsc#995284
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.com>
|
||||
---
|
||||
modules.d/40network/net-lib.sh | 9 ---------
|
||||
1 file changed, 9 deletions(-)
|
||||
|
||||
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
||||
index 0a77d4b..d17209a 100755
|
||||
--- a/modules.d/40network/net-lib.sh
|
||||
+++ b/modules.d/40network/net-lib.sh
|
||||
@@ -573,15 +573,6 @@ parse_ifname_opts() {
|
||||
;;
|
||||
esac
|
||||
|
||||
- case $ifname_if in
|
||||
- eth[0-9]|eth[0-9][0-9]|eth[0-9][0-9][0-9]|eth[0-9][0-9][0-9][0-9])
|
||||
- warn "ifname=$ifname_if uses the kernel name space for interfaces"
|
||||
- warn "This can fail for multiple network interfaces and is discouraged!"
|
||||
- warn "Please use a custom name like \"netboot\" or \"bluesocket\""
|
||||
- warn "or use biosdevname and no ifname= at all."
|
||||
- ;;
|
||||
- esac
|
||||
-
|
||||
}
|
||||
|
||||
# some network driver need long time to initialize, wait before it's ready.
|
||||
--
|
||||
2.6.6
|
||||
|
@ -0,0 +1,88 @@
|
||||
From 4f19de16df2746b0b742bfbecfb493728a150c86 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Wed, 24 Aug 2016 15:14:31 +0200
|
||||
Subject: [PATCH] 95fcoe: use interface names instead of MAC addresses
|
||||
|
||||
Now that we are using persistent network names we can switch
|
||||
to using the interface names when specifying the fcoe configuration.
|
||||
With that we can print the fcoe configuration only once.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.com>
|
||||
---
|
||||
modules.d/95fcoe/module-setup.sh | 60 +++++++++++++++++++++-------------------
|
||||
1 file changed, 32 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh
|
||||
index 2a5c71a..acc611d 100755
|
||||
--- a/modules.d/95fcoe/module-setup.sh
|
||||
+++ b/modules.d/95fcoe/module-setup.sh
|
||||
@@ -40,34 +40,38 @@ get_vlan_parent() {
|
||||
|
||||
# called by dracut
|
||||
cmdline() {
|
||||
-
|
||||
- for c in /sys/bus/fcoe/devices/ctlr_* ; do
|
||||
- [ -L $c ] || continue
|
||||
- read enabled < $c/enabled
|
||||
- read mode < $c/mode
|
||||
- [ $enabled -eq 0 ] && continue
|
||||
- if [ $mode = "VN2VN" ] ; then
|
||||
- mode="vn2vn"
|
||||
- else
|
||||
- mode="fabric"
|
||||
- fi
|
||||
- d=$(cd -P $c; echo $PWD)
|
||||
- i=${d%/*}
|
||||
- read mac < ${i}/address
|
||||
- s=$(dcbtool gc ${i##*/} dcb 2>/dev/null | 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 2>/dev/null | sed -n 's/^DCB State:\t*\(.*\)/\1/p')
|
||||
- fi
|
||||
- fi
|
||||
- if [ "$s" = "on" ] ; then
|
||||
- dcb="dcb"
|
||||
- else
|
||||
- dcb="nodcb"
|
||||
- fi
|
||||
- echo "fcoe=${mac}:${dcb}:${mode}"
|
||||
- done
|
||||
+ {
|
||||
+ for c in /sys/bus/fcoe/devices/ctlr_* ; do
|
||||
+ [ -L $c ] || continue
|
||||
+ read enabled < $c/enabled
|
||||
+ read mode < $c/mode
|
||||
+ [ $enabled -eq 0 ] && continue
|
||||
+ if [ $mode = "VN2VN" ] ; then
|
||||
+ mode="vn2vn"
|
||||
+ else
|
||||
+ mode="fabric"
|
||||
+ fi
|
||||
+ d=$(cd -P $c; echo $PWD)
|
||||
+ i=${d%/*}
|
||||
+ ifname=${i##*/}
|
||||
+ read mac < ${i}/address
|
||||
+ s=$(dcbtool gc ${i##*/} dcb 2>/dev/null | 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 2>/dev/null | sed -n 's/^DCB State:\t*\(.*\)/\1/p')
|
||||
+ ifname=${p##*/}
|
||||
+ fi
|
||||
+ fi
|
||||
+ if [ "$s" = "on" ] ; then
|
||||
+ dcb="dcb"
|
||||
+ else
|
||||
+ dcb="nodcb"
|
||||
+ fi
|
||||
+ echo "ifname=${ifname}:${mac}"
|
||||
+ echo "fcoe=${ifname}:${dcb}:${mode}"
|
||||
+ done
|
||||
+ } | sort | uniq
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
--
|
||||
2.6.6
|
||||
|
38
0220-95fcoe-always-set-AUTO_VLAN-for-fcoemon.patch
Normal file
38
0220-95fcoe-always-set-AUTO_VLAN-for-fcoemon.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From fdbb581a9df74db58c306141aca24dc824e72dec Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Wed, 24 Aug 2016 12:26:04 +0200
|
||||
Subject: [PATCH] 95fcoe: always set AUTO_VLAN for fcoemon
|
||||
|
||||
fcoemon is well capable of figuring out whether a vlan should
|
||||
be used, so there's no need to disable the AUTO_VLAN feature.
|
||||
|
||||
References: bsc#995019
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.com>
|
||||
---
|
||||
modules.d/95fcoe/fcoe-up.sh | 9 ++-------
|
||||
1 file changed, 2 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh
|
||||
index ffcc4e3..102f9d3 100755
|
||||
--- a/modules.d/95fcoe/fcoe-up.sh
|
||||
+++ b/modules.d/95fcoe/fcoe-up.sh
|
||||
@@ -92,13 +92,8 @@ elif [ "$dcb" = "dcb" ]; then
|
||||
done
|
||||
|
||||
sleep 1
|
||||
-
|
||||
- write_fcoemon_cfg
|
||||
- fcoemon --syslog=yes
|
||||
-else
|
||||
- vlan="no"
|
||||
- write_fcoemon_cfg
|
||||
- fcoemon --syslog=yes
|
||||
fi
|
||||
+write_fcoemon_cfg
|
||||
+fcoemon --syslog=yes
|
||||
|
||||
need_shutdown
|
||||
--
|
||||
2.6.6
|
||||
|
45
0221-95fcoe-Add-shutdown-script.patch
Normal file
45
0221-95fcoe-Add-shutdown-script.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From 2a5b570b7a6020d63ab6c4cbdb9e926d88b32639 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Thu, 25 Aug 2016 09:36:06 +0200
|
||||
Subject: [PATCH] 95fcoe: Add shutdown script
|
||||
|
||||
We should be disabling the FCoE connection (which triggers sending
|
||||
a LOGO internally) to logout from the target; this resets the target
|
||||
and will avoid hitting a busy condition during reboots.
|
||||
|
||||
References: bsc#994860
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.com>
|
||||
---
|
||||
modules.d/95fcoe/module-setup.sh | 1 +
|
||||
modules.d/95fcoe/stop-fcoe.sh | 6 ++++++
|
||||
2 files changed, 7 insertions(+)
|
||||
create mode 100755 modules.d/95fcoe/stop-fcoe.sh
|
||||
|
||||
diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh
|
||||
index acc611d..572670c 100755
|
||||
--- a/modules.d/95fcoe/module-setup.sh
|
||||
+++ b/modules.d/95fcoe/module-setup.sh
|
||||
@@ -97,6 +97,7 @@ install() {
|
||||
inst_hook pre-trigger 03 "$moddir/lldpad.sh"
|
||||
inst_hook cmdline 99 "$moddir/parse-fcoe.sh"
|
||||
inst_hook cleanup 90 "$moddir/cleanup-fcoe.sh"
|
||||
+ inst_hook shutdown 40 "$moddir/stop-fcoe.sh"
|
||||
dracut_need_initqueue
|
||||
}
|
||||
|
||||
diff --git a/modules.d/95fcoe/stop-fcoe.sh b/modules.d/95fcoe/stop-fcoe.sh
|
||||
new file mode 100755
|
||||
index 0000000..d2462b3
|
||||
--- /dev/null
|
||||
+++ b/modules.d/95fcoe/stop-fcoe.sh
|
||||
@@ -0,0 +1,6 @@
|
||||
+#!/bin/bash
|
||||
+
|
||||
+for f in /sys/bus/fcoe/devices/ctlr_* ; do
|
||||
+ [ -e $f ] || continue
|
||||
+ echo 0 > $f/enabled
|
||||
+done
|
||||
--
|
||||
2.6.6
|
||||
|
55
0222-90dm-Fixup-shutdown-script.patch
Normal file
55
0222-90dm-Fixup-shutdown-script.patch
Normal file
@ -0,0 +1,55 @@
|
||||
From 885b133ecd7913990449e7598526d0965ebc3458 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Thu, 25 Aug 2016 09:28:30 +0200
|
||||
Subject: [PATCH] 90dm: Fixup shutdown script
|
||||
|
||||
When calling the shutdown script we need to take care of traversing
|
||||
the device-mapper tables, otherwise we might end up trying to remove
|
||||
a device-mapper device which still has another one stacked on top
|
||||
and the removal will fail.
|
||||
|
||||
References: bsc#994860
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.com>
|
||||
---
|
||||
modules.d/90dm/dm-shutdown.sh | 21 +++++++++++++++++++--
|
||||
1 file changed, 19 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/90dm/dm-shutdown.sh b/modules.d/90dm/dm-shutdown.sh
|
||||
index 04c89be..0685a68 100755
|
||||
--- a/modules.d/90dm/dm-shutdown.sh
|
||||
+++ b/modules.d/90dm/dm-shutdown.sh
|
||||
@@ -1,11 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
+_remove_dm() {
|
||||
+ local dev=$1
|
||||
+ local s
|
||||
+ local devname
|
||||
+
|
||||
+ for s in /sys/block/${dev}/holders/dm-* ; do
|
||||
+ [ -e ${s} ] || continue
|
||||
+ _remove_dm ${s##*/}
|
||||
+ done
|
||||
+ devname=$(cat /sys/block/${dev}/dm/name)
|
||||
+ dmsetup -v --noudevsync remove "$devname" || return $?
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
_do_dm_shutdown() {
|
||||
local ret=0
|
||||
local final=$1
|
||||
+ local dev
|
||||
+
|
||||
info "Disassembling device-mapper devices"
|
||||
- for dev in $(dmsetup info -c --noheadings -o name) ; do
|
||||
- dmsetup -v --noudevsync remove "$dev" || ret=$?
|
||||
+ for dev in /sys/block/dm-* ; do
|
||||
+ [ -e ${dev} ] || continue
|
||||
+ _remove_dm ${dev##*/} || ret=$?
|
||||
done
|
||||
if [ "x$final" != "x" ]; then
|
||||
info "dmsetup ls --tree"
|
||||
--
|
||||
2.6.6
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user