dracut-044-75
- fix for systemd >= 230 - git snapshot
This commit is contained in:
parent
c5170f23a0
commit
b386772815
22
0017-dracut.cmdline-remove-extra-from-ip-doc.patch
Normal file
22
0017-dracut.cmdline-remove-extra-from-ip-doc.patch
Normal file
@ -0,0 +1,22 @@
|
||||
From 0a7d7f63106ce5a7f9869aacb21d0474621811e7 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Wed, 13 Jan 2016 09:17:40 +0100
|
||||
Subject: [PATCH] dracut.cmdline: remove extra ":" from ip= doc
|
||||
|
||||
---
|
||||
dracut.cmdline.7.asc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
|
||||
index e160e3b..c4c5588 100644
|
||||
--- a/dracut.cmdline.7.asc
|
||||
+++ b/dracut.cmdline.7.asc
|
||||
@@ -492,7 +492,7 @@ cannot be used in conjunction with the **ifname** argument for the
|
||||
same <interface>.
|
||||
=====================
|
||||
|
||||
-**ip=**__<client-IP>__:[__<peer>__]:__<gateway-IP>__:__<netmask>__:__<client_hostname>__:__<interface>__:__{none|off|dhcp|on|any|dhcp6|auto6|ibft}__:[:[__<mtu>__][:__<macaddr>__]]::
|
||||
+**ip=**__<client-IP>__:[__<peer>__]:__<gateway-IP>__:__<netmask>__:__<client_hostname>__:__<interface>__:__{none|off|dhcp|on|any|dhcp6|auto6|ibft}__[:[__<mtu>__][:__<macaddr>__]]::
|
||||
explicit network configuration. If you want do define a IPv6 address, put it
|
||||
in brackets (e.g. [2001:DB8::1]). This parameter can be specified multiple
|
||||
times. __<peer>__ is optional and is the address of the remote endpoint
|
@ -0,0 +1,30 @@
|
||||
From b019952f6df9b1dae54dd097f012e6c05fe6af00 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Wed, 13 Jan 2016 09:32:24 +0100
|
||||
Subject: [PATCH] dracut.sh: fail hard, if we find modules and modules.dep is
|
||||
missing
|
||||
|
||||
If modules are present in /lib/modules/<kernelversion> and modules.dep
|
||||
is empty, depmod was not run most likely.
|
||||
---
|
||||
dracut.sh | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index 6dc9858..98dbe0b 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -925,7 +925,12 @@ abs_outfile=$(readlink -f "$outfile") && outfile="$abs_outfile"
|
||||
|
||||
if [[ $no_kernel != yes ]] && [[ -d $srcmods ]]; then
|
||||
if ! [[ -f $srcmods/modules.dep ]]; then
|
||||
- dwarn "$srcmods/modules.dep is missing. Did you run depmod?"
|
||||
+ if [[ -n "$(find "$srcmods" -name '*.ko*')" ]]; then
|
||||
+ dfatal "$srcmods/modules.dep is missing. Did you run depmod?"
|
||||
+ exit 1
|
||||
+ else
|
||||
+ dwarn "$srcmods/modules.dep is missing. Did you run depmod?"
|
||||
+ fi
|
||||
elif ! ( command -v gzip &>/dev/null && command -v xz &>/dev/null); then
|
||||
read _mod < $srcmods/modules.dep
|
||||
_mod=${_mod%%:*}
|
@ -0,0 +1,25 @@
|
||||
From efbc47b8e43ad173d3319f3f6e87b0a60aad9f37 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Wed, 13 Jan 2016 13:43:38 +0100
|
||||
Subject: [PATCH] network/net-lib.sh: correctly set mac address for
|
||||
ip=...:<mtu>:<mac>
|
||||
|
||||
if ip=...:<mtu>:<mac> was specified, macadress was not set
|
||||
---
|
||||
modules.d/40network/net-lib.sh | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
||||
index 256826e..31f1a56 100755
|
||||
--- a/modules.d/40network/net-lib.sh
|
||||
+++ b/modules.d/40network/net-lib.sh
|
||||
@@ -427,6 +427,9 @@ ip_to_var() {
|
||||
;;
|
||||
[0-9]*)
|
||||
mtu="$8"
|
||||
+ if [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then
|
||||
+ macaddr="${9}:${10}:${11}:${12}:${13}:${14}"
|
||||
+ fi
|
||||
;;
|
||||
*)
|
||||
if [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then
|
@ -0,0 +1,25 @@
|
||||
From 2fd8588da51a0e43684852dcdabe327aca684a9f Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Mon, 18 Jan 2016 16:59:42 +0100
|
||||
Subject: [PATCH] dracut-functions.sh:fix check_vol_slaves() volume group name
|
||||
stripping
|
||||
|
||||
commit 466a59984a095f33993cffd5a3bea40826469b03 removed whitespace
|
||||
stripping from lvm volume group names.
|
||||
---
|
||||
dracut-functions.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
||||
index 59747ec..c7ea9f5 100755
|
||||
--- a/dracut-functions.sh
|
||||
+++ b/dracut-functions.sh
|
||||
@@ -580,7 +580,7 @@ check_vol_slaves() {
|
||||
if [[ $_lv = $2 ]]; then
|
||||
_vg=$(lvm lvs --noheadings -o vg_name $i 2>/dev/null)
|
||||
# strip space
|
||||
- _vg=$(printf "%s\n" "$_vg")
|
||||
+ _vg="${_vg//[[:space:]]/}"
|
||||
if [[ $_vg ]]; then
|
||||
for _pv in $(lvm vgs --noheadings -o pv_name "$_vg" 2>/dev/null)
|
||||
do
|
38
0021-multipath-fix-majmin_to_mpath_dev.patch
Normal file
38
0021-multipath-fix-majmin_to_mpath_dev.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From 28058a2e373eb268d9b1cd5b65c2ad607961dad1 Mon Sep 17 00:00:00 2001
|
||||
From: Pekka Wallendahl <wyrmiyu@gmail.com>
|
||||
Date: Mon, 18 Jan 2016 20:28:22 +0200
|
||||
Subject: [PATCH] multipath: fix majmin_to_mpath_dev()
|
||||
|
||||
* Multipath device names only start with the mpath-prefix if the option
|
||||
use_userfriendly_names is set true in /etc/multipath.conf and if user
|
||||
has not set any aliases in the said file. Thus the for-loop should go
|
||||
through all files in /dev/mapper/, not just ones starting with 'mpath'
|
||||
|
||||
* Bash is perfectly capable to extend `/dev/mapper/*` notation without a
|
||||
need to pass it to an external ls
|
||||
|
||||
* Changed the function to use a local variable $_dev instead of the
|
||||
global $dev, which seemed to be the original intention as the local
|
||||
_dev was defined but not used
|
||||
---
|
||||
modules.d/90multipath/module-setup.sh | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh
|
||||
index 831c99f..a808678 100755
|
||||
--- a/modules.d/90multipath/module-setup.sh
|
||||
+++ b/modules.d/90multipath/module-setup.sh
|
||||
@@ -9,9 +9,10 @@ is_mpath() {
|
||||
|
||||
majmin_to_mpath_dev() {
|
||||
local _dev
|
||||
- for i in `ls -1 /dev/mapper/mpath*`; do
|
||||
- dev=$(get_maj_min $i)
|
||||
- if [ "$dev" = "$1" ]; then
|
||||
+ for i in /dev/mapper/*; do
|
||||
+ [[ $i == /dev/mapper/control ]] && continue
|
||||
+ _dev=$(get_maj_min $i)
|
||||
+ if [ "$_dev" = "$1" ]; then
|
||||
echo $i
|
||||
return
|
||||
fi
|
805
0022-Fixed-vlan-bonding-bridging-team-logic.patch
Normal file
805
0022-Fixed-vlan-bonding-bridging-team-logic.patch
Normal file
@ -0,0 +1,805 @@
|
||||
From 24a78b269745b0b16a2bdc03c35015b2cb9d0408 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Tue, 19 Jan 2016 11:34:10 +0100
|
||||
Subject: [PATCH] Fixed vlan, bonding, bridging, team logic
|
||||
|
||||
Call ifup for the slaves and assemble afterwards.
|
||||
---
|
||||
modules.d/40network/ifup.sh | 364 ++++++++++++++++++------------------
|
||||
modules.d/40network/net-genrules.sh | 26 ++-
|
||||
modules.d/40network/parse-bond.sh | 25 +--
|
||||
modules.d/40network/parse-bridge.sh | 28 +--
|
||||
modules.d/40network/parse-team.sh | 26 +--
|
||||
modules.d/40network/parse-vlan.sh | 4 +-
|
||||
modules.d/45ifcfg/write-ifcfg.sh | 21 +--
|
||||
test/TEST-20-NFS/test.sh | 4 +-
|
||||
test/TEST-30-ISCSI/test.sh | 4 +-
|
||||
test/TEST-50-MULTINIC/test.sh | 17 +-
|
||||
10 files changed, 249 insertions(+), 270 deletions(-)
|
||||
|
||||
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
|
||||
index eca7478..14ca86d 100755
|
||||
--- a/modules.d/40network/ifup.sh
|
||||
+++ b/modules.d/40network/ifup.sh
|
||||
@@ -15,76 +15,12 @@ type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh
|
||||
|
||||
# $netif reads easier than $1
|
||||
netif=$1
|
||||
-use_bridge='false'
|
||||
-use_vlan='false'
|
||||
|
||||
-# enslave this interface to bond?
|
||||
-for i in /tmp/bond.*.info; do
|
||||
- [ -e "$i" ] || continue
|
||||
- unset bondslaves
|
||||
- unset bondname
|
||||
- . "$i"
|
||||
- for slave in $bondslaves ; do
|
||||
- if [ "$netif" = "$slave" ] ; then
|
||||
- netif=$bondname
|
||||
- break 2
|
||||
- fi
|
||||
- done
|
||||
-done
|
||||
-
|
||||
-if [ -e /tmp/team.info ]; then
|
||||
- . /tmp/team.info
|
||||
- for slave in $teamslaves ; do
|
||||
- if [ "$netif" = "$slave" ] ; then
|
||||
- netif=$teammaster
|
||||
- fi
|
||||
- done
|
||||
-fi
|
||||
-
|
||||
-if [ -e /tmp/vlan.info ]; then
|
||||
- . /tmp/vlan.info
|
||||
- if [ "$netif" = "$phydevice" ]; then
|
||||
- if [ "$netif" = "$bondname" ] && [ -n "$DO_BOND_SETUP" ] ; then
|
||||
- : # We need to really setup bond (recursive call)
|
||||
- elif [ "$netif" = "$teammaster" ] && [ -n "$DO_TEAM_SETUP" ] ; then
|
||||
- : # We need to really setup team (recursive call)
|
||||
- else
|
||||
- netif="$vlanname"
|
||||
- use_vlan='true'
|
||||
- fi
|
||||
- fi
|
||||
-fi
|
||||
-
|
||||
-# bridge this interface?
|
||||
-if [ -e /tmp/bridge.info ]; then
|
||||
- . /tmp/bridge.info
|
||||
- for ethname in $bridgeslaves ; do
|
||||
- if [ "$netif" = "$ethname" ]; then
|
||||
- if [ "$netif" = "$bondname" ] && [ -n "$DO_BOND_SETUP" ] ; then
|
||||
- : # We need to really setup bond (recursive call)
|
||||
- elif [ "$netif" = "$teammaster" ] && [ -n "$DO_TEAM_SETUP" ] ; then
|
||||
- : # We need to really setup team (recursive call)
|
||||
- elif [ "$netif" = "$vlanname" ] && [ -n "$DO_VLAN_SETUP" ]; then
|
||||
- : # We need to really setup vlan (recursive call)
|
||||
- else
|
||||
- netif="$bridgename"
|
||||
- use_bridge='true'
|
||||
- fi
|
||||
- fi
|
||||
- done
|
||||
-fi
|
||||
-
|
||||
-# disable manual ifup while netroot is set for simplifying our logic
|
||||
-# in netroot case we prefer netroot to bringup $netif automaticlly
|
||||
-[ -n "$2" -a "$2" = "-m" ] && [ -z "$netroot" ] && manualup="$2"
|
||||
-
|
||||
-if [ -n "$manualup" ]; then
|
||||
- >/tmp/net.$netif.manualup
|
||||
- rm -f /tmp/net.${netif}.did-setup
|
||||
-else
|
||||
- [ -e /tmp/net.${netif}.did-setup ] && exit 0
|
||||
- [ -e /sys/class/net/$netif/address ] && \
|
||||
- [ -e /tmp/net.$(cat /sys/class/net/$netif/address).did-setup ] && exit 0
|
||||
+# loopback is always handled the same way
|
||||
+if [ "$netif" = "lo" ] ; then
|
||||
+ ip link set lo up
|
||||
+ ip addr add 127.0.0.1/8 dev lo
|
||||
+ exit 0
|
||||
fi
|
||||
|
||||
# Run dhclient
|
||||
@@ -188,134 +124,203 @@ do_static() {
|
||||
return 0
|
||||
}
|
||||
|
||||
-# loopback is always handled the same way
|
||||
-if [ "$netif" = "lo" ] ; then
|
||||
- ip link set lo up
|
||||
- ip addr add 127.0.0.1/8 dev lo
|
||||
+get_vid() {
|
||||
+ case "$1" in
|
||||
+ vlan*)
|
||||
+ echo ${1#vlan}
|
||||
+ ;;
|
||||
+ *.*)
|
||||
+ echo ${1##*.}
|
||||
+ ;;
|
||||
+ esac
|
||||
+}
|
||||
+
|
||||
+# check, if we need VLAN's for this interface
|
||||
+if [ -z "$DO_VLAN_PHY" ] && [ -e /tmp/vlan.${netif}.phy ]; then
|
||||
+ NO_AUTO_DHCP=yes DO_VLAN_PHY=yes ifup "$netif"
|
||||
+ modprobe -b -q 8021q
|
||||
+
|
||||
+ for i in /tmp/vlan.*.${netif}; do
|
||||
+ [ -e "$i" ] || continue
|
||||
+ read vlanname < "$i"
|
||||
+ if [ -n "$vlanname" ]; then
|
||||
+ linkup "$phydevice"
|
||||
+ ip link add dev "$vlanname" link "$phydevice" type vlan id "$(get_vid $vlanname)"
|
||||
+ ifup "$vlanname"
|
||||
+ fi
|
||||
+ done
|
||||
exit 0
|
||||
fi
|
||||
|
||||
-# start bond if needed
|
||||
-if [ -e /tmp/bond.${netif}.info ]; then
|
||||
- . /tmp/bond.${netif}.info
|
||||
-
|
||||
- if [ "$netif" = "$bondname" ] && [ ! -e /tmp/net.$bondname.up ] ; then # We are master bond device
|
||||
- modprobe bonding
|
||||
- echo "+$netif" > /sys/class/net/bonding_masters
|
||||
- ip link set $netif down
|
||||
-
|
||||
- # Stolen from ifup-eth
|
||||
- # add the bits to setup driver parameters here
|
||||
- for arg in $bondoptions ; do
|
||||
- key=${arg%%=*};
|
||||
- value=${arg##*=};
|
||||
- # %{value:0:1} is replaced with non-bash specific construct
|
||||
- if [ "${key}" = "arp_ip_target" -a "${#value}" != "0" -a "+${value%%+*}" != "+" ]; then
|
||||
- OLDIFS=$IFS;
|
||||
- IFS=',';
|
||||
- for arp_ip in $value; do
|
||||
- echo +$arp_ip > /sys/class/net/${netif}/bonding/$key
|
||||
- done
|
||||
- IFS=$OLDIFS;
|
||||
- else
|
||||
- echo $value > /sys/class/net/${netif}/bonding/$key
|
||||
+# bridge this interface?
|
||||
+if [ -z "$NO_BRIDGE_MASTER" ]; then
|
||||
+ for i in /tmp/bridge.*.info; do
|
||||
+ [ -e "$i" ] || continue
|
||||
+ unset bridgeslaves
|
||||
+ unset bridgename
|
||||
+ . "$i"
|
||||
+ for ethname in $bridgeslaves ; do
|
||||
+ [ "$netif" != "$ethname" ] && continue
|
||||
+
|
||||
+ NO_BRIDGE_MASTER=yes NO_AUTO_DHCP=yes ifup $ethname
|
||||
+ linkup $ethname
|
||||
+ if [ ! -e /tmp/bridge.$bridgename.up ]; then
|
||||
+ brctl addbr $bridgename
|
||||
+ brctl setfd $bridgename 0
|
||||
+ > /tmp/bridge.$bridgename.up
|
||||
fi
|
||||
+ brctl addif $bridgename $ethname
|
||||
+ ifup $bridgename
|
||||
+ exit 0
|
||||
done
|
||||
+ done
|
||||
+fi
|
||||
|
||||
- linkup $netif
|
||||
-
|
||||
+# enslave this interface to bond?
|
||||
+if [ -z "$NO_BOND_MASTER" ]; then
|
||||
+ for i in /tmp/bond.*.info; do
|
||||
+ [ -e "$i" ] || continue
|
||||
+ unset bondslaves
|
||||
+ unset bondname
|
||||
+ . "$i"
|
||||
for slave in $bondslaves ; do
|
||||
- ip link set $slave down
|
||||
- cat /sys/class/net/$slave/address > /tmp/net.${netif}.${slave}.hwaddr
|
||||
- echo "+$slave" > /sys/class/net/$bondname/bonding/slaves
|
||||
- linkup $slave
|
||||
- done
|
||||
+ [ "$netif" != "$slave" ] && continue
|
||||
|
||||
- # add the bits to setup the needed post enslavement parameters
|
||||
- for arg in $BONDING_OPTS ; do
|
||||
- key=${arg%%=*};
|
||||
- value=${arg##*=};
|
||||
- if [ "${key}" = "primary" ]; then
|
||||
- echo $value > /sys/class/net/${netif}/bonding/$key
|
||||
- fi
|
||||
+ # already setup
|
||||
+ [ -e /tmp/bond.$bondname.up ] && exit 0
|
||||
+
|
||||
+ # wait for all slaves to show up
|
||||
+ for slave in $bondslaves ; do
|
||||
+ # try to create the slave (maybe vlan or bridge)
|
||||
+ NO_BOND_MASTER=yes NO_AUTO_DHCP=yes ifup $slave
|
||||
+
|
||||
+ if ! ip link show dev $slave >/dev/null 2>&1; then
|
||||
+ # wait for the last slave to show up
|
||||
+ exit 0
|
||||
+ fi
|
||||
+ done
|
||||
+
|
||||
+ modprobe -q -b bonding
|
||||
+ echo "+$bondname" > /sys/class/net/bonding_masters 2>/dev/null
|
||||
+ ip link set $bondname down
|
||||
+
|
||||
+ # Stolen from ifup-eth
|
||||
+ # add the bits to setup driver parameters here
|
||||
+ for arg in $bondoptions ; do
|
||||
+ key=${arg%%=*};
|
||||
+ value=${arg##*=};
|
||||
+ # %{value:0:1} is replaced with non-bash specific construct
|
||||
+ if [ "${key}" = "arp_ip_target" -a "${#value}" != "0" -a "+${value%%+*}" != "+" ]; then
|
||||
+ OLDIFS=$IFS;
|
||||
+ IFS=',';
|
||||
+ for arp_ip in $value; do
|
||||
+ echo +$arp_ip > /sys/class/net/${bondname}/bonding/$key
|
||||
+ done
|
||||
+ IFS=$OLDIFS;
|
||||
+ else
|
||||
+ echo $value > /sys/class/net/${bondname}/bonding/$key
|
||||
+ fi
|
||||
+ done
|
||||
+
|
||||
+ linkup $bondname
|
||||
+
|
||||
+ for slave in $bondslaves ; do
|
||||
+ cat /sys/class/net/$slave/address > /tmp/net.${bondname}.${slave}.hwaddr
|
||||
+ ip link set $slave down
|
||||
+ echo "+$slave" > /sys/class/net/$bondname/bonding/slaves
|
||||
+ linkup $slave
|
||||
+ done
|
||||
+
|
||||
+ # add the bits to setup the needed post enslavement parameters
|
||||
+ for arg in $bondoptions ; do
|
||||
+ key=${arg%%=*};
|
||||
+ value=${arg##*=};
|
||||
+ if [ "${key}" = "primary" ]; then
|
||||
+ echo $value > /sys/class/net/${bondname}/bonding/$key
|
||||
+ fi
|
||||
+ done
|
||||
+
|
||||
+ > /tmp/bond.$bondname.up
|
||||
+
|
||||
+ NO_BOND_MASTER=yes ifup $bondname
|
||||
+ exit $?
|
||||
done
|
||||
- fi
|
||||
+ done
|
||||
fi
|
||||
|
||||
-if [ -e /tmp/team.info ]; then
|
||||
- . /tmp/team.info
|
||||
- if [ "$netif" = "$teammaster" ] && [ ! -e /tmp/net.$teammaster.up ] ; then
|
||||
- # We shall only bring up those _can_ come up
|
||||
- # in case of some slave is gone in active-backup mode
|
||||
- working_slaves=""
|
||||
+if [ -z "$NO_TEAM_MASTER" ]; then
|
||||
+ for i in /tmp/team.*.info; do
|
||||
+ [ -e "$i" ] || continue
|
||||
+ unset teammaster
|
||||
+ unset teamslaves
|
||||
+ . "$i"
|
||||
for slave in $teamslaves ; do
|
||||
- ip link set $slave up 2>/dev/null
|
||||
- if wait_for_if_up $slave; then
|
||||
- working_slaves+="$slave "
|
||||
- fi
|
||||
- done
|
||||
- # Do not add slaves now
|
||||
- teamd -d -U -n -N -t $teammaster -f /etc/teamd/$teammaster.conf
|
||||
- for slave in $working_slaves; do
|
||||
- # team requires the slaves to be down before joining team
|
||||
- ip link set $slave down
|
||||
- teamdctl $teammaster port add $slave
|
||||
- done
|
||||
- ip link set $teammaster up
|
||||
- fi
|
||||
-fi
|
||||
+ [ "$netif" != "$slave" ] && continue
|
||||
|
||||
-# XXX need error handling like dhclient-script
|
||||
+ [ -e /tmp/team.$teammaster.up ] && exit 0
|
||||
|
||||
-if [ -e /tmp/bridge.info ]; then
|
||||
- . /tmp/bridge.info
|
||||
-# start bridge if necessary
|
||||
- if [ "$netif" = "$bridgename" ] && [ ! -e /tmp/net.$bridgename.up ]; then
|
||||
- brctl addbr $bridgename
|
||||
- brctl setfd $bridgename 0
|
||||
- for ethname in $bridgeslaves ; do
|
||||
- if [ "$ethname" = "$bondname" ] ; then
|
||||
- DO_BOND_SETUP=yes ifup $bondname -m
|
||||
- elif [ "$ethname" = "$teammaster" ] ; then
|
||||
- DO_TEAM_SETUP=yes ifup $teammaster -m
|
||||
- elif [ "$ethname" = "$vlanname" ]; then
|
||||
- DO_VLAN_SETUP=yes ifup $vlanname -m
|
||||
- else
|
||||
- linkup $ethname
|
||||
+ # wait for all slaves to show up
|
||||
+ for slave in $teamslaves ; do
|
||||
+ # try to create the slave (maybe vlan or bridge)
|
||||
+ NO_BOND_MASTER=yes NO_AUTO_DHCP=yes ifup $slave
|
||||
+
|
||||
+ if ! ip link show dev $slave >/dev/null 2>&1; then
|
||||
+ # wait for the last slave to show up
|
||||
+ exit 0
|
||||
+ fi
|
||||
+ done
|
||||
+
|
||||
+ if [ ! -e /tmp/team.$teammaster.up ] ; then
|
||||
+ # We shall only bring up those _can_ come up
|
||||
+ # in case of some slave is gone in active-backup mode
|
||||
+ working_slaves=""
|
||||
+ for slave in $teamslaves ; do
|
||||
+ ip link set $slave up 2>/dev/null
|
||||
+ if wait_for_if_up $slave; then
|
||||
+ working_slaves+="$slave "
|
||||
+ fi
|
||||
+ done
|
||||
+ # Do not add slaves now
|
||||
+ teamd -d -U -n -N -t $teammaster -f /etc/teamd/$teammaster.conf
|
||||
+ for slave in $working_slaves; do
|
||||
+ # team requires the slaves to be down before joining team
|
||||
+ ip link set $slave down
|
||||
+ teamdctl $teammaster port add $slave
|
||||
+ done
|
||||
+
|
||||
+ ip link set $teammaster up
|
||||
+
|
||||
+ > /tmp/team.$teammaster.up
|
||||
+ NO_TEAM_MASTER=yes ifup $teammaster
|
||||
+ exit $?
|
||||
fi
|
||||
- brctl addif $bridgename $ethname
|
||||
done
|
||||
- fi
|
||||
+ done
|
||||
fi
|
||||
|
||||
-get_vid() {
|
||||
- case "$1" in
|
||||
- vlan*)
|
||||
- echo ${1#vlan}
|
||||
- ;;
|
||||
- *.*)
|
||||
- echo ${1##*.}
|
||||
- ;;
|
||||
- esac
|
||||
-}
|
||||
+# all synthetic interfaces done.. now check if the interface is available
|
||||
+if ! ip link show dev $netif >/dev/null 2>&1; then
|
||||
+ exit 1
|
||||
+fi
|
||||
|
||||
-if [ "$netif" = "$vlanname" ] && [ ! -e /tmp/net.$vlanname.up ]; then
|
||||
- modprobe 8021q
|
||||
- if [ "$phydevice" = "$bondname" ] ; then
|
||||
- DO_BOND_SETUP=yes ifup $phydevice -m
|
||||
- elif [ "$phydevice" = "$teammaster" ] ; then
|
||||
- DO_TEAM_SETUP=yes ifup $phydevice -m
|
||||
- else
|
||||
- linkup "$phydevice"
|
||||
- fi
|
||||
- ip link add dev "$vlanname" link "$phydevice" type vlan id "$(get_vid $vlanname)"
|
||||
- ip link set "$vlanname" up
|
||||
+# disable manual ifup while netroot is set for simplifying our logic
|
||||
+# in netroot case we prefer netroot to bringup $netif automaticlly
|
||||
+[ -n "$2" -a "$2" = "-m" ] && [ -z "$netroot" ] && manualup="$2"
|
||||
+
|
||||
+if [ -n "$manualup" ]; then
|
||||
+ >/tmp/net.$netif.manualup
|
||||
+ rm -f /tmp/net.${netif}.did-setup
|
||||
+else
|
||||
+ [ -e /tmp/net.${netif}.did-setup ] && exit 0
|
||||
+ [ -e /sys/class/net/$netif/address ] && \
|
||||
+ [ -e /tmp/net.$(cat /sys/class/net/$netif/address).did-setup ] && exit 0
|
||||
fi
|
||||
|
||||
+
|
||||
# No ip lines default to dhcp
|
||||
ip=$(getarg ip)
|
||||
|
||||
-if [ -z "$ip" ]; then
|
||||
+if [ -z "$NO_AUTO_DHCP" ] && [ -z "$ip" ]; then
|
||||
for s in $(getargs nameserver); do
|
||||
[ -n "$s" ] || continue
|
||||
echo nameserver $s >> /tmp/net.$netif.resolv.conf
|
||||
@@ -348,9 +353,7 @@ for p in $(getargs ip=); do
|
||||
esac
|
||||
|
||||
# If this option isn't directed at our interface, skip it
|
||||
- [ -n "$dev" ] && [ "$dev" != "$netif" ] && \
|
||||
- [ "$use_bridge" != 'true' ] && \
|
||||
- [ "$use_vlan" != 'true' ] && continue
|
||||
+ [ -n "$dev" ] && [ "$dev" != "$netif" ] && continue
|
||||
|
||||
# setup nameserver
|
||||
for s in "$dns1" "$dns2" $(getargs nameserver); do
|
||||
@@ -402,15 +405,8 @@ for p in $(getargs ip=); do
|
||||
fi
|
||||
done
|
||||
|
||||
-# netif isn't the top stack? Then we should exit here.
|
||||
-# eg. netif is bond0. br0 is on top of it. dhcp br0 is correct but dhcp
|
||||
-# bond0 doesn't make sense.
|
||||
-if [ -n "$DO_BOND_SETUP" -o -n "$DO_TEAM_SETUP" -o -n "$DO_VLAN_SETUP" ]; then
|
||||
- exit 0
|
||||
-fi
|
||||
-
|
||||
# no ip option directed at our interface?
|
||||
-if [ ! -e /tmp/net.${netif}.up ]; then
|
||||
+if [ -z "$NO_AUTO_DHCP" ] && [ ! -e /tmp/net.${netif}.up ]; then
|
||||
if [ -e /tmp/net.bootdev ]; then
|
||||
BOOTDEV=$(cat /tmp/net.bootdev)
|
||||
if [ "$netif" = "$BOOTDEV" ] || [ "$BOOTDEV" = "$(cat /sys/class/net/${netif}/address)" ]; then
|
||||
diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh
|
||||
index b1c156c..5df50bd 100755
|
||||
--- a/modules.d/40network/net-genrules.sh
|
||||
+++ b/modules.d/40network/net-genrules.sh
|
||||
@@ -12,11 +12,14 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
|
||||
# Write udev rules
|
||||
{
|
||||
# bridge: attempt only the defined interface
|
||||
- if [ -e /tmp/bridge.info ]; then
|
||||
- . /tmp/bridge.info
|
||||
+ for i in /tmp/bridge.*.info; do
|
||||
+ [ -e "$i" ] || continue
|
||||
+ unset bridgeslaves
|
||||
+ unset bridgename
|
||||
+ . "$i"
|
||||
IFACES="$IFACES ${bridgeslaves%% *}"
|
||||
MASTER_IFACES="$MASTER_IFACES $bridgename"
|
||||
- fi
|
||||
+ done
|
||||
|
||||
# bond: attempt only the defined interface (override bridge defines)
|
||||
for i in /tmp/bond.*.info; do
|
||||
@@ -35,11 +38,18 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
|
||||
MASTER_IFACES="$MASTER_IFACES ${teammaster}"
|
||||
fi
|
||||
|
||||
- if [ -e /tmp/vlan.info ]; then
|
||||
- . /tmp/vlan.info
|
||||
- IFACES="$IFACES $phydevice"
|
||||
- MASTER_IFACES="$MASTER_IFACES ${vlanname}"
|
||||
- fi
|
||||
+ for j in /tmp/vlan.*.phy; do
|
||||
+ [ -e "$j" ] || continue
|
||||
+ unset phydevice
|
||||
+ . "$j"
|
||||
+ for i in /tmp/vlan.*.${phydevice}; do
|
||||
+ [ -e "$i" ] || continue
|
||||
+ unset vlanname
|
||||
+ . "$i"
|
||||
+ IFACES="$IFACES $phydevice"
|
||||
+ MASTER_IFACES="$MASTER_IFACES ${vlanname}"
|
||||
+ done
|
||||
+ done
|
||||
|
||||
if [ -z "$IFACES" ]; then
|
||||
[ -e /tmp/net.ifaces ] && read IFACES < /tmp/net.ifaces
|
||||
diff --git a/modules.d/40network/parse-bond.sh b/modules.d/40network/parse-bond.sh
|
||||
index 25c51b8..80b3b07 100755
|
||||
--- a/modules.d/40network/parse-bond.sh
|
||||
+++ b/modules.d/40network/parse-bond.sh
|
||||
@@ -10,14 +10,6 @@
|
||||
# bond without parameters assumes bond=bond0:eth0,eth1:mode=balance-rr
|
||||
#
|
||||
|
||||
-# return if bond already parsed
|
||||
-[ -n "$bondname" ] && return
|
||||
-
|
||||
-# Check if bond parameter is valid
|
||||
-if getarg bond= >/dev/null ; then
|
||||
- :
|
||||
-fi
|
||||
-
|
||||
# We translate list of slaves to space-separated here to mwke it easier to loop over them in ifup
|
||||
# Ditto for bonding options
|
||||
parsebond() {
|
||||
@@ -28,7 +20,6 @@ parsebond() {
|
||||
v=${v#*:}
|
||||
done
|
||||
|
||||
- unset bondname bondslaves bondoptions
|
||||
case $# in
|
||||
0) bondname=bond0; bondslaves="eth0 eth1" ;;
|
||||
1) bondname=$1; bondslaves="eth0 eth1" ;;
|
||||
@@ -38,14 +29,13 @@ parsebond() {
|
||||
esac
|
||||
}
|
||||
|
||||
-unset bondname bondslaves bondoptions
|
||||
-
|
||||
# Parse bond for bondname, bondslaves, bondmode and bondoptions
|
||||
-if getarg bond >/dev/null; then
|
||||
- # Read bond= parameters if they exist
|
||||
- bond="$(getarg bond=)"
|
||||
- if [ ! "$bond" = "bond" ]; then
|
||||
- parsebond "$(getarg bond=)"
|
||||
+for bond in $(getargs bond=); do
|
||||
+ unset bondname
|
||||
+ unset bondslaves
|
||||
+ unset bondoptions
|
||||
+ if [ "$bond" != "bond" ]; then
|
||||
+ parsebond "$bond"
|
||||
fi
|
||||
# Simple default bond
|
||||
if [ -z "$bondname" ]; then
|
||||
@@ -57,5 +47,4 @@ if getarg bond >/dev/null; then
|
||||
echo "bondname=$bondname" > /tmp/bond.${bondname}.info
|
||||
echo "bondslaves=\"$bondslaves\"" >> /tmp/bond.${bondname}.info
|
||||
echo "bondoptions=\"$bondoptions\"" >> /tmp/bond.${bondname}.info
|
||||
- return
|
||||
-fi
|
||||
+done
|
||||
diff --git a/modules.d/40network/parse-bridge.sh b/modules.d/40network/parse-bridge.sh
|
||||
index 212f259..5c3af29 100755
|
||||
--- a/modules.d/40network/parse-bridge.sh
|
||||
+++ b/modules.d/40network/parse-bridge.sh
|
||||
@@ -7,14 +7,6 @@
|
||||
# bridge without parameters assumes bridge=br0:eth0
|
||||
#
|
||||
|
||||
-# return if bridge already parsed
|
||||
-[ -n "$bridgename" ] && return
|
||||
-
|
||||
-# Check if bridge parameter is valid
|
||||
-if getarg bridge= >/dev/null ; then
|
||||
- command -v brctl >/dev/null 2>&1 || die "No 'brctl' installed"
|
||||
-fi
|
||||
-
|
||||
parsebridge() {
|
||||
local v=${1}:
|
||||
set --
|
||||
@@ -22,8 +14,6 @@ parsebridge() {
|
||||
set -- "$@" "${v%%:*}"
|
||||
v=${v#*:}
|
||||
done
|
||||
-
|
||||
- unset bridgename bridgeslaves
|
||||
case $# in
|
||||
0) bridgename=br0; bridgeslaves=$iface ;;
|
||||
1) die "bridge= requires two parameters" ;;
|
||||
@@ -32,14 +22,13 @@ parsebridge() {
|
||||
esac
|
||||
}
|
||||
|
||||
-unset bridgename bridgeslaves
|
||||
-
|
||||
-iface=eth0
|
||||
-
|
||||
# Parse bridge for bridgename and bridgeslaves
|
||||
-if bridge="$(getarg bridge)"; then
|
||||
+for bridge in $(getargs bridge=); do
|
||||
+ unset bridgename
|
||||
+ unset bridgeslaves
|
||||
+ iface=eth0
|
||||
# Read bridge= parameters if they exist
|
||||
- if [ -n "$bridge" ]; then
|
||||
+ if [ "$bridge" != "bridge" ]; then
|
||||
parsebridge $bridge
|
||||
fi
|
||||
# Simple default bridge
|
||||
@@ -47,7 +36,6 @@ if bridge="$(getarg bridge)"; then
|
||||
bridgename=br0
|
||||
bridgeslaves=$iface
|
||||
fi
|
||||
- echo "bridgename=$bridgename" > /tmp/bridge.info
|
||||
- echo "bridgeslaves=\"$bridgeslaves\"" >> /tmp/bridge.info
|
||||
- return
|
||||
-fi
|
||||
+ echo "bridgename=$bridgename" > /tmp/bridge.${bridgename}.info
|
||||
+ echo "bridgeslaves=\"$bridgeslaves\"" >> /tmp/bridge.${bridgename}.info
|
||||
+done
|
||||
diff --git a/modules.d/40network/parse-team.sh b/modules.d/40network/parse-team.sh
|
||||
index 318c0e1..cc5cba7 100755
|
||||
--- a/modules.d/40network/parse-team.sh
|
||||
+++ b/modules.d/40network/parse-team.sh
|
||||
@@ -6,14 +6,6 @@
|
||||
# teamslaves is a comma-separated list of physical (ethernet) interfaces
|
||||
#
|
||||
|
||||
-# return if team already parsed
|
||||
-[ -n "$teammaster" ] && return
|
||||
-
|
||||
-# Check if team parameter is valid
|
||||
-if getarg team= >/dev/null ; then
|
||||
- :
|
||||
-fi
|
||||
-
|
||||
parseteam() {
|
||||
local v=${1}:
|
||||
set --
|
||||
@@ -22,23 +14,17 @@ parseteam() {
|
||||
v=${v#*:}
|
||||
done
|
||||
|
||||
- unset teammaster teamslaves
|
||||
case $# in
|
||||
2) teammaster=$1; teamslaves=$(str_replace "$2" "," " ") ;;
|
||||
*) die "team= requires two parameters" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
-unset teammaster teamslaves
|
||||
|
||||
-if getarg team>/dev/null; then
|
||||
- # Read team= parameters if they exist
|
||||
- team="$(getarg team=)"
|
||||
- if [ ! "$team" = "team" ]; then
|
||||
- parseteam "$(getarg team=)"
|
||||
- fi
|
||||
+for team in $(getargs team=); do
|
||||
+ unset teammaster teamslaves
|
||||
+ parseteam "$(getarg team=)"
|
||||
|
||||
- echo "teammaster=$teammaster" > /tmp/team.info
|
||||
- echo "teamslaves=\"$teamslaves\"" >> /tmp/team.info
|
||||
- return
|
||||
-fi
|
||||
+ echo "teammaster=$teammaster" > /tmp/team.${teammaster}.info
|
||||
+ echo "teamslaves=\"$teamslaves\"" >> /tmp/team.${teammaster}.info
|
||||
+done
|
||||
diff --git a/modules.d/40network/parse-vlan.sh b/modules.d/40network/parse-vlan.sh
|
||||
index 3ba2289..b2a9c1c 100755
|
||||
--- a/modules.d/40network/parse-vlan.sh
|
||||
+++ b/modules.d/40network/parse-vlan.sh
|
||||
@@ -36,7 +36,7 @@ if getarg vlan >/dev/null; then
|
||||
parsevlan "$(getarg vlan=)"
|
||||
fi
|
||||
|
||||
- echo "vlanname=\"$vlanname\"" > /tmp/vlan.info
|
||||
- echo "phydevice=\"$phydevice\"" >> /tmp/vlan.info
|
||||
+ echo "$phydevice" > /tmp/vlan.${phydevice}.phy
|
||||
+ echo "$vlanname" > /tmp/vlan.${vlanname}.${phydevice}
|
||||
return
|
||||
fi
|
||||
diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
|
||||
index 251d684..c3774ae 100755
|
||||
--- a/modules.d/45ifcfg/write-ifcfg.sh
|
||||
+++ b/modules.d/45ifcfg/write-ifcfg.sh
|
||||
@@ -5,14 +5,6 @@ type is_persistent_ethernet_name >/dev/null 2>&1 || . /lib/net-lib.sh
|
||||
|
||||
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/
|
||||
|
||||
@@ -129,6 +121,8 @@ for netup in /tmp/net.*.did-setup ; do
|
||||
unset bondslaves
|
||||
unset bondname
|
||||
unset bondoptions
|
||||
+ unset bridgename
|
||||
+ unset bridgeslaves
|
||||
unset uuid
|
||||
unset ip
|
||||
unset gw
|
||||
@@ -140,17 +134,22 @@ for netup in /tmp/net.*.did-setup ; do
|
||||
unset vlan
|
||||
|
||||
[ -e /tmp/bond.${netif}.info ] && . /tmp/bond.${netif}.info
|
||||
+ [ -e /tmp/bridge.${netif}.info ] && . /tmp/bridge.${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
|
||||
+ # $netif can't be bridge and bond at the same time
|
||||
bond=yes
|
||||
fi
|
||||
- if [ "$netif" = "$vlanname" ]; then
|
||||
+
|
||||
+ for i in /tmp/vlan.${netif}.*; do
|
||||
+ [ ! -e "$i" ] && continue
|
||||
+ . "$i"
|
||||
vlan=yes
|
||||
- fi
|
||||
+ break
|
||||
+ done
|
||||
|
||||
{
|
||||
echo "# Generated by dracut initrd"
|
||||
diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh
|
||||
index 61e4c1a..ceca1f0 100755
|
||||
--- a/test/TEST-20-NFS/test.sh
|
||||
+++ b/test/TEST-20-NFS/test.sh
|
||||
@@ -16,8 +16,8 @@ run_server() {
|
||||
-drive format=raw,index=0,media=disk,file=$TESTDIR/server.ext3 \
|
||||
-m 256M -smp 2 \
|
||||
-display none \
|
||||
- -net nic,macaddr=52:54:00:12:34:56,model=e1000 \
|
||||
-net socket,listen=127.0.0.1:12320 \
|
||||
+ -net nic,macaddr=52:54:00:12:34:56,model=e1000 \
|
||||
-serial ${SERIAL:-null} \
|
||||
-watchdog i6300esb -watchdog-action poweroff \
|
||||
-append "rd.debug loglevel=77 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \
|
||||
@@ -134,7 +134,7 @@ test_nfsv3() {
|
||||
"root=nfs:192.168.50.1:/nfs/client" 192.168.50.1 -wsize=4096 || return 1
|
||||
|
||||
client_test "NFSv3 Bridge root=nfs:..." 52:54:00:12:34:04 \
|
||||
- "root=nfs:192.168.50.1:/nfs/client bridge" 192.168.50.1 -wsize=4096 || return 1
|
||||
+ "root=nfs:192.168.50.1:/nfs/client bridge net.ifnames=0" 192.168.50.1 -wsize=4096 || return 1
|
||||
|
||||
client_test "NFSv3 Legacy root=IP:path" 52:54:00:12:34:04 \
|
||||
"root=192.168.50.1:/nfs/client" 192.168.50.1 -wsize=4096 || return 1
|
||||
diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh
|
||||
index fc4bdce..00c1fbd 100755
|
||||
--- a/test/TEST-30-ISCSI/test.sh
|
||||
+++ b/test/TEST-30-ISCSI/test.sh
|
||||
@@ -85,7 +85,7 @@ do_test_run() {
|
||||
"rd.iscsi.initiator=$initiator" \
|
||||
|| return 1
|
||||
|
||||
- run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0" \
|
||||
+ run_client "FAILME: netroot=iscsi target1 target2 rd.iscsi.waitnet=0" \
|
||||
"root=LABEL=sysroot" \
|
||||
"ip=192.168.50.101:::255.255.255.0::ens3:off" \
|
||||
"ip=192.168.51.101:::255.255.255.0::ens4:off" \
|
||||
@@ -94,7 +94,7 @@ do_test_run() {
|
||||
"rd.iscsi.firmware" \
|
||||
"rd.iscsi.initiator=$initiator" \
|
||||
"rd.iscsi.waitnet=0" \
|
||||
- || return 1
|
||||
+ || return 0
|
||||
|
||||
run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \
|
||||
"root=LABEL=sysroot" \
|
||||
diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh
|
||||
index fdeb840..484ebee 100755
|
||||
--- a/test/TEST-50-MULTINIC/test.sh
|
||||
+++ b/test/TEST-50-MULTINIC/test.sh
|
||||
@@ -18,7 +18,7 @@ run_server() {
|
||||
-display none \
|
||||
-net socket,listen=127.0.0.1:12350 \
|
||||
-net nic,macaddr=52:54:01:12:34:56,model=e1000 \
|
||||
- ${SERIAL:+-serial "$SERIAL"} \
|
||||
+ -serial ${SERIAL:-null} \
|
||||
-watchdog i6300esb -watchdog-action poweroff \
|
||||
-append "loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \
|
||||
-initrd "$TESTDIR"/initramfs.server \
|
||||
@@ -90,7 +90,10 @@ test_run() {
|
||||
echo "Failed to start server" 1>&2
|
||||
return 1
|
||||
fi
|
||||
- test_client || { kill_server; return 1; }
|
||||
+ test_client
|
||||
+ ret=$?
|
||||
+ kill_server
|
||||
+ return $ret
|
||||
}
|
||||
|
||||
test_client() {
|
||||
@@ -133,7 +136,15 @@ test_client() {
|
||||
"root=dhcp ip=ens3:dhcp ip=ens4:dhcp ip=ens5:dhcp bootdev=ens5" \
|
||||
"ens3 ens4 ens5" || return 1
|
||||
|
||||
- kill_server
|
||||
+ client_test "MULTINIC bonding" \
|
||||
+ 00 01 02 \
|
||||
+ "root=nfs:192.168.50.1:/nfs/client ip=bond0:dhcp bond=bond0:ens3,ens4,ens5:mode=balance-rr" \
|
||||
+ "bond0" || return 1
|
||||
+
|
||||
+ client_test "MULTINIC bridging" \
|
||||
+ 00 01 02 \
|
||||
+ "root=nfs:192.168.50.1:/nfs/client ip=bridge0:dhcp bridge=bridge0:ens3,ens4,ens5" \
|
||||
+ "bridge0" || return 1
|
||||
return 0
|
||||
}
|
||||
|
56
0023-TEST-30-ISCSI-some-tests-have-unknown-return-code.patch
Normal file
56
0023-TEST-30-ISCSI-some-tests-have-unknown-return-code.patch
Normal file
@ -0,0 +1,56 @@
|
||||
From bb1b924792a688ea3da7e7f4503527e5bc0b18fb Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Tue, 19 Jan 2016 14:43:43 +0100
|
||||
Subject: [PATCH] TEST-30-ISCSI: some tests have unknown return code
|
||||
|
||||
by design
|
||||
---
|
||||
test/TEST-30-ISCSI/test.sh | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh
|
||||
index 00c1fbd..940edb6 100755
|
||||
--- a/test/TEST-30-ISCSI/test.sh
|
||||
+++ b/test/TEST-30-ISCSI/test.sh
|
||||
@@ -85,7 +85,7 @@ do_test_run() {
|
||||
"rd.iscsi.initiator=$initiator" \
|
||||
|| return 1
|
||||
|
||||
- run_client "FAILME: netroot=iscsi target1 target2 rd.iscsi.waitnet=0" \
|
||||
+ run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0" \
|
||||
"root=LABEL=sysroot" \
|
||||
"ip=192.168.50.101:::255.255.255.0::ens3:off" \
|
||||
"ip=192.168.51.101:::255.255.255.0::ens4:off" \
|
||||
@@ -94,9 +94,9 @@ do_test_run() {
|
||||
"rd.iscsi.firmware" \
|
||||
"rd.iscsi.initiator=$initiator" \
|
||||
"rd.iscsi.waitnet=0" \
|
||||
- || return 0
|
||||
+ || return 1
|
||||
|
||||
- run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \
|
||||
+ run_client "FAILME: netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \
|
||||
"root=LABEL=sysroot" \
|
||||
"ip=192.168.50.101:::255.255.255.0::ens3:off" \
|
||||
"ip=192.168.51.101:::255.255.255.0::ens4:off" \
|
||||
@@ -105,9 +105,9 @@ do_test_run() {
|
||||
"rd.iscsi.firmware" \
|
||||
"rd.iscsi.initiator=$initiator" \
|
||||
"rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \
|
||||
- || return 1
|
||||
+ || :
|
||||
|
||||
- run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0 default GW" \
|
||||
+ run_client "FAILME: netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0 default GW" \
|
||||
"root=LABEL=sysroot" \
|
||||
"ip=192.168.50.101::192.168.50.1:255.255.255.0::ens3:off" \
|
||||
"ip=192.168.51.101::192.168.51.1:255.255.255.0::ens4:off" \
|
||||
@@ -116,7 +116,7 @@ do_test_run() {
|
||||
"rd.iscsi.firmware" \
|
||||
"rd.iscsi.initiator=$initiator" \
|
||||
"rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \
|
||||
- || return 1
|
||||
+ || :
|
||||
|
||||
return 0
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
From 9542f2fee4a398ed00730e6ffb7de5fe315aa093 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Tue, 19 Jan 2016 15:12:39 +0100
|
||||
Subject: [PATCH] network: add mtu to list of variables to store in override
|
||||
|
||||
---
|
||||
modules.d/40network/ifup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
|
||||
index 14ca86d..7c179bd 100755
|
||||
--- a/modules.d/40network/ifup.sh
|
||||
+++ b/modules.d/40network/ifup.sh
|
||||
@@ -362,7 +362,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 hostname macaddr mtu dns1 dns2; do
|
||||
eval '[ "$'$i'" ] && echo '$i'="$'$i'"'
|
||||
done > /tmp/net.$netif.override
|
||||
|
46
0025-Correctly-handle-module-aliases.patch
Normal file
46
0025-Correctly-handle-module-aliases.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From 43819af68c7789ec932c25e699c56889fdf7276c Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fvogt@suse.com>
|
||||
Date: Thu, 21 Jan 2016 17:13:07 +0100
|
||||
Subject: [PATCH] Correctly handle module aliases
|
||||
|
||||
Handle module aliases correctly to not generate unbootable
|
||||
initrds with different kernel versions when modules were renamed
|
||||
or replaced.
|
||||
|
||||
Signed-off-by: Fabian Vogt <fvogt@suse.com>
|
||||
---
|
||||
dracut.sh | 21 +++++++++++++++++++++
|
||||
1 file changed, 21 insertions(+)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index 98dbe0b..ae8772b 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -1195,6 +1195,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
|
44
0026-network-if-rd.neednet-0-we-don-t-need-a-bootdev.patch
Normal file
44
0026-network-if-rd.neednet-0-we-don-t-need-a-bootdev.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From f4f8fb5c10cc8d0047123324197aff25f0a63e04 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Tue, 26 Jan 2016 12:26:03 +0100
|
||||
Subject: [PATCH] network: if rd.neednet=0 we don't need a bootdev
|
||||
|
||||
otherwise dracut would wait for the bootdev interface to appear and be
|
||||
setup
|
||||
---
|
||||
modules.d/40network/parse-ip-opts.sh | 9 ++++-----
|
||||
1 file changed, 4 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh
|
||||
index 12f4765..5779ef8 100755
|
||||
--- a/modules.d/40network/parse-ip-opts.sh
|
||||
+++ b/modules.d/40network/parse-ip-opts.sh
|
||||
@@ -40,6 +40,8 @@ if [ -n "$NEEDBOOTDEV" ] && getargbool 1 rd.neednet; then
|
||||
#[ -z "$BOOTDEV" ] && warn "Please supply bootdev argument for multiple ip= lines"
|
||||
echo "rd.neednet=1" > /etc/cmdline.d/dracut-neednet.conf
|
||||
info "Multiple ip= arguments: assuming rd.neednet=1"
|
||||
+else
|
||||
+ unset NEEDBOOTDEV
|
||||
fi
|
||||
|
||||
# Check ip= lines
|
||||
@@ -48,17 +50,14 @@ for p in $(getargs ip=); do
|
||||
ip_to_var $p
|
||||
|
||||
# make first device specified the BOOTDEV
|
||||
- if [ -z "$BOOTDEV" ] && [ -n "$dev" ]; then
|
||||
+ if [ -n "$NEEDBOOTDEV" ] && [ -z "$BOOTDEV" ] && [ -n "$dev" ]; then
|
||||
BOOTDEV="$dev"
|
||||
- [ -n "$NEEDBOOTDEV" ] && info "Setting bootdev to '$BOOTDEV'"
|
||||
+ info "Setting bootdev to '$BOOTDEV'"
|
||||
fi
|
||||
|
||||
# skip ibft since we did it above
|
||||
[ "$autoconf" = "ibft" ] && continue
|
||||
|
||||
- # We need to have an ip= line for the specified bootdev
|
||||
- [ -n "$NEEDBOOTDEV" ] && [ "$dev" = "$BOOTDEV" ] && BOOTDEVOK=1
|
||||
-
|
||||
# Empty autoconf defaults to 'dhcp'
|
||||
if [ -z "$autoconf" ] ; then
|
||||
warn "Empty autoconf values default to dhcp"
|
25
0027-kernel-modules-add-usb-storage.patch
Normal file
25
0027-kernel-modules-add-usb-storage.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From b4dd861a0b916368bad9413fdc5d90482fcbd65a Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Tue, 26 Jan 2016 14:56:05 +0100
|
||||
Subject: [PATCH] kernel-modules: add usb-storage
|
||||
|
||||
To save the rdsosreport.txt to a USB stick, the usb-storage module is
|
||||
needed
|
||||
---
|
||||
modules.d/90kernel-modules/module-setup.sh | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
|
||||
index c5f2397..13f48c9 100755
|
||||
--- a/modules.d/90kernel-modules/module-setup.sh
|
||||
+++ b/modules.d/90kernel-modules/module-setup.sh
|
||||
@@ -47,7 +47,8 @@ installkernel() {
|
||||
"=drivers/input/keyboard"
|
||||
|
||||
instmods yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \
|
||||
- atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus
|
||||
+ atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus \
|
||||
+ usb-storage
|
||||
|
||||
if [[ "$(uname -p)" == arm* ]]; then
|
||||
# arm specific modules
|
@ -0,0 +1,48 @@
|
||||
From 6bc2096cf58c4b52f23ecc1bf8dc301d6122dfb5 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Tue, 26 Jan 2016 14:59:28 +0100
|
||||
Subject: [PATCH] kernel-modules: join instmods and install all usb/storage
|
||||
|
||||
---
|
||||
modules.d/90kernel-modules/module-setup.sh | 18 ++++++++----------
|
||||
1 file changed, 8 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
|
||||
index 13f48c9..300adc7 100755
|
||||
--- a/modules.d/90kernel-modules/module-setup.sh
|
||||
+++ b/modules.d/90kernel-modules/module-setup.sh
|
||||
@@ -39,16 +39,17 @@ installkernel() {
|
||||
ehci-hcd ehci-pci ehci-platform \
|
||||
ohci-hcd ohci-pci \
|
||||
uhci-hcd \
|
||||
- xhci-hcd xhci-pci xhci-plat-hcd
|
||||
-
|
||||
- hostonly='' instmods \
|
||||
+ xhci-hcd xhci-pci xhci-plat-hcd \
|
||||
"=drivers/hid" \
|
||||
"=drivers/input/serio" \
|
||||
- "=drivers/input/keyboard"
|
||||
+ "=drivers/input/keyboard" \
|
||||
+ "=drivers/usb/storage"
|
||||
|
||||
- instmods yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \
|
||||
- atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus \
|
||||
- usb-storage
|
||||
+ instmods \
|
||||
+ yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \
|
||||
+ atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus \
|
||||
+ virtio virtio_blk virtio_ring virtio_pci virtio_scsi \
|
||||
+ "=drivers/pcmcia" =ide
|
||||
|
||||
if [[ "$(uname -p)" == arm* ]]; then
|
||||
# arm specific modules
|
||||
@@ -61,9 +62,6 @@ installkernel() {
|
||||
${NULL}
|
||||
fi
|
||||
|
||||
- # install virtual machine support
|
||||
- instmods virtio virtio_blk virtio_ring virtio_pci virtio_scsi \
|
||||
- "=drivers/pcmcia" =ide "=drivers/usb/storage"
|
||||
|
||||
find_kernel_modules | block_module_filter | instmods
|
||||
|
@ -0,0 +1,54 @@
|
||||
From eddca3c9c24e4cb9c5def0b98920e36b16fafaac Mon Sep 17 00:00:00 2001
|
||||
From: Evgeny Vereshchagin <evvers@ya.ru>
|
||||
Date: Mon, 15 Feb 2016 08:29:40 +0000
|
||||
Subject: [PATCH] dracut-systemd/dracut-cmdline-ask: fix dracut
|
||||
--kernel-cmdline=rd.cmdline=ask
|
||||
|
||||
How to reproduce:
|
||||
|
||||
host# dracut --kernel-cmdline='rd.cmdline=ask' initramfs.img
|
||||
host# qemu-system-x86_64 -initrd initramfs.img ... -append root=/dev/sda1 ...
|
||||
...
|
||||
|
||||
qemu-host# journalctl -b | grep dracut-cmdline-ask
|
||||
...
|
||||
Feb 15 08:45:36 localhost systemd[1]: dracut-cmdline-ask.service: Installed new job dracut-cmdline-ask.service/start as 42
|
||||
Feb 15 08:45:36 localhost systemd[1]: dracut-cmdline-ask.service: ConditionKernelCommandLine=rd.cmdline=ask failed.
|
||||
Feb 15 08:45:36 localhost systemd[1]: dracut-cmdline-ask.service: Starting requested but condition failed. Not starting unit.
|
||||
Feb 15 08:45:36 localhost systemd[1]: dracut-cmdline-ask.service: Job dracut-cmdline-ask.service/start finished, result=done
|
||||
...
|
||||
|
||||
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
|
||||
---
|
||||
modules.d/98dracut-systemd/dracut-cmdline-ask.service | 3 ++-
|
||||
modules.d/98dracut-systemd/dracut-cmdline-ask.sh | 4 ++++
|
||||
2 files changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/98dracut-systemd/dracut-cmdline-ask.service b/modules.d/98dracut-systemd/dracut-cmdline-ask.service
|
||||
index 9a34b35..8bc7d80 100644
|
||||
--- a/modules.d/98dracut-systemd/dracut-cmdline-ask.service
|
||||
+++ b/modules.d/98dracut-systemd/dracut-cmdline-ask.service
|
||||
@@ -14,7 +14,8 @@ Before=dracut-cmdline.service
|
||||
After=systemd-journald.socket
|
||||
Wants=systemd-journald.socket
|
||||
ConditionPathExists=/usr/lib/initrd-release
|
||||
-ConditionKernelCommandLine=rd.cmdline=ask
|
||||
+ConditionKernelCommandLine=|rd.cmdline=ask
|
||||
+ConditionPathExistsGlob=|/etc/cmdline.d/*.conf
|
||||
|
||||
[Service]
|
||||
Environment=DRACUT_SYSTEMD=1
|
||||
diff --git a/modules.d/98dracut-systemd/dracut-cmdline-ask.sh b/modules.d/98dracut-systemd/dracut-cmdline-ask.sh
|
||||
index ab8933a..f410f46 100755
|
||||
--- a/modules.d/98dracut-systemd/dracut-cmdline-ask.sh
|
||||
+++ b/modules.d/98dracut-systemd/dracut-cmdline-ask.sh
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
+type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||
+
|
||||
+getarg "rd.cmdline=ask" || exit 0
|
||||
+
|
||||
sleep 0.5
|
||||
echo
|
||||
sleep 0.5
|
@ -0,0 +1,39 @@
|
||||
From 4ab6447c2a9ed105e7fba26ded2b3f3b725de8e9 Mon Sep 17 00:00:00 2001
|
||||
From: Evgeny Vereshchagin <evvers@ya.ru>
|
||||
Date: Mon, 15 Feb 2016 13:47:18 +0000
|
||||
Subject: [PATCH] base/init.sh: don't remove 99-cmdline-ask on 'hostonly'
|
||||
cleanup
|
||||
|
||||
How to reproduce:
|
||||
host# ./dracut.sh -o 'dracut-systemd systemd systemd-initrd' --local -f ./initramfs.img
|
||||
|
||||
host# qemu-system-x86_64 -initrd ./initramfs.img \
|
||||
-append 'root=/dev/sda1 rd.cmdline=ask rd.hostonly=0' \
|
||||
...
|
||||
|
||||
Enter additional kernel command line parameter (end with ctrl-d or .)
|
||||
> rd.break
|
||||
> .
|
||||
...
|
||||
There is no "Break before switch_root"
|
||||
...
|
||||
|
||||
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
|
||||
---
|
||||
modules.d/99base/init.sh | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
|
||||
index e2e4029..bd7ef70 100755
|
||||
--- a/modules.d/99base/init.sh
|
||||
+++ b/modules.d/99base/init.sh
|
||||
@@ -120,7 +120,9 @@ if getarg "rd.cmdline=ask"; then
|
||||
fi
|
||||
|
||||
if ! getargbool 1 'rd.hostonly'; then
|
||||
+ [ -f /etc/cmdline.d/99-cmdline-ask.conf ] && mv /etc/cmdline.d/99-cmdline-ask.conf /tmp/99-cmdline-ask.conf
|
||||
remove_hostonly_files
|
||||
+ [ -f /tmp/99-cmdline-ask.conf ] && mv /tmp/99-cmdline-ask.conf /etc/cmdline.d/99-cmdline-ask.conf
|
||||
fi
|
||||
|
||||
# run scriptlets to parse the command line
|
@ -0,0 +1,42 @@
|
||||
From fe6455a6e8f4b070ffa8116ef26d423a25d56049 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Mon, 29 Feb 2016 13:12:02 +0100
|
||||
Subject: [PATCH] documentation: "--hostonly-i18n" "--no-hostonly-i18n"
|
||||
"i18n_install_all"
|
||||
|
||||
---
|
||||
dracut.8.asc | 6 ++++++
|
||||
dracut.conf.5.asc | 3 +++
|
||||
2 files changed, 9 insertions(+)
|
||||
|
||||
diff --git a/dracut.8.asc b/dracut.8.asc
|
||||
index aee84c4..3b80000 100644
|
||||
--- a/dracut.8.asc
|
||||
+++ b/dracut.8.asc
|
||||
@@ -323,6 +323,12 @@ provide a valid _/etc/fstab_.
|
||||
**--no-hostonly-cmdline**:
|
||||
Do not store kernel command line arguments needed in the initramfs
|
||||
|
||||
+**--hostonly-i18n**:
|
||||
+ Install only needed keyboard and font files according to the host configuration (default).
|
||||
+
|
||||
+**--no-hostonly-i18n**:
|
||||
+ Install all keyboard and font files available.
|
||||
+
|
||||
**--persistent-policy** _<policy>_::
|
||||
Use _<policy>_ to address disks and partitions.
|
||||
_<policy>_ can be any directory name found in /dev/disk.
|
||||
diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc
|
||||
index 0460d4f..e07c247 100644
|
||||
--- a/dracut.conf.5.asc
|
||||
+++ b/dracut.conf.5.asc
|
||||
@@ -99,6 +99,9 @@ Configuration files must have the extension .conf; other extensions are ignored.
|
||||
*hostonly_cmdline=*"__{yes|no}__"::
|
||||
If set, store the kernel command line arguments needed in the initramfs
|
||||
|
||||
+*i18n_install_all=*"__{yes|no}__"::
|
||||
+ If set to yes, install all available fonts and keyboard files.
|
||||
+
|
||||
*persistent_policy=*"__<policy>__"::
|
||||
Use _<policy>_ to address disks and partitions.
|
||||
_<policy>_ can be any directory name found in /dev/disk.
|
@ -0,0 +1,91 @@
|
||||
From caf12d6717379769e4f12296405edc4d547d46f8 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Mon, 29 Feb 2016 14:52:16 +0100
|
||||
Subject: [PATCH] network/dhclient-script.sh: add classless-static-routes
|
||||
support
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1260955
|
||||
(cherry picked from commit a48ea27debb926a30810c9f1a42f096494c727e2)
|
||||
---
|
||||
modules.d/40network/dhclient-script.sh | 48 ++++++++++++++++++++++++++++++++++
|
||||
modules.d/40network/dhclient.conf | 5 +++-
|
||||
2 files changed, 52 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh
|
||||
index 9aac2b1..13d2dc2 100755
|
||||
--- a/modules.d/40network/dhclient-script.sh
|
||||
+++ b/modules.d/40network/dhclient-script.sh
|
||||
@@ -95,6 +95,51 @@ setup_interface6() {
|
||||
[ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
|
||||
}
|
||||
|
||||
+function parse_option_121() {
|
||||
+ while [ $# -ne 0 ]; do
|
||||
+ mask="$1"
|
||||
+ shift
|
||||
+
|
||||
+ # Is the destination a multicast group?
|
||||
+ if [ $1 -ge 224 -a $1 -lt 240 ]; then
|
||||
+ multicast=1
|
||||
+ else
|
||||
+ multicast=0
|
||||
+ fi
|
||||
+
|
||||
+ # Parse the arguments into a CIDR net/mask string
|
||||
+ if [ $mask -gt 24 ]; then
|
||||
+ destination="$1.$2.$3.$4/$mask"
|
||||
+ shift; shift; shift; shift
|
||||
+ elif [ $mask -gt 16 ]; then
|
||||
+ destination="$1.$2.$3.0/$mask"
|
||||
+ shift; shift; shift
|
||||
+ elif [ $mask -gt 8 ]; then
|
||||
+ destination="$1.$2.0.0/$mask"
|
||||
+ shift; shift
|
||||
+ else
|
||||
+ destination="$1.0.0.0/$mask"
|
||||
+ shift
|
||||
+ fi
|
||||
+
|
||||
+ # Read the gateway
|
||||
+ gateway="$1.$2.$3.$4"
|
||||
+ shift; shift; shift; shift
|
||||
+
|
||||
+ # Multicast routing on Linux
|
||||
+ # - If you set a next-hop address for a multicast group, this breaks with Cisco switches
|
||||
+ # - If you simply leave it link-local and attach it to an interface, it works fine.
|
||||
+ if [ $multicast -eq 1 ]; then
|
||||
+ temp_result="$destination dev $interface"
|
||||
+ else
|
||||
+ temp_result="$destination via $gateway dev $interface"
|
||||
+ fi
|
||||
+
|
||||
+ echo "/sbin/ip route add $temp_result"
|
||||
+ done
|
||||
+}
|
||||
+
|
||||
+
|
||||
case $reason in
|
||||
PREINIT)
|
||||
echo "dhcp: PREINIT $netif up"
|
||||
@@ -129,6 +174,9 @@ case $reason in
|
||||
{
|
||||
echo '. /lib/net-lib.sh'
|
||||
echo "setup_net $netif"
|
||||
+ if [ -n "$new_classless_static_routes" ]; then
|
||||
+ modify_routes add "$(parse_option_121 $new_classless_static_routes)"
|
||||
+ fi
|
||||
echo "source_hook initqueue/online $netif"
|
||||
[ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif"
|
||||
echo "rm -f -- $hookdir/initqueue/setup_net_$netif.sh"
|
||||
diff --git a/modules.d/40network/dhclient.conf b/modules.d/40network/dhclient.conf
|
||||
index dbf5882..7b06763 100644
|
||||
--- a/modules.d/40network/dhclient.conf
|
||||
+++ b/modules.d/40network/dhclient.conf
|
||||
@@ -1,3 +1,6 @@
|
||||
+
|
||||
+option classless-routes code 121 = array of unsigned integer 8;
|
||||
+
|
||||
request subnet-mask, broadcast-address, time-offset, routers,
|
||||
domain-name, domain-name-servers, domain-search, host-name,
|
||||
- root-path, interface-mtu;
|
||||
+ root-path, interface-mtu classless-routes;
|
@ -0,0 +1,29 @@
|
||||
From 556ff7c76a5c365889ea9972c1878eaf7073bde8 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Mon, 7 Mar 2016 12:38:23 +0100
|
||||
Subject: [PATCH] dracut-systemd/dracut-pre-pivot.sh: Break at switch_root only
|
||||
for bare rd.break
|
||||
|
||||
similar to commit ddfea6b54cfa8f8f6c970d970318568c8a8a4c78
|
||||
|
||||
Previously, any rd.break=breakpoint would cause a break at the
|
||||
given breakpoint and also at switch_root.
|
||||
---
|
||||
modules.d/98dracut-systemd/dracut-pre-pivot.sh | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/98dracut-systemd/dracut-pre-pivot.sh b/modules.d/98dracut-systemd/dracut-pre-pivot.sh
|
||||
index a07cf3e..cc70e3c 100755
|
||||
--- a/modules.d/98dracut-systemd/dracut-pre-pivot.sh
|
||||
+++ b/modules.d/98dracut-systemd/dracut-pre-pivot.sh
|
||||
@@ -18,7 +18,9 @@ source_hook pre-pivot
|
||||
getarg 'rd.break=cleanup' 'rdbreak=cleanup' && emergency_shell -n cleanup "Break cleanup"
|
||||
source_hook cleanup
|
||||
|
||||
-getarg rd.break -d rdbreak && emergency_shell -n switch_root "Break before switch_root"
|
||||
+_bv=$(getarg rd.break -d rdbreak) && [ -z "$_bv" ] &&
|
||||
+ emergency_shell -n switch_root "Break before switch_root"
|
||||
+unset _bv
|
||||
|
||||
# remove helper symlink
|
||||
[ -h /dev/root ] && rm -f -- /dev/root
|
@ -0,0 +1,24 @@
|
||||
From b127294def5efecc27fac730f784f8bf03a5e52d Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Mon, 14 Mar 2016 10:59:29 +0100
|
||||
Subject: [PATCH] dracut-install: catch ldd message "cannot execute binary
|
||||
file"
|
||||
|
||||
---
|
||||
install/dracut-install.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/install/dracut-install.c b/install/dracut-install.c
|
||||
index a7bfdb8..8f65d8d 100644
|
||||
--- a/install/dracut-install.c
|
||||
+++ b/install/dracut-install.c
|
||||
@@ -393,6 +393,9 @@ static int resolve_deps(const char *src)
|
||||
break;
|
||||
|
||||
/* glibc */
|
||||
+ if (strstr(buf, "cannot execute binary file"))
|
||||
+ break;
|
||||
+
|
||||
if (strstr(buf, "not a dynamic executable"))
|
||||
break;
|
||||
|
22
0035-dracut.conf.5.asc-fix-bold.patch
Normal file
22
0035-dracut.conf.5.asc-fix-bold.patch
Normal file
@ -0,0 +1,22 @@
|
||||
From 472928ec3dcbfcc7ea0c1fd7e821843739f03bfc Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Mon, 14 Mar 2016 14:16:12 +0100
|
||||
Subject: [PATCH] dracut.conf.5.asc: fix bold
|
||||
|
||||
---
|
||||
dracut.conf.5.asc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc
|
||||
index e07c247..8f362b2 100644
|
||||
--- a/dracut.conf.5.asc
|
||||
+++ b/dracut.conf.5.asc
|
||||
@@ -187,7 +187,7 @@ provide a valid _/etc/fstab_.
|
||||
*show_modules=*"__{yes|no}__"::
|
||||
Print the name of the included modules to standard output during build.
|
||||
|
||||
-*i18n_vars="__<variable mapping>__"::
|
||||
+*i18n_vars=*"__<variable mapping>__"::
|
||||
Distribution specific variable mapping.
|
||||
See dracut/modules.d/10i18n/README for a detailed description.
|
||||
|
@ -0,0 +1,31 @@
|
||||
From 89da227de991ef3c1bb9ad3dc4f23d07535317d2 Mon Sep 17 00:00:00 2001
|
||||
From: Pratyush Anand <panand@redhat.com>
|
||||
Date: Wed, 16 Mar 2016 09:09:09 +0530
|
||||
Subject: [PATCH] watchdog: Do not add hooks if systemd module is included
|
||||
|
||||
When systemd is present, let it manage watchdog feed.
|
||||
|
||||
Signed-off-by: Pratyush Anand <panand@redhat.com>
|
||||
Cc: Dave Young <dyoung@redhat.com>
|
||||
Cc: Don Zickus <dzickus@redhat.com>
|
||||
Cc: Harald Hoyer <harald@redhat.com>
|
||||
---
|
||||
modules.d/04watchdog/module-setup.sh | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh
|
||||
index 576c589..7ec757a 100755
|
||||
--- a/modules.d/04watchdog/module-setup.sh
|
||||
+++ b/modules.d/04watchdog/module-setup.sh
|
||||
@@ -12,6 +12,11 @@ depends() {
|
||||
|
||||
# called by dracut
|
||||
install() {
|
||||
+ # Do not add watchdog hooks if systemd module is included
|
||||
+ # In that case, systemd will manage watchdog kick
|
||||
+ if dracut_module_included "systemd"; then
|
||||
+ return
|
||||
+ fi
|
||||
inst_hook cmdline 00 "$moddir/watchdog.sh"
|
||||
inst_hook cmdline 50 "$moddir/watchdog.sh"
|
||||
inst_hook pre-trigger 00 "$moddir/watchdog.sh"
|
94
0037-watchdog-install-module-for-active-watchdog.patch
Normal file
94
0037-watchdog-install-module-for-active-watchdog.patch
Normal file
@ -0,0 +1,94 @@
|
||||
From 3aac6827444c897aab59d7638aa191d510fd4758 Mon Sep 17 00:00:00 2001
|
||||
From: Pratyush Anand <panand@redhat.com>
|
||||
Date: Wed, 16 Mar 2016 09:09:10 +0530
|
||||
Subject: [PATCH] watchdog: install module for active watchdog
|
||||
|
||||
Recently following patches have been added in upstream Linux kernel, which
|
||||
(1) fixes parent of watchdog_device so that
|
||||
/sys/class/watchdog/watchdogn/device is populated. (2) adds some sysfs
|
||||
device attributes so that different watchdog status can be read.
|
||||
|
||||
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6551881c86c791237a3bebf11eb3bd70b60ea782
|
||||
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=906d7a5cfeda508e7361f021605579a00cd82815
|
||||
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=33b711269ade3f6bc9d9d15e4343e6fa922d999b
|
||||
|
||||
With the above support, now we can find out whether a watchdog is active or
|
||||
not. We can also find out the driver/module responsible for that watchdog
|
||||
device.
|
||||
|
||||
Proposed patch uses above support and then adds module of active watchdog
|
||||
in initramfs generated by dracut for hostonly mode. Kernel module for
|
||||
inactive watchdog will be added as well for none hostonly mode.
|
||||
|
||||
When an user does not want to add kernel module, then one should exclude
|
||||
complete dracut watchdog module with --omit.
|
||||
|
||||
Testing:
|
||||
-- When watchdog is active watchdog modules were added
|
||||
# cat /sys/class/watchdog/watchdog0/identity
|
||||
iTCO_wdt
|
||||
# cat /sys/class/watchdog/watchdog0/state
|
||||
active
|
||||
# dracut --hostonly initramfs-test.img -a watchdog
|
||||
# lsinitrd initramfs-test.img | grep iTCO
|
||||
-rw-r--r-- 1 root root 9100 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_vendor_support.ko
|
||||
-rw-r--r-- 1 root root 19252 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_wdt.ko
|
||||
|
||||
-- When watchdog is inactive then watchdog modules were not added
|
||||
# cat /sys/class/watchdog/watchdog0/state
|
||||
inactive
|
||||
# dracut --hostonly initramfs-test.img -a watchdog
|
||||
# lsinitrd initramfs-test.img | grep iTCO
|
||||
|
||||
-- When watchdog is inactive, but no hostonly mode, watchdog modules were added
|
||||
# cat /sys/class/watchdog/watchdog0/state
|
||||
inactive
|
||||
# dracut --no-hostonly initramfs-test.img -a watchdog
|
||||
# lsinitrd initramfs-test.img | grep iTCO
|
||||
-rw-r--r-- 1 root root 9100 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_vendor_support.ko
|
||||
-rw-r--r-- 1 root root 19252 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_wdt.ko
|
||||
|
||||
Signed-off-by: Pratyush Anand <panand@redhat.com>
|
||||
Cc: Dave Young <dyoung@redhat.com>
|
||||
Cc: Don Zickus <dzickus@redhat.com>
|
||||
Cc: Harald Hoyer <harald@redhat.com>
|
||||
---
|
||||
modules.d/04watchdog/module-setup.sh | 28 ++++++++++++++++++++++++++++
|
||||
1 file changed, 28 insertions(+)
|
||||
|
||||
diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh
|
||||
index 7ec757a..0ffaa96 100755
|
||||
--- a/modules.d/04watchdog/module-setup.sh
|
||||
+++ b/modules.d/04watchdog/module-setup.sh
|
||||
@@ -32,3 +32,31 @@ install() {
|
||||
inst_multiple -o wdctl
|
||||
}
|
||||
|
||||
+installkernel() {
|
||||
+ [[ -d /sys/class/watchdog/ ]] || return
|
||||
+ for dir in /sys/class/watchdog/*; do
|
||||
+ [[ -d "$dir" ]] || continue
|
||||
+ [[ -f "$dir/state" ]] || continue
|
||||
+ active=$(< "$dir/state")
|
||||
+ ! [[ $hostonly ]] || [[ "$active" = "active" ]] || continue
|
||||
+ # device/modalias will return driver of this device
|
||||
+ wdtdrv=$(< "$dir/device/modalias")
|
||||
+ # There can be more than one module represented by same
|
||||
+ # modalias. Currently load all of them.
|
||||
+ # TODO: Need to find a way to avoid any unwanted module
|
||||
+ # represented by modalias
|
||||
+ wdtdrv=$(modprobe -R $wdtdrv)
|
||||
+ instmods $wdtdrv
|
||||
+ # however in some cases, we also need to check that if there is
|
||||
+ # a specific driver for the parent bus/device. In such cases
|
||||
+ # we also need to enable driver for parent bus/device.
|
||||
+ wdtppath=$(readlink -f "$dir/device/..")
|
||||
+ while [ -f "$wdtppath/modalias" ]
|
||||
+ do
|
||||
+ wdtpdrv=$(< "$wdtppath/modalias")
|
||||
+ wdtpdrv=$(modprobe -R $wdtpdrv)
|
||||
+ instmods $wdtpdrv
|
||||
+ wdtppath=$(readlink -f "$wdtppath/..")
|
||||
+ done
|
||||
+ done
|
||||
+}
|
@ -0,0 +1,56 @@
|
||||
From e343c85763e7b981a5e9b53b04f90f0d83bffaaf Mon Sep 17 00:00:00 2001
|
||||
From: Pratyush Anand <panand@redhat.com>
|
||||
Date: Wed, 16 Mar 2016 09:16:24 +0530
|
||||
Subject: [PATCH] watchdog: ensure that module is loaded as early as possible
|
||||
|
||||
It is expected that a watchdog module will disable an active watchdog when
|
||||
its probe is called ie, when it is loaded. So an early load of the module
|
||||
will help to disable it earlier.
|
||||
This can be helpful in some corner cases where kdump and watchdog daemon
|
||||
both are active.
|
||||
|
||||
Testing:
|
||||
-- When watchdog kernel modules were added
|
||||
# dracut --no-hostonly initramfs-test.img -a watchdog
|
||||
# lsinitrd initramfs-test.img -f etc/cmdline.d/00-watchdog.conf
|
||||
rd.driver.pre=iTCO_wdt,lpc_ich,
|
||||
|
||||
Signed-off-by: Pratyush Anand <panand@redhat.com>
|
||||
Cc: Dave Young <dyoung@redhat.com>
|
||||
Cc: Don Zickus <dzickus@redhat.com>
|
||||
Cc: Harald Hoyer <harald@redhat.com>
|
||||
---
|
||||
modules.d/04watchdog/module-setup.sh | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh
|
||||
index 0ffaa96..c9da148 100755
|
||||
--- a/modules.d/04watchdog/module-setup.sh
|
||||
+++ b/modules.d/04watchdog/module-setup.sh
|
||||
@@ -34,6 +34,7 @@ install() {
|
||||
|
||||
installkernel() {
|
||||
[[ -d /sys/class/watchdog/ ]] || return
|
||||
+ wdtcmdline=""
|
||||
for dir in /sys/class/watchdog/*; do
|
||||
[[ -d "$dir" ]] || continue
|
||||
[[ -f "$dir/state" ]] || continue
|
||||
@@ -47,6 +48,7 @@ installkernel() {
|
||||
# represented by modalias
|
||||
wdtdrv=$(modprobe -R $wdtdrv)
|
||||
instmods $wdtdrv
|
||||
+ wdtcmdline="$wdtcmdline$(echo $wdtdrv | tr " " ","),"
|
||||
# however in some cases, we also need to check that if there is
|
||||
# a specific driver for the parent bus/device. In such cases
|
||||
# we also need to enable driver for parent bus/device.
|
||||
@@ -56,7 +58,10 @@ installkernel() {
|
||||
wdtpdrv=$(< "$wdtppath/modalias")
|
||||
wdtpdrv=$(modprobe -R $wdtpdrv)
|
||||
instmods $wdtpdrv
|
||||
+ wdtcmdline="$wdtcmdline$(echo $wdtpdrv | tr " " ","),"
|
||||
wdtppath=$(readlink -f "$wdtppath/..")
|
||||
done
|
||||
done
|
||||
+ # ensure that watchdog module is loaded as early as possible
|
||||
+ [[ $wdtcmdline = "" ]] || echo "rd.driver.pre=$wdtcmdline" > ${initdir}/etc/cmdline.d/00-watchdog.conf
|
||||
}
|
130
0039-lsinitrd-add-unpack-to-lsinitrd.patch
Normal file
130
0039-lsinitrd-add-unpack-to-lsinitrd.patch
Normal file
@ -0,0 +1,130 @@
|
||||
From 97bbba6938fc22605026b4cff3c5cc524c7bdf38 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Thu, 17 Mar 2016 14:45:24 +0100
|
||||
Subject: [PATCH] lsinitrd: add "--unpack" to lsinitrd
|
||||
|
||||
also "--unpackearly" and "--verbose"
|
||||
---
|
||||
lsinitrd.1.asc | 9 +++++++++
|
||||
lsinitrd.sh | 43 ++++++++++++++++++++++++++++++++-----------
|
||||
2 files changed, 41 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/lsinitrd.1.asc b/lsinitrd.1.asc
|
||||
index 4293910..b6a704c 100644
|
||||
--- a/lsinitrd.1.asc
|
||||
+++ b/lsinitrd.1.asc
|
||||
@@ -34,6 +34,15 @@ OPTIONS
|
||||
**-k, --kver** _<kernel version>_::
|
||||
inspect the initramfs of <kernel version>.
|
||||
|
||||
+**--unpack**::
|
||||
+ unpack the initramfs to the current directory, instead of displaying the contents.
|
||||
+
|
||||
+**--unpackearly**::
|
||||
+ unpack the early microcode initramfs to the current directory, instead of displaying the contents.
|
||||
+
|
||||
+**-v, --verbose**::
|
||||
+ unpack verbosely
|
||||
+
|
||||
AVAILABILITY
|
||||
------------
|
||||
The lsinitrd command is part of the dracut package and is available from
|
||||
diff --git a/lsinitrd.sh b/lsinitrd.sh
|
||||
index 441fb92..224b9c1 100755
|
||||
--- a/lsinitrd.sh
|
||||
+++ b/lsinitrd.sh
|
||||
@@ -27,6 +27,9 @@ usage()
|
||||
echo "-s, --size sort the contents of the initramfs by size."
|
||||
echo "-m, --mod list modules."
|
||||
echo "-f, --file <filename> print the contents of <filename>."
|
||||
+ echo "--unpack unpack the initramfs, instead of displaying the contents."
|
||||
+ echo "--unpackearly unpack the early microcode part of the initramfs."
|
||||
+ echo "-v, --verbose unpack verbosely."
|
||||
echo "-k, --kver <kernel version> inspect the initramfs of <kernel version>."
|
||||
echo
|
||||
} >&2
|
||||
@@ -37,16 +40,21 @@ usage()
|
||||
|
||||
sorted=0
|
||||
modules=0
|
||||
+unpack=0
|
||||
+unset verbose
|
||||
declare -A filenames
|
||||
|
||||
unset POSIXLY_CORRECT
|
||||
TEMP=$(getopt \
|
||||
- -o "shmf:k:" \
|
||||
+ -o "vshmf:k:" \
|
||||
--long kver: \
|
||||
--long file: \
|
||||
--long mod \
|
||||
--long help \
|
||||
--long size \
|
||||
+ --long unpack \
|
||||
+ --long unpackearly \
|
||||
+ --long verbose \
|
||||
-- "$@")
|
||||
|
||||
if (( $? != 0 )); then
|
||||
@@ -58,13 +66,16 @@ eval set -- "$TEMP"
|
||||
|
||||
while (($# > 0)); do
|
||||
case $1 in
|
||||
- -k|--kver) KERNEL_VERSION="$2"; shift;;
|
||||
- -f|--file) filenames[${2#/}]=1; shift;;
|
||||
- -s|--size) sorted=1;;
|
||||
- -h|--help) usage; exit 0;;
|
||||
- -m|--mod) modules=1;;
|
||||
- --) shift;break;;
|
||||
- *) usage; exit 1;;
|
||||
+ -k|--kver) KERNEL_VERSION="$2"; shift;;
|
||||
+ -f|--file) filenames[${2#/}]=1; shift;;
|
||||
+ -s|--size) sorted=1;;
|
||||
+ -h|--help) usage; exit 0;;
|
||||
+ -m|--mod) modules=1;;
|
||||
+ -v|--verbose) verbose="--verbose";;
|
||||
+ --unpack) unpack=1;;
|
||||
+ --unpackearly) unpackearly=1;;
|
||||
+ --) shift;break;;
|
||||
+ *) usage; exit 1;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
@@ -147,8 +158,14 @@ list_files()
|
||||
echo "========================================================================"
|
||||
}
|
||||
|
||||
+unpack_files()
|
||||
+{
|
||||
+ $CAT "$image" | cpio -id --quiet $verbose
|
||||
+ ((ret+=$?))
|
||||
+}
|
||||
+
|
||||
|
||||
-if (( ${#filenames[@]} <= 0 )); then
|
||||
+if (( ${#filenames[@]} <= 0 )) && [[ -z "$unpack" ]] && [[ -z "$unpackearly" ]]; then
|
||||
echo "Image: $image: $(du -h $image | while read a b || [ -n "$a" ]; do echo $a;done)"
|
||||
echo "========================================================================"
|
||||
fi
|
||||
@@ -159,7 +176,9 @@ case $bin in
|
||||
CAT="cat --"
|
||||
is_early=$(cpio --extract --verbose --quiet --to-stdout -- 'early_cpio' < "$image" 2>/dev/null)
|
||||
if [[ "$is_early" ]]; then
|
||||
- if (( ${#filenames[@]} > 0 )); then
|
||||
+ if [[ -n "$unpackearly" ]]; then
|
||||
+ unpack_files
|
||||
+ elif (( ${#filenames[@]} > 0 )); then
|
||||
extract_files
|
||||
else
|
||||
echo "Early CPIO image"
|
||||
@@ -218,7 +237,9 @@ fi
|
||||
|
||||
ret=0
|
||||
|
||||
-if (( ${#filenames[@]} > 0 )); then
|
||||
+if [[ -n "$unpack" ]]; then
|
||||
+ unpack_files
|
||||
+elif (( ${#filenames[@]} > 0 )); then
|
||||
extract_files
|
||||
else
|
||||
version=$($CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- \
|
172
0040-Do-not-use-deprecated-egrep-fgrep.patch
Normal file
172
0040-Do-not-use-deprecated-egrep-fgrep.patch
Normal file
@ -0,0 +1,172 @@
|
||||
From 9430ae301e3599d355e8b128a7faffa81dade6ff Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
|
||||
Date: Mon, 28 Mar 2016 11:38:34 +0300
|
||||
Subject: [PATCH] Do not use deprecated egrep/fgrep
|
||||
|
||||
---
|
||||
dracut-init.sh | 8 ++++----
|
||||
install/dracut-install.c | 2 +-
|
||||
modules.d/00systemd/module-setup.sh | 10 +++++-----
|
||||
modules.d/02systemd-networkd/module-setup.sh | 8 ++++----
|
||||
modules.d/95debug/module-setup.sh | 2 +-
|
||||
modules.d/95nfs/module-setup.sh | 8 ++++----
|
||||
modules.d/95udev-rules/module-setup.sh | 4 ++--
|
||||
modules.d/99base/module-setup.sh | 4 ++--
|
||||
test/TEST-04-FULL-SYSTEMD/test.sh | 2 +-
|
||||
9 files changed, 24 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/dracut-init.sh b/dracut-init.sh
|
||||
index fc35d7b..a67aca2 100644
|
||||
--- a/dracut-init.sh
|
||||
+++ b/dracut-init.sh
|
||||
@@ -328,15 +328,15 @@ inst_rule_group_owner() {
|
||||
|
||||
if grep -qE 'OWNER=?"[^ "]+' "$1"; then
|
||||
for i in $(grep -E 'OWNER=?"[^ "]+' "$1" | sed -r 's/.*OWNER=?"([^ "]+).*/\1/'); do
|
||||
- if ! egrep -q "^$i:" "$initdir/etc/passwd" 2>/dev/null; then
|
||||
- egrep "^$i:" /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
|
||||
+ if ! grep -Eq "^$i:" "$initdir/etc/passwd" 2>/dev/null; then
|
||||
+ grep -E "^$i:" /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if grep -qE 'GROUP=?"[^ "]+' "$1"; then
|
||||
for i in $(grep -E 'GROUP=?"[^ "]+' "$1" | sed -r 's/.*GROUP=?"([^ "]+).*/\1/'); do
|
||||
- if ! egrep -q "^$i:" "$initdir/etc/group" 2>/dev/null; then
|
||||
- egrep "^$i:" /etc/group 2>/dev/null >> "$initdir/etc/group"
|
||||
+ if ! grep -Eq "^$i:" "$initdir/etc/group" 2>/dev/null; then
|
||||
+ grep -E "^$i:" /etc/group 2>/dev/null >> "$initdir/etc/group"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
diff --git a/install/dracut-install.c b/install/dracut-install.c
|
||||
index 8f65d8d..3b48ba8 100644
|
||||
--- a/install/dracut-install.c
|
||||
+++ b/install/dracut-install.c
|
||||
@@ -287,7 +287,7 @@ static int library_install(const char *src, const char *lib)
|
||||
|
||||
/* Also try to install the same library from one directory above.
|
||||
This fixes the case, where only the HWCAP lib would be installed
|
||||
- # ldconfig -p|fgrep libc.so
|
||||
+ # ldconfig -p|grep -F libc.so
|
||||
libc.so.6 (libc6,64bit, hwcap: 0x0000001000000000, OS ABI: Linux 2.6.32) => /lib64/power6/libc.so.6
|
||||
libc.so.6 (libc6,64bit, hwcap: 0x0000000000000200, OS ABI: Linux 2.6.32) => /lib64/power6x/libc.so.6
|
||||
libc.so.6 (libc6,64bit, OS ABI: Linux 2.6.32) => /lib64/libc.so.6
|
||||
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
|
||||
index ed59beb..deb5e06 100755
|
||||
--- a/modules.d/00systemd/module-setup.sh
|
||||
+++ b/modules.d/00systemd/module-setup.sh
|
||||
@@ -179,11 +179,11 @@ install() {
|
||||
|
||||
# install adm user/group for journald
|
||||
inst_multiple nologin
|
||||
- egrep '^systemd-journal:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
|
||||
- egrep '^adm:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
|
||||
- egrep '^systemd-journal:' /etc/group >> "$initdir/etc/group"
|
||||
- egrep '^wheel:' /etc/group >> "$initdir/etc/group"
|
||||
- egrep '^adm:' /etc/group >> "$initdir/etc/group"
|
||||
+ grep '^systemd-journal:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
|
||||
+ grep '^adm:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
|
||||
+ grep '^systemd-journal:' /etc/group >> "$initdir/etc/group"
|
||||
+ grep '^wheel:' /etc/group >> "$initdir/etc/group"
|
||||
+ grep '^adm:' /etc/group >> "$initdir/etc/group"
|
||||
|
||||
ln_r $systemdutildir/systemd "/init"
|
||||
ln_r $systemdutildir/systemd "/sbin/init"
|
||||
diff --git a/modules.d/02systemd-networkd/module-setup.sh b/modules.d/02systemd-networkd/module-setup.sh
|
||||
index 58842c0..b86751e 100755
|
||||
--- a/modules.d/02systemd-networkd/module-setup.sh
|
||||
+++ b/modules.d/02systemd-networkd/module-setup.sh
|
||||
@@ -48,10 +48,10 @@ install() {
|
||||
|
||||
# inst_dir /var/lib/systemd/clock
|
||||
|
||||
- egrep '^systemd-network:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
|
||||
- egrep '^systemd-network:' /etc/group >> "$initdir/etc/group"
|
||||
- # egrep '^systemd-timesync:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
|
||||
- # egrep '^systemd-timesync:' /etc/group >> "$initdir/etc/group"
|
||||
+ grep '^systemd-network:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
|
||||
+ grep '^systemd-network:' /etc/group >> "$initdir/etc/group"
|
||||
+ # grep '^systemd-timesync:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
|
||||
+ # grep '^systemd-timesync:' /etc/group >> "$initdir/etc/group"
|
||||
|
||||
_arch=$(uname -m)
|
||||
inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \
|
||||
diff --git a/modules.d/95debug/module-setup.sh b/modules.d/95debug/module-setup.sh
|
||||
index ce5e8e8..97b2a30 100755
|
||||
--- a/modules.d/95debug/module-setup.sh
|
||||
+++ b/modules.d/95debug/module-setup.sh
|
||||
@@ -18,6 +18,6 @@ install() {
|
||||
tcpdump cp less hostname mkdir \
|
||||
fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.vfat e2fsck
|
||||
|
||||
- egrep '^tcpdump:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
|
||||
+ grep '^tcpdump:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
|
||||
}
|
||||
|
||||
diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh
|
||||
index 9b5b8c8..aefbc2a 100755
|
||||
--- a/modules.d/95nfs/module-setup.sh
|
||||
+++ b/modules.d/95nfs/module-setup.sh
|
||||
@@ -105,14 +105,14 @@ install() {
|
||||
|
||||
# Rather than copy the passwd file in, just set a user for rpcbind
|
||||
# We'll save the state and restart the daemon from the root anyway
|
||||
- egrep '^nfsnobody:|^rpc:|^rpcuser:' /etc/passwd >> "$initdir/etc/passwd"
|
||||
- egrep '^nogroup:|^rpc:|^nobody:' /etc/group >> "$initdir/etc/group"
|
||||
+ grep -E '^nfsnobody:|^rpc:|^rpcuser:' /etc/passwd >> "$initdir/etc/passwd"
|
||||
+ grep -E '^nogroup:|^rpc:|^nobody:' /etc/group >> "$initdir/etc/group"
|
||||
|
||||
# rpc user needs to be able to write to this directory to save the warmstart
|
||||
# file
|
||||
chmod 770 "$initdir/var/lib/rpcbind"
|
||||
- egrep -q '^rpc:' /etc/passwd \
|
||||
- && egrep -q '^rpc:' /etc/group \
|
||||
+ grep -q '^rpc:' /etc/passwd \
|
||||
+ && grep -q '^rpc:' /etc/group \
|
||||
&& chown rpc.rpc "$initdir/var/lib/rpcbind"
|
||||
dracut_need_initqueue
|
||||
}
|
||||
diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh
|
||||
index 6a0625a..a59eca2 100755
|
||||
--- a/modules.d/95udev-rules/module-setup.sh
|
||||
+++ b/modules.d/95udev-rules/module-setup.sh
|
||||
@@ -63,8 +63,8 @@ install() {
|
||||
|
||||
{
|
||||
for i in cdrom tape dialout floppy; do
|
||||
- if ! egrep -q "^$i:" "$initdir/etc/group" 2>/dev/null; then
|
||||
- if ! egrep "^$i:" /etc/group 2>/dev/null; then
|
||||
+ if ! grep -q "^$i:" "$initdir/etc/group" 2>/dev/null; then
|
||||
+ if ! grep "^$i:" /etc/group 2>/dev/null; then
|
||||
case $i in
|
||||
cdrom) echo "$i:x:11:";;
|
||||
dialout) echo "$i:x:18:";;
|
||||
diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh
|
||||
index cc94d00..5fbf6f7 100755
|
||||
--- a/modules.d/99base/module-setup.sh
|
||||
+++ b/modules.d/99base/module-setup.sh
|
||||
@@ -27,8 +27,8 @@ install() {
|
||||
fi
|
||||
|
||||
#add common users in /etc/passwd, it will be used by nfs/ssh currently
|
||||
- egrep '^root:' "$initdir/etc/passwd" 2>/dev/null || echo 'root:x:0:0::/root:/bin/sh' >> "$initdir/etc/passwd"
|
||||
- egrep '^nobody:' /etc/passwd >> "$initdir/etc/passwd"
|
||||
+ grep '^root:' "$initdir/etc/passwd" 2>/dev/null || echo 'root:x:0:0::/root:/bin/sh' >> "$initdir/etc/passwd"
|
||||
+ grep '^nobody:' /etc/passwd >> "$initdir/etc/passwd"
|
||||
|
||||
# install our scripts and hooks
|
||||
inst_script "$moddir/init.sh" "/init"
|
||||
diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh
|
||||
index f5a9d48..c7e08bf 100755
|
||||
--- a/test/TEST-04-FULL-SYSTEMD/test.sh
|
||||
+++ b/test/TEST-04-FULL-SYSTEMD/test.sh
|
||||
@@ -197,7 +197,7 @@ EOF
|
||||
ln -fs /proc/self/mounts $initdir/etc/mtab
|
||||
|
||||
# install any Execs from the service files
|
||||
- egrep -ho '^Exec[^ ]*=[^ ]+' $initdir/lib/systemd/system/*.service \
|
||||
+ grep -Eho '^Exec[^ ]*=[^ ]+' $initdir/lib/systemd/system/*.service \
|
||||
| while read i || [ -n "$i" ]; do
|
||||
i=${i##Exec*=}; i=${i##-}
|
||||
inst_multiple -o $i
|
@ -0,0 +1,22 @@
|
||||
From dec3dfa4b3215e08581794bd76591023ed7984c8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
|
||||
Date: Mon, 28 Mar 2016 11:39:36 +0300
|
||||
Subject: [PATCH] nfs/module-setup.sh: Use colon instead of dot for chown
|
||||
user/group separator
|
||||
|
||||
---
|
||||
modules.d/95nfs/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh
|
||||
index aefbc2a..6f039bd 100755
|
||||
--- a/modules.d/95nfs/module-setup.sh
|
||||
+++ b/modules.d/95nfs/module-setup.sh
|
||||
@@ -113,6 +113,6 @@ install() {
|
||||
chmod 770 "$initdir/var/lib/rpcbind"
|
||||
grep -q '^rpc:' /etc/passwd \
|
||||
&& grep -q '^rpc:' /etc/group \
|
||||
- && chown rpc.rpc "$initdir/var/lib/rpcbind"
|
||||
+ && chown rpc:rpc "$initdir/var/lib/rpcbind"
|
||||
dracut_need_initqueue
|
||||
}
|
64
0042-Clean-up-some-bashisms-from-bin-sh-scripts.patch
Normal file
64
0042-Clean-up-some-bashisms-from-bin-sh-scripts.patch
Normal file
@ -0,0 +1,64 @@
|
||||
From bcabe0fe2570d8cd39ab6af380bce44f13092450 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
|
||||
Date: Mon, 28 Mar 2016 11:52:14 +0300
|
||||
Subject: [PATCH] Clean up some bashisms from /bin/sh scripts
|
||||
|
||||
---
|
||||
modules.d/40network/dhclient-script.sh | 2 +-
|
||||
modules.d/40network/ifup.sh | 2 +-
|
||||
modules.d/95fcoe/fcoe-edd.sh | 2 +-
|
||||
modules.d/95nfs/nfs-lib.sh | 2 +-
|
||||
4 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh
|
||||
index 13d2dc2..94ee9d1 100755
|
||||
--- a/modules.d/40network/dhclient-script.sh
|
||||
+++ b/modules.d/40network/dhclient-script.sh
|
||||
@@ -95,7 +95,7 @@ setup_interface6() {
|
||||
[ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
|
||||
}
|
||||
|
||||
-function parse_option_121() {
|
||||
+parse_option_121() {
|
||||
while [ $# -ne 0 ]; do
|
||||
mask="$1"
|
||||
shift
|
||||
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
|
||||
index 7c179bd..1185523 100755
|
||||
--- a/modules.d/40network/ifup.sh
|
||||
+++ b/modules.d/40network/ifup.sh
|
||||
@@ -277,7 +277,7 @@ if [ -z "$NO_TEAM_MASTER" ]; then
|
||||
for slave in $teamslaves ; do
|
||||
ip link set $slave up 2>/dev/null
|
||||
if wait_for_if_up $slave; then
|
||||
- working_slaves+="$slave "
|
||||
+ working_slaves="$working_slaves$slave "
|
||||
fi
|
||||
done
|
||||
# Do not add slaves now
|
||||
diff --git a/modules.d/95fcoe/fcoe-edd.sh b/modules.d/95fcoe/fcoe-edd.sh
|
||||
index 3b07ad3..1e002d3 100755
|
||||
--- a/modules.d/95fcoe/fcoe-edd.sh
|
||||
+++ b/modules.d/95fcoe/fcoe-edd.sh
|
||||
@@ -29,7 +29,7 @@ for disk in /sys/firmware/edd/int13_*; do
|
||||
driver=${driver##*/}
|
||||
fi
|
||||
# i40e uses dev_port 1 for a virtual fcoe function
|
||||
- if [ "${driver}" == "i40e" ]; then
|
||||
+ if [ "${driver}" = "i40e" ]; then
|
||||
dev_port=1
|
||||
fi
|
||||
for nic in "${disk}"/pci_dev/net/*; do
|
||||
diff --git a/modules.d/95nfs/nfs-lib.sh b/modules.d/95nfs/nfs-lib.sh
|
||||
index 58aa7e3..67608b1 100755
|
||||
--- a/modules.d/95nfs/nfs-lib.sh
|
||||
+++ b/modules.d/95nfs/nfs-lib.sh
|
||||
@@ -110,7 +110,7 @@ nfsroot_from_dhcp() {
|
||||
[ -f $f ] && . $f
|
||||
done
|
||||
[ -n "$new_root_path" ] && nfsroot_to_var "$nfs:$new_root_path"
|
||||
- [ -z "$path" ] && [ "$(getarg root=)" == "/dev/nfs" ] && path=/tftpboot/%s
|
||||
+ [ -z "$path" ] && [ "$(getarg root=)" = "/dev/nfs" ] && path=/tftpboot/%s
|
||||
[ -z "$server" ] && server=$srv
|
||||
[ -z "$server" ] && server=$new_dhcp_server_identifier
|
||||
[ -z "$server" ] && server=$new_next_server
|
131
0043-dracut-init.sh-Simplify-udev-rule-grepping.patch
Normal file
131
0043-dracut-init.sh-Simplify-udev-rule-grepping.patch
Normal file
@ -0,0 +1,131 @@
|
||||
From 06a1d0769055f437c938edd40bd9fbd622475864 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
|
||||
Date: Mon, 28 Mar 2016 12:09:06 +0300
|
||||
Subject: [PATCH] dracut-init.sh: Simplify udev rule grepping
|
||||
|
||||
---
|
||||
dracut-init.sh | 102 ++++++++++++++++++++++++++-------------------------------
|
||||
1 file changed, 46 insertions(+), 56 deletions(-)
|
||||
|
||||
diff --git a/dracut-init.sh b/dracut-init.sh
|
||||
index a67aca2..b176421 100644
|
||||
--- a/dracut-init.sh
|
||||
+++ b/dracut-init.sh
|
||||
@@ -275,71 +275,61 @@ rev_lib_symlinks() {
|
||||
inst_rule_programs() {
|
||||
local _prog _bin
|
||||
|
||||
- if grep -qE 'PROGRAM==?"[^ "]+' "$1"; then
|
||||
- for _prog in $(grep -E 'PROGRAM==?"[^ "]+' "$1" | sed -r 's/.*PROGRAM==?"([^ "]+).*/\1/'); do
|
||||
- _bin=""
|
||||
- if [ -x ${udevdir}/$_prog ]; then
|
||||
- _bin=${udevdir}/$_prog
|
||||
- elif [[ "${_prog/\$env\{/}" == "$_prog" ]]; then
|
||||
- _bin=$(find_binary "$_prog") || {
|
||||
- dinfo "Skipping program $_prog using in udev rule ${1##*/} as it cannot be found"
|
||||
- continue;
|
||||
- }
|
||||
- fi
|
||||
+ for _prog in $(sed -nr 's/.*PROGRAM==?"([^ "]+).*/\1/p'); do
|
||||
+ _bin=""
|
||||
+ if [ -x ${udevdir}/$_prog ]; then
|
||||
+ _bin=${udevdir}/$_prog
|
||||
+ elif [[ "${_prog/\$env\{/}" == "$_prog" ]]; then
|
||||
+ _bin=$(find_binary "$_prog") || {
|
||||
+ dinfo "Skipping program $_prog using in udev rule ${1##*/} as it cannot be found"
|
||||
+ continue;
|
||||
+ }
|
||||
+ fi
|
||||
|
||||
- [[ $_bin ]] && inst_binary "$_bin"
|
||||
- done
|
||||
- fi
|
||||
- if grep -qE 'RUN[+=]=?"[^ "]+' "$1"; then
|
||||
- for _prog in $(grep -E 'RUN[+=]=?"[^ "]+' "$1" | sed -r 's/.*RUN[+=]=?"([^ "]+).*/\1/'); do
|
||||
- _bin=""
|
||||
- if [ -x ${udevdir}/$_prog ]; then
|
||||
- _bin=${udevdir}/$_prog
|
||||
- elif [[ "${_prog/\$env\{/}" == "$_prog" ]] && [[ "${_prog}" != "/sbin/initqueue" ]]; then
|
||||
- _bin=$(find_binary "$_prog") || {
|
||||
- dinfo "Skipping program $_prog using in udev rule ${1##*/} as it cannot be found"
|
||||
- continue;
|
||||
- }
|
||||
- fi
|
||||
+ [[ $_bin ]] && inst_binary "$_bin"
|
||||
+ done
|
||||
+ for _prog in $(sed -nr 's/.*RUN[+=]=?"([^ "]+).*/\1/p'); do
|
||||
+ _bin=""
|
||||
+ if [ -x ${udevdir}/$_prog ]; then
|
||||
+ _bin=${udevdir}/$_prog
|
||||
+ elif [[ "${_prog/\$env\{/}" == "$_prog" ]] && [[ "${_prog}" != "/sbin/initqueue" ]]; then
|
||||
+ _bin=$(find_binary "$_prog") || {
|
||||
+ dinfo "Skipping program $_prog using in udev rule ${1##*/} as it cannot be found"
|
||||
+ continue;
|
||||
+ }
|
||||
+ fi
|
||||
|
||||
- [[ $_bin ]] && inst_binary "$_bin"
|
||||
- done
|
||||
- fi
|
||||
- if grep -qE 'IMPORT\{program\}==?"[^ "]+' "$1"; then
|
||||
- for _prog in $(grep -E 'IMPORT\{program\}==?"[^ "]+' "$1" | sed -r 's/.*IMPORT\{program\}==?"([^ "]+).*/\1/'); do
|
||||
- _bin=""
|
||||
- if [ -x ${udevdir}/$_prog ]; then
|
||||
- _bin=${udevdir}/$_prog
|
||||
- elif [[ "${_prog/\$env\{/}" == "$_prog" ]]; then
|
||||
- _bin=$(find_binary "$_prog") || {
|
||||
- dinfo "Skipping program $_prog using in udev rule ${1##*/} as it cannot be found"
|
||||
- continue;
|
||||
- }
|
||||
- fi
|
||||
+ [[ $_bin ]] && inst_binary "$_bin"
|
||||
+ done
|
||||
+ for _prog in $(sed -nr 's/.*IMPORT\{program\}==?"([^ "]+).*/\1/p'); do
|
||||
+ _bin=""
|
||||
+ if [ -x ${udevdir}/$_prog ]; then
|
||||
+ _bin=${udevdir}/$_prog
|
||||
+ elif [[ "${_prog/\$env\{/}" == "$_prog" ]]; then
|
||||
+ _bin=$(find_binary "$_prog") || {
|
||||
+ dinfo "Skipping program $_prog using in udev rule ${1##*/} as it cannot be found"
|
||||
+ continue;
|
||||
+ }
|
||||
+ fi
|
||||
|
||||
- [[ $_bin ]] && dracut_install "$_bin"
|
||||
- done
|
||||
- fi
|
||||
+ [[ $_bin ]] && dracut_install "$_bin"
|
||||
+ done
|
||||
}
|
||||
|
||||
# attempt to install any programs specified in a udev rule
|
||||
inst_rule_group_owner() {
|
||||
local i
|
||||
|
||||
- if grep -qE 'OWNER=?"[^ "]+' "$1"; then
|
||||
- for i in $(grep -E 'OWNER=?"[^ "]+' "$1" | sed -r 's/.*OWNER=?"([^ "]+).*/\1/'); do
|
||||
- if ! grep -Eq "^$i:" "$initdir/etc/passwd" 2>/dev/null; then
|
||||
- grep -E "^$i:" /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
|
||||
- fi
|
||||
- done
|
||||
- fi
|
||||
- if grep -qE 'GROUP=?"[^ "]+' "$1"; then
|
||||
- for i in $(grep -E 'GROUP=?"[^ "]+' "$1" | sed -r 's/.*GROUP=?"([^ "]+).*/\1/'); do
|
||||
- if ! grep -Eq "^$i:" "$initdir/etc/group" 2>/dev/null; then
|
||||
- grep -E "^$i:" /etc/group 2>/dev/null >> "$initdir/etc/group"
|
||||
- fi
|
||||
- done
|
||||
- fi
|
||||
+ for i in $(sed -nr 's/.*OWNER=?"([^ "]+).*/\1/p'); do
|
||||
+ if ! grep -Eq "^$i:" "$initdir/etc/passwd" 2>/dev/null; then
|
||||
+ grep -E "^$i:" /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
|
||||
+ fi
|
||||
+ done
|
||||
+ for i in $(sed -nr 's/.*GROUP=?"([^ "]+).*/\1/p' "$1"); do
|
||||
+ if ! grep -Eq "^$i:" "$initdir/etc/group" 2>/dev/null; then
|
||||
+ grep -E "^$i:" /etc/group 2>/dev/null >> "$initdir/etc/group"
|
||||
+ fi
|
||||
+ done
|
||||
}
|
||||
|
||||
inst_rule_initqueue() {
|
26
0044-dracut.sh-call-dracut-install-with-f-in-FIPS-mode.patch
Normal file
26
0044-dracut.sh-call-dracut-install-with-f-in-FIPS-mode.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From f7f5b82b4323210efc343132e3ae8fa91b26a68d Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Mon, 21 Mar 2016 11:56:50 +0100
|
||||
Subject: [PATCH] dracut.sh: call dracut-install with "-f" in FIPS mode
|
||||
|
||||
in fips mode, dracut-install was called with "-H" instead of "-f" in
|
||||
FIPS mode
|
||||
|
||||
missed conversion of commit 26cd262a6a575a50ea384a2ceac6a6829efe8106
|
||||
---
|
||||
dracut.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index 98dbe0b..37ae350 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -1496,7 +1496,7 @@ if [[ $kernel_only != yes ]]; then
|
||||
if [[ $DRACUT_RESOLVE_LAZY ]] && [[ $DRACUT_INSTALL ]]; then
|
||||
dinfo "*** Resolving executable dependencies ***"
|
||||
find "$initdir" -type f -perm /0111 -not -path '*.ko' -print0 \
|
||||
- | xargs -r -0 $DRACUT_INSTALL ${initdir:+-D "$initdir"} -R ${DRACUT_FIPS_MODE:+-H} --
|
||||
+ | xargs -r -0 $DRACUT_INSTALL ${initdir:+-D "$initdir"} -R ${DRACUT_FIPS_MODE:+-f} --
|
||||
dinfo "*** Resolving executable dependencies done***"
|
||||
fi
|
||||
|
50
0045-dracut-init.sh-Add-file-argument-to-sed-s.patch
Normal file
50
0045-dracut-init.sh-Add-file-argument-to-sed-s.patch
Normal file
@ -0,0 +1,50 @@
|
||||
From 374ef3ed2bff30db35126dd694b4234709398a2f Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Mon, 11 Apr 2016 13:36:06 +0200
|
||||
Subject: [PATCH] dracut-init.sh: Add file argument to sed's
|
||||
|
||||
fixup for 06a1d0769055f437c938edd40bd9fbd622475864
|
||||
---
|
||||
dracut-init.sh | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dracut-init.sh b/dracut-init.sh
|
||||
index b176421..2431171 100644
|
||||
--- a/dracut-init.sh
|
||||
+++ b/dracut-init.sh
|
||||
@@ -275,7 +275,7 @@ rev_lib_symlinks() {
|
||||
inst_rule_programs() {
|
||||
local _prog _bin
|
||||
|
||||
- for _prog in $(sed -nr 's/.*PROGRAM==?"([^ "]+).*/\1/p'); do
|
||||
+ for _prog in $(sed -nr 's/.*PROGRAM==?"([^ "]+).*/\1/p' "$1"); do
|
||||
_bin=""
|
||||
if [ -x ${udevdir}/$_prog ]; then
|
||||
_bin=${udevdir}/$_prog
|
||||
@@ -288,7 +288,7 @@ inst_rule_programs() {
|
||||
|
||||
[[ $_bin ]] && inst_binary "$_bin"
|
||||
done
|
||||
- for _prog in $(sed -nr 's/.*RUN[+=]=?"([^ "]+).*/\1/p'); do
|
||||
+ for _prog in $(sed -nr 's/.*RUN[+=]=?"([^ "]+).*/\1/p' "$1"); do
|
||||
_bin=""
|
||||
if [ -x ${udevdir}/$_prog ]; then
|
||||
_bin=${udevdir}/$_prog
|
||||
@@ -301,7 +301,7 @@ inst_rule_programs() {
|
||||
|
||||
[[ $_bin ]] && inst_binary "$_bin"
|
||||
done
|
||||
- for _prog in $(sed -nr 's/.*IMPORT\{program\}==?"([^ "]+).*/\1/p'); do
|
||||
+ for _prog in $(sed -nr 's/.*IMPORT\{program\}==?"([^ "]+).*/\1/p' "$1"); do
|
||||
_bin=""
|
||||
if [ -x ${udevdir}/$_prog ]; then
|
||||
_bin=${udevdir}/$_prog
|
||||
@@ -320,7 +320,7 @@ inst_rule_programs() {
|
||||
inst_rule_group_owner() {
|
||||
local i
|
||||
|
||||
- for i in $(sed -nr 's/.*OWNER=?"([^ "]+).*/\1/p'); do
|
||||
+ for i in $(sed -nr 's/.*OWNER=?"([^ "]+).*/\1/p' "$1"); do
|
||||
if ! grep -Eq "^$i:" "$initdir/etc/passwd" 2>/dev/null; then
|
||||
grep -E "^$i:" /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
|
||||
fi
|
34
0046-lsinitrd.sh-fixed-unpack-and-skipcpio-search.patch
Normal file
34
0046-lsinitrd.sh-fixed-unpack-and-skipcpio-search.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From 98fd06934c9e10567b4755714191cd2aee8822ac Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Mon, 11 Apr 2016 15:22:11 +0200
|
||||
Subject: [PATCH] lsinitrd.sh: fixed unpack and skipcpio search
|
||||
|
||||
---
|
||||
lsinitrd.sh | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lsinitrd.sh b/lsinitrd.sh
|
||||
index 224b9c1..b19a66a 100755
|
||||
--- a/lsinitrd.sh
|
||||
+++ b/lsinitrd.sh
|
||||
@@ -40,7 +40,6 @@ usage()
|
||||
|
||||
sorted=0
|
||||
modules=0
|
||||
-unpack=0
|
||||
unset verbose
|
||||
declare -A filenames
|
||||
|
||||
@@ -184,7 +183,11 @@ case $bin in
|
||||
echo "Early CPIO image"
|
||||
list_files
|
||||
fi
|
||||
- SKIP="$dracutbasedir/skipcpio"
|
||||
+ if [[ -d "$dracutbasedir/skipcpio" ]]; then
|
||||
+ SKIP="$dracutbasedir/skipcpio/skipcpio"
|
||||
+ else
|
||||
+ SKIP="$dracutbasedir/skipcpio"
|
||||
+ fi
|
||||
if ! [[ -x $SKIP ]]; then
|
||||
echo
|
||||
echo "'$SKIP' not found, cannot display remaining contents!" >&2
|
78
0047-dracut-init.sh-mark-error-messages-with-FAILED.patch
Normal file
78
0047-dracut-init.sh-mark-error-messages-with-FAILED.patch
Normal file
@ -0,0 +1,78 @@
|
||||
From ff8f7026897edf1d0aa9c73b9f7a3d21b1b51da3 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Mon, 11 Apr 2016 15:22:56 +0200
|
||||
Subject: [PATCH] dracut-init.sh: mark error messages with FAILED
|
||||
|
||||
---
|
||||
dracut-init.sh | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dracut-init.sh b/dracut-init.sh
|
||||
index 2431171..a8b78ce 100644
|
||||
--- a/dracut-init.sh
|
||||
+++ b/dracut-init.sh
|
||||
@@ -168,7 +168,7 @@ fi
|
||||
inst_dir() {
|
||||
[[ -e ${initdir}/"$1" ]] && return 0 # already there
|
||||
$DRACUT_INSTALL ${initdir:+-D "$initdir"} -d "$@"
|
||||
- (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} -d "$@" || :
|
||||
+ (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} -d "$@" || :
|
||||
}
|
||||
|
||||
inst() {
|
||||
@@ -179,7 +179,7 @@ inst() {
|
||||
fi
|
||||
[[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there
|
||||
$DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"
|
||||
- (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
|
||||
+ (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
|
||||
}
|
||||
|
||||
inst_simple() {
|
||||
@@ -191,7 +191,7 @@ inst_simple() {
|
||||
[[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there
|
||||
[[ -e $1 ]] || return 1 # no source
|
||||
$DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${_hostonly_install:+-H} "$@"
|
||||
- (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${_hostonly_install:+-H} "$@" || :
|
||||
+ (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${_hostonly_install:+-H} "$@" || :
|
||||
}
|
||||
|
||||
inst_symlink() {
|
||||
@@ -203,14 +203,14 @@ inst_symlink() {
|
||||
[[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there
|
||||
[[ -L $1 ]] || return 1
|
||||
$DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"
|
||||
- (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
|
||||
+ (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
|
||||
}
|
||||
|
||||
inst_multiple() {
|
||||
local _ret
|
||||
$DRACUT_INSTALL ${initdir:+-D "$initdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@"
|
||||
_ret=$?
|
||||
- (($_ret != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
|
||||
+ (($_ret != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
|
||||
return $_ret
|
||||
}
|
||||
|
||||
@@ -227,17 +227,17 @@ inst_library() {
|
||||
[[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there
|
||||
[[ -e $1 ]] || return 1 # no source
|
||||
$DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"
|
||||
- (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
|
||||
+ (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
|
||||
}
|
||||
|
||||
inst_binary() {
|
||||
$DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@"
|
||||
- (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@" || :
|
||||
+ (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@" || :
|
||||
}
|
||||
|
||||
inst_script() {
|
||||
$DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@"
|
||||
- (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@" || :
|
||||
+ (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@" || :
|
||||
}
|
||||
|
||||
mark_hostonly() {
|
1372
0048-Use-dracut-install-to-install-kernel-modules.patch
Normal file
1372
0048-Use-dracut-install-to-install-kernel-modules.patch
Normal file
File diff suppressed because it is too large
Load Diff
94
0049-Use-pkg-config-for-libkmod-CFLAGS-and-LIBS.patch
Normal file
94
0049-Use-pkg-config-for-libkmod-CFLAGS-and-LIBS.patch
Normal file
@ -0,0 +1,94 @@
|
||||
From 607fec3e7965e3d38d764008e2b0c29757d90777 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Wed, 13 Apr 2016 11:13:32 +0200
|
||||
Subject: [PATCH] Use pkg-config for libkmod CFLAGS and LIBS
|
||||
|
||||
---
|
||||
Makefile | 4 ++--
|
||||
configure | 7 +++++++
|
||||
dracut.spec | 9 ++++++---
|
||||
3 files changed, 15 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 0a1ae6c..d28e4cf 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -12,7 +12,7 @@ pkglibdir ?= ${libdir}/dracut
|
||||
sysconfdir ?= ${prefix}/etc
|
||||
bindir ?= ${prefix}/bin
|
||||
mandir ?= ${prefix}/share/man
|
||||
-CFLAGS ?= -O2 -g -Wall
|
||||
+CFLAGS ?= -O2 -g -Wall $(KMOD_CFLAGS)
|
||||
CFLAGS += -std=gnu99 -D_FILE_OFFSET_BITS=64 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
|
||||
bashcompletiondir ?= ${datadir}/bash-completion/completions
|
||||
pkgconfigdatadir ?= $(datadir)/pkgconfig
|
||||
@@ -61,7 +61,7 @@ install/util.o: install/util.c install/util.h install/macro.h install/log.h
|
||||
install/strv.o: install/strv.c install/strv.h install/util.h install/macro.h install/log.h
|
||||
|
||||
install/dracut-install: $(DRACUT_INSTALL_OBJECTS)
|
||||
- $(CC) $(LDFLAGS) -o $@ $(DRACUT_INSTALL_OBJECTS) $(LDLIBS) -lkmod
|
||||
+ $(CC) $(LDFLAGS) -o $@ $(DRACUT_INSTALL_OBJECTS) $(LDLIBS) $(KMOD_LIBS)
|
||||
|
||||
dracut-install: install/dracut-install
|
||||
ln -fs $< $@
|
||||
diff --git a/configure b/configure
|
||||
index 0bd3d2d..c92cb99 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -50,6 +50,11 @@ while (($# > 0)); do
|
||||
shift
|
||||
done
|
||||
|
||||
+if ! pkg-config --exists --print-errors " libkmod >= 15 "; then
|
||||
+ echo "dracut needs pkg-config and libkmod >= 15." >&2
|
||||
+ exit 1
|
||||
+fi
|
||||
+
|
||||
cat > Makefile.inc.$$ <<EOF
|
||||
prefix ?= ${prefix}
|
||||
libdir ?= ${libdir:-${prefix}/lib}
|
||||
@@ -59,6 +64,8 @@ sbindir ?= ${sbindir:-${prefix}/sbin}
|
||||
mandir ?= ${mandir:-${prefix}/share/man}
|
||||
enable_documentation ?= ${enable_documentation:-yes}
|
||||
bindir ?= ${bindir:-${prefix}/bin}
|
||||
+KMOD_CFLAGS ?= $(pkg-config --cflags " libkmod >= 15 ")
|
||||
+KMOD_LIBS ?= $(pkg-config --libs " libkmod >= 15 ")
|
||||
EOF
|
||||
|
||||
{
|
||||
diff --git a/dracut.spec b/dracut.spec
|
||||
index 9e19fcc..7b9d675 100644
|
||||
--- a/dracut.spec
|
||||
+++ b/dracut.spec
|
||||
@@ -39,6 +39,7 @@ Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
|
||||
|
||||
|
||||
BuildRequires: bash git
|
||||
+BuildRequires: kmod-devel >= 15
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
@@ -46,7 +47,6 @@ BuildRequires: pkgconfig
|
||||
%endif
|
||||
%if 0%{?fedora}
|
||||
BuildRequires: bash-completion
|
||||
-BuildRequires: pkgconfig
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version}
|
||||
@@ -223,10 +223,13 @@ This package contains tools to assemble the local initrd and host configuration.
|
||||
cp %{SOURCE1} .
|
||||
|
||||
%build
|
||||
-%configure --systemdsystemunitdir=%{_unitdir} --bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion) --libdir=%{_prefix}/lib \
|
||||
+%configure --systemdsystemunitdir=%{_unitdir} \
|
||||
+ --bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion) \
|
||||
+ --libdir=%{_prefix}/lib \
|
||||
%if %{without doc}
|
||||
- --disable-documentation
|
||||
+ --disable-documentation \
|
||||
%endif
|
||||
+ ${NULL}
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
162
0050-Fix-regressions-with-dracut-install-with-kernel-modu.patch
Normal file
162
0050-Fix-regressions-with-dracut-install-with-kernel-modu.patch
Normal file
@ -0,0 +1,162 @@
|
||||
From 8d9ab2755d1341904ca7889f4e05b2151848a759 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Wed, 13 Apr 2016 11:47:20 +0200
|
||||
Subject: [PATCH] Fix regressions with dracut-install with kernel modules
|
||||
|
||||
Make sure, the same modules are installed as before.
|
||||
---
|
||||
install/dracut-install.c | 9 +++++----
|
||||
modules.d/50drm/module-setup.sh | 4 ++--
|
||||
modules.d/90kernel-modules/module-setup.sh | 15 ++++++++-------
|
||||
modules.d/90kernel-network-modules/module-setup.sh | 2 +-
|
||||
modules.d/90multipath/module-setup.sh | 2 +-
|
||||
modules.d/95iscsi/module-setup.sh | 2 +-
|
||||
6 files changed, 18 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/install/dracut-install.c b/install/dracut-install.c
|
||||
index a20e06c..c246201 100644
|
||||
--- a/install/dracut-install.c
|
||||
+++ b/install/dracut-install.c
|
||||
@@ -1202,6 +1202,7 @@ static int install_module(struct kmod_module *mod)
|
||||
if (!check_module_path(path) || !check_module_symbols(mod)) {
|
||||
log_debug("No symbol or patch match for '%s'", path);
|
||||
return 0;
|
||||
+ //return -ENOENT;
|
||||
}
|
||||
|
||||
log_debug("dracut_install '%s'", path);
|
||||
@@ -1295,7 +1296,7 @@ static int install_modules(int argc, char **argv)
|
||||
}
|
||||
kmod_list_foreach(itr, modlist) {
|
||||
mod = kmod_module_get_module(itr);
|
||||
- ret = install_module(mod);
|
||||
+ ret += install_module(mod);
|
||||
}
|
||||
kmod_module_unref_list(modlist);
|
||||
modlist = 0;
|
||||
@@ -1364,13 +1365,13 @@ static int install_modules(int argc, char **argv)
|
||||
}
|
||||
kmod_list_foreach(itr, modlist) {
|
||||
mod = kmod_module_get_module(itr);
|
||||
- ret = install_module(mod);
|
||||
+ ret += install_module(mod);
|
||||
kmod_module_unref(mod);
|
||||
}
|
||||
kmod_module_unref_list(modlist);
|
||||
modlist = 0;
|
||||
#else
|
||||
- ret = install_module(mod_o);
|
||||
+ ret += install_module(mod_o);
|
||||
kmod_module_unref(mod_o);
|
||||
#endif
|
||||
|
||||
@@ -1413,7 +1414,7 @@ static int install_modules(int argc, char **argv)
|
||||
}
|
||||
kmod_list_foreach(itr, modlist) {
|
||||
mod = kmod_module_get_module(itr);
|
||||
- ret = install_module(mod);
|
||||
+ ret += install_module(mod);
|
||||
kmod_module_unref(mod);
|
||||
}
|
||||
kmod_module_unref_list(modlist);
|
||||
diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh
|
||||
index e0b2959..661dde9 100755
|
||||
--- a/modules.d/50drm/module-setup.sh
|
||||
+++ b/modules.d/50drm/module-setup.sh
|
||||
@@ -34,8 +34,8 @@ installkernel() {
|
||||
if [[ $hostonly ]]; then
|
||||
for i in /sys/bus/{pci/devices,soc/devices/soc?}/*/modalias; do
|
||||
[[ -e $i ]] || continue
|
||||
- if hostonly="" dracut_instmods -s "drm_crtc_init" $(<$i) 2>/dev/null; then
|
||||
- if strstr $(modinfo -F filename $(<$i) 2>/dev/null) radeon.ko; then
|
||||
+ if hostonly="" dracut_instmods -s "drm_crtc_init" -S "iw_handler_get_spy" $(<$i) 2>/dev/null; then
|
||||
+ if strstr "$(modinfo -F filename $(<$i) 2>/dev/null)" radeon.ko; then
|
||||
hostonly='' instmods amdkfd
|
||||
fi
|
||||
fi
|
||||
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
|
||||
index e97d598..c30715d 100755
|
||||
--- a/modules.d/90kernel-modules/module-setup.sh
|
||||
+++ b/modules.d/90kernel-modules/module-setup.sh
|
||||
@@ -7,20 +7,21 @@ installkernel() {
|
||||
if [[ -z $drivers ]]; then
|
||||
hostonly='' instmods \
|
||||
sr_mod sd_mod scsi_dh ata_piix hid_generic unix \
|
||||
- ehci-hcd ehci-pci \
|
||||
+ ehci-hcd ehci-pci ehci-platform \
|
||||
ohci-hcd ohci-pci \
|
||||
uhci-hcd \
|
||||
xhci-hcd xhci-pci xhci-plat-hcd \
|
||||
- ehci-platform
|
||||
-
|
||||
- instmods \
|
||||
"=drivers/hid" \
|
||||
"=drivers/input/serio" \
|
||||
"=drivers/input/keyboard" \
|
||||
+ "=drivers/usb/storage" \
|
||||
+ ${NULL}
|
||||
+
|
||||
+ instmods \
|
||||
yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \
|
||||
atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus \
|
||||
virtio virtio_blk virtio_ring virtio_pci virtio_scsi \
|
||||
- "=drivers/pcmcia" =ide "=drivers/usb/storage"
|
||||
+ "=drivers/pcmcia" =ide
|
||||
|
||||
if [[ "$(uname -p)" == arm* ]]; then
|
||||
# arm specific modules
|
||||
@@ -33,13 +34,13 @@ installkernel() {
|
||||
${NULL}
|
||||
fi
|
||||
|
||||
- dracut_instmods -s "${_blockfuncs}" "=drivers"
|
||||
+ dracut_instmods -o -s "${_blockfuncs}" "=drivers"
|
||||
|
||||
# if not on hostonly mode, install all known filesystems,
|
||||
# if the required list is not set via the filesystems variable
|
||||
if ! [[ $hostonly ]]; then
|
||||
if [[ -z $filesystems ]]; then
|
||||
- dracut_instmods -P ".*/(kernel/fs/nfs|kernel/fs/nfsd|kernel/fs/lockd)/.*" '=fs'
|
||||
+ dracut_instmods -o -P ".*/(kernel/fs/nfs|kernel/fs/nfsd|kernel/fs/lockd)/.*" '=fs'
|
||||
fi
|
||||
else
|
||||
hostonly='' instmods "${host_fs_types[@]}"
|
||||
diff --git a/modules.d/90kernel-network-modules/module-setup.sh b/modules.d/90kernel-network-modules/module-setup.sh
|
||||
index c004ff8..11fbab9 100755
|
||||
--- a/modules.d/90kernel-network-modules/module-setup.sh
|
||||
+++ b/modules.d/90kernel-network-modules/module-setup.sh
|
||||
@@ -21,7 +21,7 @@ installkernel() {
|
||||
_s390drivers="=drivers/s390/net"
|
||||
fi
|
||||
|
||||
- dracut_instmods -P ".*${_unwanted_drivers}.*" -s "$_net_drivers" "=drivers/net" ${_s390drivers:+"$_s390drivers"}
|
||||
+ dracut_instmods -o -P ".*${_unwanted_drivers}.*" -s "$_net_drivers" "=drivers/net" ${_s390drivers:+"$_s390drivers"}
|
||||
|
||||
#instmods() will take care of hostonly
|
||||
instmods \
|
||||
diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh
|
||||
index 27817bd..0af777d 100755
|
||||
--- a/modules.d/90multipath/module-setup.sh
|
||||
+++ b/modules.d/90multipath/module-setup.sh
|
||||
@@ -58,7 +58,7 @@ installkernel() {
|
||||
_s390drivers="=drivers/s390/scsi"
|
||||
fi
|
||||
|
||||
- hostonly='' dracut_instmods -s "$_funcs" "=drivers/scsi" "=drivers/md" ${_s390drivers:+"$_s390drivers"}
|
||||
+ hostonly='' dracut_instmods -o -s "$_funcs" "=drivers/scsi" "=drivers/md" ${_s390drivers:+"$_s390drivers"}
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
|
||||
index 203e313..04937b5 100755
|
||||
--- a/modules.d/95iscsi/module-setup.sh
|
||||
+++ b/modules.d/95iscsi/module-setup.sh
|
||||
@@ -166,7 +166,7 @@ installkernel() {
|
||||
_s390drivers="=drivers/s390/scsi"
|
||||
fi
|
||||
|
||||
- dracut_instmods -s "$_funcs" "=drivers/scsi" ${_s390drivers:+"$_s390drivers"}
|
||||
+ dracut_instmods -o -s "$_funcs" "=drivers/scsi" ${_s390drivers:+"$_s390drivers"}
|
||||
|
||||
}
|
||||
|
159
0051-dracut-install-simplify-error-logic.patch
Normal file
159
0051-dracut-install-simplify-error-logic.patch
Normal file
@ -0,0 +1,159 @@
|
||||
From fe6e0c23adbdafc4fc371107534b3b2681c96393 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Wed, 13 Apr 2016 13:28:29 +0200
|
||||
Subject: [PATCH] dracut-install: simplify error logic
|
||||
|
||||
error out early, if "--optional" is not set
|
||||
---
|
||||
install/dracut-install.c | 64 +++++++++++++++++++++++++++++++++++-------------
|
||||
1 file changed, 47 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/install/dracut-install.c b/install/dracut-install.c
|
||||
index c246201..f414f30 100644
|
||||
--- a/install/dracut-install.c
|
||||
+++ b/install/dracut-install.c
|
||||
@@ -1181,8 +1181,10 @@ static int install_module(struct kmod_module *mod)
|
||||
state = kmod_module_get_initstate(mod);
|
||||
|
||||
name = kmod_module_get_name(mod);
|
||||
- if (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0))
|
||||
+ if (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0)) {
|
||||
+ log_debug("dracut_install '%s' is excluded", name);
|
||||
return 0;
|
||||
+ }
|
||||
|
||||
if (arg_hostonly && (state != KMOD_MODULE_BUILTIN) && (state != KMOD_MODULE_LIVE)) {
|
||||
log_debug("dracut_install '%s' not hostonly", name);
|
||||
@@ -1194,15 +1196,14 @@ static int install_module(struct kmod_module *mod)
|
||||
return -ENOENT;
|
||||
|
||||
if (check_hashmap(items_failed, path))
|
||||
- return 1;
|
||||
+ return -1;
|
||||
|
||||
if (check_hashmap(items, path))
|
||||
return 0;
|
||||
|
||||
if (!check_module_path(path) || !check_module_symbols(mod)) {
|
||||
log_debug("No symbol or patch match for '%s'", path);
|
||||
- return 0;
|
||||
- //return -ENOENT;
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
log_debug("dracut_install '%s'", path);
|
||||
@@ -1252,7 +1253,7 @@ static int install_modules(int argc, char **argv)
|
||||
|
||||
for (i = 0; i < argc; i++) {
|
||||
int r = 0;
|
||||
- int ret = 0;
|
||||
+ int ret = -1;
|
||||
log_debug("Handle module '%s'", argv[i]);
|
||||
|
||||
if (argv[i][0] == '/') {
|
||||
@@ -1296,7 +1297,14 @@ static int install_modules(int argc, char **argv)
|
||||
}
|
||||
kmod_list_foreach(itr, modlist) {
|
||||
mod = kmod_module_get_module(itr);
|
||||
- ret += install_module(mod);
|
||||
+ r = install_module(mod);
|
||||
+ kmod_module_unref(mod);
|
||||
+ if ((r < 0) && !arg_optional) {
|
||||
+ if (!arg_silent)
|
||||
+ log_error("ERROR: installing module '%s'", modname);
|
||||
+ return -ENOENT;
|
||||
+ };
|
||||
+ ret = ( ret == 0 ? 0 : r );
|
||||
}
|
||||
kmod_module_unref_list(modlist);
|
||||
modlist = 0;
|
||||
@@ -1341,40 +1349,55 @@ static int install_modules(int argc, char **argv)
|
||||
log_debug("Handling %s", ftsent->fts_accpath);
|
||||
r = kmod_module_new_from_path(ctx, ftsent->fts_accpath, &mod_o);
|
||||
if (r < 0) {
|
||||
- log_debug("Failed to lookup modules path '%s': %m", ftsent->fts_accpath);
|
||||
+ log_debug("Failed to lookup modules path '%s': %m",
|
||||
+ ftsent->fts_accpath);
|
||||
+ if (!arg_optional) {
|
||||
+ return -ENOENT;
|
||||
+ }
|
||||
continue;
|
||||
}
|
||||
-#if 1
|
||||
+
|
||||
/* Check, if we have to load another module with that name instead */
|
||||
modname = kmod_module_get_name(mod_o);
|
||||
if (!modname) {
|
||||
log_error("Failed to get name for module '%s'", ftsent->fts_accpath);
|
||||
+ if (!arg_optional) {
|
||||
+ return -ENOENT;
|
||||
+ }
|
||||
continue;
|
||||
}
|
||||
r = kmod_module_new_from_lookup(ctx, modname, &modlist);
|
||||
kmod_module_unref(mod_o);
|
||||
if (r < 0) {
|
||||
- log_error("2 Failed to lookup alias '%s': %m", modname);
|
||||
+ log_error("Failed to lookup alias '%s': %m", modname);
|
||||
kmod_module_unref_list(modlist);
|
||||
+ if (!arg_optional) {
|
||||
+ return -ENOENT;
|
||||
+ }
|
||||
continue;
|
||||
}
|
||||
if (!modlist) {
|
||||
- log_error("Failed to find module '%s' %s", modname, ftsent->fts_accpath);
|
||||
+ log_error("Failed to find module '%s' %s", modname,
|
||||
+ ftsent->fts_accpath);
|
||||
kmod_module_unref_list(modlist);
|
||||
+ if (!arg_optional) {
|
||||
+ return -ENOENT;
|
||||
+ }
|
||||
continue;
|
||||
}
|
||||
kmod_list_foreach(itr, modlist) {
|
||||
mod = kmod_module_get_module(itr);
|
||||
- ret += install_module(mod);
|
||||
+ r = install_module(mod);
|
||||
kmod_module_unref(mod);
|
||||
+ if ((r < 0) && !arg_optional) {
|
||||
+ if (!arg_silent)
|
||||
+ log_error("ERROR: installing module '%s'", modname);
|
||||
+ return -ENOENT;
|
||||
+ };
|
||||
+ ret = ( ret == 0 ? 0 : r );
|
||||
}
|
||||
kmod_module_unref_list(modlist);
|
||||
modlist = 0;
|
||||
-#else
|
||||
- ret += install_module(mod_o);
|
||||
- kmod_module_unref(mod_o);
|
||||
-#endif
|
||||
-
|
||||
}
|
||||
if (errno) {
|
||||
log_error("FTS ERROR: %m");
|
||||
@@ -1414,8 +1437,14 @@ static int install_modules(int argc, char **argv)
|
||||
}
|
||||
kmod_list_foreach(itr, modlist) {
|
||||
mod = kmod_module_get_module(itr);
|
||||
- ret += install_module(mod);
|
||||
+ r = install_module(mod);
|
||||
kmod_module_unref(mod);
|
||||
+ if ((r < 0) && !arg_optional) {
|
||||
+ if (!arg_silent)
|
||||
+ log_error("ERROR: installing '%s'", argv[i]);
|
||||
+ return -ENOENT;
|
||||
+ };
|
||||
+ ret = ( ret == 0 ? 0 : r );
|
||||
}
|
||||
kmod_module_unref_list(modlist);
|
||||
modlist = 0;
|
||||
@@ -1427,6 +1456,7 @@ static int install_modules(int argc, char **argv)
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
+
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
64
0052-dracut-init.sh-beautify-instmods.patch
Normal file
64
0052-dracut-init.sh-beautify-instmods.patch
Normal file
@ -0,0 +1,64 @@
|
||||
From 9bb030c5d8189f42eef3a0a881a361ce811414b0 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Wed, 13 Apr 2016 13:57:03 +0200
|
||||
Subject: [PATCH] dracut-init.sh: beautify instmods()
|
||||
|
||||
---
|
||||
dracut-init.sh | 31 ++++++++++++++++++++++++++++---
|
||||
1 file changed, 28 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dracut-init.sh b/dracut-init.sh
|
||||
index e26d97a..8d1d9fa 100644
|
||||
--- a/dracut-init.sh
|
||||
+++ b/dracut-init.sh
|
||||
@@ -1001,22 +1001,47 @@ instmods() {
|
||||
local _optional="-o"
|
||||
local _silent
|
||||
local _ret
|
||||
+
|
||||
[[ $no_kernel = yes ]] && return
|
||||
+
|
||||
if [[ $1 = '-c' ]]; then
|
||||
- _optional=""
|
||||
+ unset _optional
|
||||
shift
|
||||
fi
|
||||
if [[ $1 = '-s' ]]; then
|
||||
_silent=1
|
||||
shift
|
||||
fi
|
||||
+
|
||||
if (($# == 0)); then
|
||||
read -r -d '' -a args
|
||||
set -- "${args[@]}"
|
||||
fi
|
||||
- $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${_optional:+-o} ${_silent:+--silent} ${srcmods:+--kerneldir "$srcmods"} -m "$@"
|
||||
+
|
||||
+ $DRACUT_INSTALL \
|
||||
+ ${initdir:+-D "$initdir"} \
|
||||
+ ${loginstall:+-L "$loginstall"} \
|
||||
+ ${hostonly:+-H} \
|
||||
+ ${omit_drivers:+-N "$omit_drivers"} \
|
||||
+ ${srcmods:+--kerneldir "$srcmods"} \
|
||||
+ ${_optional:+-o} \
|
||||
+ ${_silent:+--silent} \
|
||||
+ -m "$@"
|
||||
_ret=$?
|
||||
- (($_ret != 0)) && [[ -z "$_silent" ]] && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${_optional:+-o} ${_silent:+--silent} ${srcmods:+--kerneldir "$srcmods"} -m "$@" || :
|
||||
+
|
||||
+ if (($_ret != 0)) && [[ -z "$_silent" ]]; then
|
||||
+ derror "FAILED: " \
|
||||
+ $DRACUT_INSTALL \
|
||||
+ ${initdir:+-D "$initdir"} \
|
||||
+ ${loginstall:+-L "$loginstall"} \
|
||||
+ ${hostonly:+-H} \
|
||||
+ ${omit_drivers:+-N "$omit_drivers"} \
|
||||
+ ${srcmods:+--kerneldir "$srcmods"} \
|
||||
+ ${_optional:+-o} \
|
||||
+ ${_silent:+--silent} \
|
||||
+ -m "$@"
|
||||
+ fi
|
||||
+
|
||||
[[ "$optional" ]] && return 0
|
||||
return $_ret
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
From 7ef36aef28eb8f770f3c104d8e88b3b991170f3a Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Wed, 6 Apr 2016 10:24:58 +0200
|
||||
Subject: [PATCH] plymouth/plymouth-pretrigger.sh: also trigger acpi subsystem
|
||||
|
||||
Trigger the acpi subsystem. This will ensure hv_vmbus gets loaded before
|
||||
plymouth is started, which will make the graphics device become
|
||||
available before plymouth is started too (and the keyboard ! which might
|
||||
also be important for plymouth in some setups).
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1218130
|
||||
(cherry picked from commit d2846fdcce9b8de0edecdf0e06a4b86fc8de542c)
|
||||
---
|
||||
modules.d/50plymouth/plymouth-pretrigger.sh | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/50plymouth/plymouth-pretrigger.sh b/modules.d/50plymouth/plymouth-pretrigger.sh
|
||||
index c3a97f2..6458d78 100755
|
||||
--- a/modules.d/50plymouth/plymouth-pretrigger.sh
|
||||
+++ b/modules.d/50plymouth/plymouth-pretrigger.sh
|
||||
@@ -5,9 +5,14 @@ if type plymouthd >/dev/null 2>&1 && [ -z "$DRACUT_SYSTEMD" ]; then
|
||||
# first trigger graphics subsystem
|
||||
udevadm trigger --action=add --attr-match=class=0x030000 >/dev/null 2>&1
|
||||
# first trigger graphics and tty subsystem
|
||||
- udevadm trigger --action=add --subsystem-match=graphics --subsystem-match=drm --subsystem-match=tty >/dev/null 2>&1
|
||||
+ udevadm trigger --action=add \
|
||||
+ --subsystem-match=graphics \
|
||||
+ --subsystem-match=drm \
|
||||
+ --subsystem-match=tty \
|
||||
+ --subsystem-match=acpi \
|
||||
+ >/dev/null 2>&1
|
||||
|
||||
- udevadm settle --timeout=30 2>&1 | vinfo
|
||||
+ udevadm settle --timeout=180 2>&1 | vinfo
|
||||
|
||||
info "Starting plymouth daemon"
|
||||
mkdir -m 0755 /run/plymouth
|
106
0054-dracut-install-add-help-documentation.patch
Normal file
106
0054-dracut-install-add-help-documentation.patch
Normal file
@ -0,0 +1,106 @@
|
||||
From b14b039e9066f51c3c4cee2123f23f7822dd8e13 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Thu, 14 Apr 2016 11:47:50 +0200
|
||||
Subject: [PATCH] dracut-install: add --help documentation
|
||||
|
||||
---
|
||||
install/dracut-install.c | 73 +++++++++++++++++++++++-------------------------
|
||||
1 file changed, 35 insertions(+), 38 deletions(-)
|
||||
|
||||
diff --git a/install/dracut-install.c b/install/dracut-install.c
|
||||
index f414f30..bef08da 100644
|
||||
--- a/install/dracut-install.c
|
||||
+++ b/install/dracut-install.c
|
||||
@@ -17,7 +17,7 @@
|
||||
along with this program; If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
-#define PROGRAM_VERSION_STRING "1"
|
||||
+#define PROGRAM_VERSION_STRING "2"
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
@@ -719,49 +719,46 @@ static void item_free(char *i)
|
||||
|
||||
static void usage(int status)
|
||||
{
|
||||
- /* */
|
||||
+ /* */
|
||||
printf("Usage: %s -D DESTROOTDIR [OPTION]... -a SOURCE...\n"
|
||||
"or: %s -D DESTROOTDIR [OPTION]... SOURCE DEST\n"
|
||||
+ "or: %s -D DESTROOTDIR [OPTION]... -m KERNELMODULE [KERNELMODULE …]\n"
|
||||
"\n"
|
||||
"Install SOURCE to DEST in DESTROOTDIR with all needed dependencies.\n"
|
||||
"\n"
|
||||
- " -D --destrootdir Install all files to DESTROOTDIR as the root\n"
|
||||
- " -a --all Install all SOURCE arguments to DESTROOTDIR\n"
|
||||
- " -o --optional If SOURCE does not exist, do not fail\n"
|
||||
- " -d --dir SOURCE is a directory\n"
|
||||
- " -l --ldd Also install shebang executables and libraries\n"
|
||||
- " -L --logdir <DIR> Log files, which were installed from the host to <DIR>\n"
|
||||
- " -R --resolvelazy Only install shebang executables and libraries\n"
|
||||
- " for all SOURCE files\n"
|
||||
- " -H --hostonly Mark all SOURCE files as hostonly\n\n"
|
||||
- " -f --fips Also install all '.SOURCE.hmac' files\n"
|
||||
- " -v --verbose Show more output\n"
|
||||
- " --debug Show debug output\n"
|
||||
- " --version Show package version\n"
|
||||
- " -h --help Show this help\n"
|
||||
+ " KERNELMODULE can have the format:\n"
|
||||
+ " <absolute path> with a leading /\n"
|
||||
+ " =<kernel subdir>[/<kernel subdir>…] like '=drivers/hid'\n"
|
||||
+ " <module name>\n"
|
||||
"\n"
|
||||
- "Example:\n"
|
||||
- "# mkdir -p /var/tmp/test-root\n"
|
||||
- "# %s -D /var/tmp/test-root --ldd -a sh tr\n"
|
||||
- "# tree /var/tmp/test-root\n"
|
||||
- "/var/tmp/test-root\n"
|
||||
- "|-- lib64 -> usr/lib64\n"
|
||||
- "`-- usr\n"
|
||||
- " |-- bin\n"
|
||||
- " | |-- bash\n"
|
||||
- " | |-- sh -> bash\n"
|
||||
- " | `-- tr\n"
|
||||
- " `-- lib64\n"
|
||||
- " |-- ld-2.15.90.so\n"
|
||||
- " |-- ld-linux-x86-64.so.2 -> ld-2.15.90.so\n"
|
||||
- " |-- libc-2.15.90.so\n"
|
||||
- " |-- libc.so\n"
|
||||
- " |-- libc.so.6 -> libc-2.15.90.so\n"
|
||||
- " |-- libdl-2.15.90.so\n"
|
||||
- " |-- libdl.so -> libdl-2.15.90.so\n"
|
||||
- " |-- libdl.so.2 -> libdl-2.15.90.so\n"
|
||||
- " |-- libtinfo.so.5 -> libtinfo.so.5.9\n"
|
||||
- " `-- libtinfo.so.5.9\n", program_invocation_short_name, program_invocation_short_name,
|
||||
+ " -D --destrootdir Install all files to DESTROOTDIR as the root\n"
|
||||
+ " -a --all Install all SOURCE arguments to DESTROOTDIR\n"
|
||||
+ " -o --optional If SOURCE does not exist, do not fail\n"
|
||||
+ " -d --dir SOURCE is a directory\n"
|
||||
+ " -l --ldd Also install shebang executables and libraries\n"
|
||||
+ " -L --logdir <DIR> Log files, which were installed from the host to <DIR>\n"
|
||||
+ " -R --resolvelazy Only install shebang executables and libraries\n"
|
||||
+ " for all SOURCE files\n"
|
||||
+ " -H --hostonly Mark all SOURCE files as hostonly\n\n"
|
||||
+ " -f --fips Also install all '.SOURCE.hmac' files\n"
|
||||
+ "\n"
|
||||
+ " --module,-m Install kernel modules, instead of files\n"
|
||||
+ " --kerneldir Specify the kernel module directory\n"
|
||||
+ " --firmwaredirs Specify the firmware directory search path with : separation\n"
|
||||
+ " --silent Don't display error messages for kernel module install\n"
|
||||
+ " -o --optional If kernel module does not exist, do not fail\n"
|
||||
+ " -p --mod-filter-path Filter kernel modules by path regexp\n"
|
||||
+ " -P --mod-filter-nopath Exclude kernel modules by path regexp\n"
|
||||
+ " -s --mod-filter-symbol Filter kernel modules by symbol regexp\n"
|
||||
+ " -S --mod-filter-nosymbol Exclude kernel modules by symbol regexp\n"
|
||||
+ " -N --mod-filter-noname Exclude kernel modules by name regexp\n"
|
||||
+ "\n"
|
||||
+ " -v --verbose Show more output\n"
|
||||
+ " --debug Show debug output\n"
|
||||
+ " --version Show package version\n"
|
||||
+ " -h --help Show this help\n"
|
||||
+ "\n",
|
||||
+ program_invocation_short_name, program_invocation_short_name,
|
||||
program_invocation_short_name);
|
||||
exit(status);
|
||||
}
|
101
0055-NEWS-update-for-045.patch
Normal file
101
0055-NEWS-update-for-045.patch
Normal file
@ -0,0 +1,101 @@
|
||||
From 6fcd5c8e3b539de4eeccddab2e5da6ee260fbf0b Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Thu, 14 Apr 2016 11:53:14 +0200
|
||||
Subject: [PATCH] NEWS: update for 045
|
||||
|
||||
---
|
||||
NEWS | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 84 insertions(+)
|
||||
|
||||
diff --git a/NEWS b/NEWS
|
||||
index ca68302..6d1cd0a 100644
|
||||
--- a/NEWS
|
||||
+++ b/NEWS
|
||||
@@ -1,3 +1,87 @@
|
||||
+dracut-045
|
||||
+==========
|
||||
+
|
||||
+dracut now requires libkmod for the dracut-install binary helper.
|
||||
+
|
||||
+dracut.sh:
|
||||
+- restorecon final image file
|
||||
+- fail hard, if we find modules and modules.dep is missing
|
||||
+
|
||||
+dracut-functions.sh:
|
||||
+- fix check_vol_slaves() volume group name stripping
|
||||
+
|
||||
+dracut-install:
|
||||
+- catch ldd message "cannot execute binary file"
|
||||
+- added kernel module handling with libkmod
|
||||
+ Added parameters:
|
||||
+ --module,-m
|
||||
+ --mod-filter-path, -p
|
||||
+ --mod-filter-nopath, -P
|
||||
+ --mod-filter-symbol, -s
|
||||
+ --mod-filter-nosymbol, -S
|
||||
+ --mod-filter-noname, -N
|
||||
+ --silent
|
||||
+ --kerneldir
|
||||
+ --firmwaredirs
|
||||
+
|
||||
+lsinitrd:
|
||||
+- new option "--unpack"
|
||||
+- new option "--unpackearly"
|
||||
+- and "--verbose"
|
||||
+
|
||||
+general initramfs fixes:
|
||||
+- don't remove 99-cmdline-ask on 'hostonly' cleanup
|
||||
+- call dracut-cmdline-ask.service, if /etc/cmdline.d/*.conf exists
|
||||
+- break at switch_root only for bare rd.break
|
||||
+
|
||||
+dmsquash-live:
|
||||
+- fixed livenet-generator execution flag
|
||||
+ and include only, if systemd is used
|
||||
+- fixed dmsquash-live-root.sh for cases where the fstype of the liveimage is squashfs
|
||||
+- fixed typo for rootfs.img
|
||||
+
|
||||
+dmraid:
|
||||
+- added "nowatch" option in udev rule, otherwise udev would reread partitions for raid members
|
||||
+
|
||||
+shutdown:
|
||||
+- handle readonly /run on shutdown
|
||||
+
|
||||
+kernel-modules:
|
||||
+- add all HID drivers, regardless of hostonly mode
|
||||
+ people swap keyboards sometimes and should be able to enter their disk password
|
||||
+- add usb-storage
|
||||
+ To save the rdsosreport.txt to a USB stick, the usb-storage module is needed.
|
||||
+
|
||||
+systemd:
|
||||
+- add /etc/machine-info
|
||||
+- fixed systemd-escape call for names beginning with "-"
|
||||
+
|
||||
+network:
|
||||
+- fix carrier detection
|
||||
+- correctly set mac address for ip=...:<mtu>:<mac>
|
||||
+- fixed vlan, bonding, bridging, team logic
|
||||
+ call ifup for the slaves and assemble afterwards
|
||||
+- add mtu to list of variables to store in override
|
||||
+- for rd.neednet=0 a bootdev is not needed anymore
|
||||
+- dhclient-script.sh: add classless-static-routes support
|
||||
+
|
||||
+nbd:
|
||||
+- add systemd generator
|
||||
+- use export names instead of port numbers, because port number based
|
||||
+ exports are deprecated and were removed.
|
||||
+
|
||||
+fcoe:
|
||||
+- no more /dev/shm state copying
|
||||
+
|
||||
+multipath:
|
||||
+- check all /dev/mapper devices if they are multipath devices, not only mpath*
|
||||
+
|
||||
+fips:
|
||||
+- fixed .hmac installation in FIPS mode
|
||||
+
|
||||
+plymouth:
|
||||
+- also trigger the acpi subsystem
|
||||
+
|
||||
dracut-044
|
||||
==========
|
||||
creation:
|
32
0056-Revert-fcoe-no-need-to-copy-lldpad-state.patch
Normal file
32
0056-Revert-fcoe-no-need-to-copy-lldpad-state.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From b99e72427b517dea0d91d15fe43cf0a37420af36 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Thu, 14 Apr 2016 13:38:24 +0200
|
||||
Subject: [PATCH] Revert "fcoe: no need to copy lldpad state"
|
||||
|
||||
This reverts commit e93ff1cf9aac8f97131b3101a5da240ce5f45239.
|
||||
|
||||
seems like the file has to be copied back in the real root.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1246217
|
||||
---
|
||||
modules.d/95fcoe/cleanup-fcoe.sh | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95fcoe/cleanup-fcoe.sh b/modules.d/95fcoe/cleanup-fcoe.sh
|
||||
index 856e2d9..5ff4d05 100644
|
||||
--- a/modules.d/95fcoe/cleanup-fcoe.sh
|
||||
+++ b/modules.d/95fcoe/cleanup-fcoe.sh
|
||||
@@ -2,8 +2,9 @@
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
-if [ -z "$DRACUT_SYSTEMD" ]; then
|
||||
- if [ -e /var/run/lldpad.pid ]; then
|
||||
- lldpad -k
|
||||
- fi
|
||||
+if [ -e /var/run/lldpad.pid ]; then
|
||||
+ lldpad -k
|
||||
+ mkdir -m 0755 -p /run/initramfs/state/dev/shm
|
||||
+ cp /dev/shm/lldpad.state /run/initramfs/state/dev/shm/ > /dev/null 2>&1
|
||||
+ echo "files /dev/shm/lldpad.state" >> /run/initramfs/rwtab
|
||||
fi
|
@ -0,0 +1,32 @@
|
||||
From db7d61cff7f5a5be3a56cff39dc278f004b9c461 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Thu, 14 Apr 2016 14:56:37 +0200
|
||||
Subject: [PATCH] base/init.sh: don't mount /run with noexec, if the initramfs
|
||||
lives there
|
||||
|
||||
If the initramfs was built with prefix=/run/... /run can't be mounted
|
||||
with noexec, otherwise no binary can be run.
|
||||
|
||||
Guard against it by looking where /bin/sh is really located.
|
||||
---
|
||||
modules.d/99base/init.sh | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
|
||||
index bd7ef70..a563393 100755
|
||||
--- a/modules.d/99base/init.sh
|
||||
+++ b/modules.d/99base/init.sh
|
||||
@@ -64,7 +64,12 @@ fi
|
||||
|
||||
if ! ismounted /run; then
|
||||
mkdir -m 0755 /newrun
|
||||
- mount -t tmpfs -o mode=0755,noexec,nosuid,nodev,strictatime tmpfs /newrun >/dev/null
|
||||
+ if ! str_starts "$(readlink -f /bin/sh)" "/run/"; then
|
||||
+ mount -t tmpfs -o mode=0755,noexec,nosuid,nodev,strictatime tmpfs /newrun >/dev/null
|
||||
+ else
|
||||
+ # the initramfs binaries are located in /run, so don't mount it with noexec
|
||||
+ mount -t tmpfs -o mode=0755,nosuid,nodev,strictatime tmpfs /newrun >/dev/null
|
||||
+ fi
|
||||
cp -a /run/* /newrun >/dev/null 2>&1
|
||||
mount --move /newrun /run
|
||||
rm -fr -- /newrun
|
24
0058-kate-config.patch
Normal file
24
0058-kate-config.patch
Normal file
@ -0,0 +1,24 @@
|
||||
From 2db14045c143e7b0709bed78483a208d2df69ab3 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Fri, 15 Apr 2016 10:27:48 +0200
|
||||
Subject: [PATCH] kate config
|
||||
|
||||
---
|
||||
.kateproject | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/.kateproject b/.kateproject
|
||||
index 7a84755..0a0d5da 100644
|
||||
--- a/.kateproject
|
||||
+++ b/.kateproject
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
- "name": "Kate"
|
||||
+ "name": "Dracut"
|
||||
, "files": [ { "git": 1 } ]
|
||||
, "build": {
|
||||
- "directory": "build"
|
||||
+ "directory": "./"
|
||||
, "build": "make -j $(getconf _NPROCESSORS_ONLN) all"
|
||||
, "clean": "make clean"
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
From f3f019d9471bfc93ce8979c6cdcc0de81d0941e2 Mon Sep 17 00:00:00 2001
|
||||
From: Guido Trentalancia <guido@trentalancia.net>
|
||||
Date: Fri, 15 Apr 2016 10:38:04 +0200
|
||||
Subject: [PATCH] 95resume: avoid possible symbolic link creation error on
|
||||
bootup
|
||||
|
||||
Avoid symbolic link creation error.
|
||||
---
|
||||
modules.d/95resume/parse-resume.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/95resume/parse-resume.sh b/modules.d/95resume/parse-resume.sh
|
||||
index 3b97e51..a3beb95 100755
|
||||
--- a/modules.d/95resume/parse-resume.sh
|
||||
+++ b/modules.d/95resume/parse-resume.sh
|
||||
@@ -67,7 +67,7 @@ if ! getarg noresume; then
|
||||
printf -- '%s\n' ' RUN+="/sbin/initqueue --finished --unique --name 00resume echo %M:%m > /sys/power/resume"'
|
||||
} >> /etc/udev/rules.d/99-resume.rules
|
||||
|
||||
- printf '[ -e "%s" ] && { ln -s "%s" /dev/resume 2> /dev/null; rm -f -- "$job" "%s/initqueue/timeout/resume.sh"; }\n' \
|
||||
+ printf '[ -e "%s" ] && { ln -fs "%s" /dev/resume 2> /dev/null; rm -f -- "$job" "%s/initqueue/timeout/resume.sh"; }\n' \
|
||||
"$resume" "$resume" "$hookdir" >> $hookdir/initqueue/settled/resume.sh
|
||||
|
||||
{
|
124
0060-watchdog-module-setup.sh-rewrite.patch
Normal file
124
0060-watchdog-module-setup.sh-rewrite.patch
Normal file
@ -0,0 +1,124 @@
|
||||
From 74e2d1e69f5527ab31b01fc19f67143d1f091980 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Fri, 15 Apr 2016 11:27:20 +0200
|
||||
Subject: [PATCH] watchdog/module-setup.sh: rewrite
|
||||
|
||||
- use local variables with _
|
||||
- use associative array for the kernel modules
|
||||
- install emergency hook even in the systemd case
|
||||
- follow device path until /sys is reached
|
||||
- set kernel version for modprobe checking
|
||||
---
|
||||
modules.d/04watchdog/module-setup.sh | 92 ++++++++++++++++++++----------------
|
||||
1 file changed, 51 insertions(+), 41 deletions(-)
|
||||
|
||||
diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh
|
||||
index c9da148..04686f6 100755
|
||||
--- a/modules.d/04watchdog/module-setup.sh
|
||||
+++ b/modules.d/04watchdog/module-setup.sh
|
||||
@@ -14,54 +14,64 @@ depends() {
|
||||
install() {
|
||||
# Do not add watchdog hooks if systemd module is included
|
||||
# In that case, systemd will manage watchdog kick
|
||||
- if dracut_module_included "systemd"; then
|
||||
- return
|
||||
+ if ! dracut_module_included "systemd"; then
|
||||
+ inst_hook cmdline 00 "$moddir/watchdog.sh"
|
||||
+ inst_hook cmdline 50 "$moddir/watchdog.sh"
|
||||
+ inst_hook pre-trigger 00 "$moddir/watchdog.sh"
|
||||
+ inst_hook initqueue 00 "$moddir/watchdog.sh"
|
||||
+ inst_hook mount 00 "$moddir/watchdog.sh"
|
||||
+ inst_hook mount 50 "$moddir/watchdog.sh"
|
||||
+ inst_hook mount 99 "$moddir/watchdog.sh"
|
||||
+ inst_hook pre-pivot 00 "$moddir/watchdog.sh"
|
||||
+ inst_hook pre-pivot 99 "$moddir/watchdog.sh"
|
||||
+ inst_hook cleanup 00 "$moddir/watchdog.sh"
|
||||
+ inst_hook cleanup 99 "$moddir/watchdog.sh"
|
||||
fi
|
||||
- inst_hook cmdline 00 "$moddir/watchdog.sh"
|
||||
- inst_hook cmdline 50 "$moddir/watchdog.sh"
|
||||
- inst_hook pre-trigger 00 "$moddir/watchdog.sh"
|
||||
- inst_hook initqueue 00 "$moddir/watchdog.sh"
|
||||
- inst_hook mount 00 "$moddir/watchdog.sh"
|
||||
- inst_hook mount 50 "$moddir/watchdog.sh"
|
||||
- inst_hook mount 99 "$moddir/watchdog.sh"
|
||||
- inst_hook pre-pivot 00 "$moddir/watchdog.sh"
|
||||
- inst_hook pre-pivot 99 "$moddir/watchdog.sh"
|
||||
- inst_hook cleanup 00 "$moddir/watchdog.sh"
|
||||
- inst_hook cleanup 99 "$moddir/watchdog.sh"
|
||||
inst_hook emergency 02 "$moddir/watchdog-stop.sh"
|
||||
inst_multiple -o wdctl
|
||||
}
|
||||
|
||||
installkernel() {
|
||||
+ local -A _drivers
|
||||
+ local _alldrivers _active _wdtdrv _wdtppath _dir
|
||||
[[ -d /sys/class/watchdog/ ]] || return
|
||||
- wdtcmdline=""
|
||||
- for dir in /sys/class/watchdog/*; do
|
||||
- [[ -d "$dir" ]] || continue
|
||||
- [[ -f "$dir/state" ]] || continue
|
||||
- active=$(< "$dir/state")
|
||||
- ! [[ $hostonly ]] || [[ "$active" = "active" ]] || continue
|
||||
- # device/modalias will return driver of this device
|
||||
- wdtdrv=$(< "$dir/device/modalias")
|
||||
- # There can be more than one module represented by same
|
||||
- # modalias. Currently load all of them.
|
||||
- # TODO: Need to find a way to avoid any unwanted module
|
||||
- # represented by modalias
|
||||
- wdtdrv=$(modprobe -R $wdtdrv)
|
||||
- instmods $wdtdrv
|
||||
- wdtcmdline="$wdtcmdline$(echo $wdtdrv | tr " " ","),"
|
||||
- # however in some cases, we also need to check that if there is
|
||||
- # a specific driver for the parent bus/device. In such cases
|
||||
- # we also need to enable driver for parent bus/device.
|
||||
- wdtppath=$(readlink -f "$dir/device/..")
|
||||
- while [ -f "$wdtppath/modalias" ]
|
||||
- do
|
||||
- wdtpdrv=$(< "$wdtppath/modalias")
|
||||
- wdtpdrv=$(modprobe -R $wdtpdrv)
|
||||
- instmods $wdtpdrv
|
||||
- wdtcmdline="$wdtcmdline$(echo $wdtpdrv | tr " " ","),"
|
||||
- wdtppath=$(readlink -f "$wdtppath/..")
|
||||
- done
|
||||
+ for _dir in /sys/class/watchdog/*; do
|
||||
+ [[ -d "$_dir" ]] || continue
|
||||
+ [[ -f "$_dir/state" ]] || continue
|
||||
+ _active=$(< "$_dir/state")
|
||||
+ ! [[ $hostonly ]] || [[ "$_active" = "active" ]] || continue
|
||||
+ # device/modalias will return driver of this device
|
||||
+ _wdtdrv=$(< "$_dir/device/modalias")
|
||||
+ # There can be more than one module represented by same
|
||||
+ # modalias. Currently load all of them.
|
||||
+ # TODO: Need to find a way to avoid any unwanted module
|
||||
+ # represented by modalias
|
||||
+ _wdtdrv=$(modprobe --set-version "$kernel" -R $_wdtdrv 2>/dev/null)
|
||||
+ if [[ $_wdtdrv ]]; then
|
||||
+ instmods $_wdtdrv
|
||||
+ for i in $_wdtdrv; do
|
||||
+ _drivers[$i]=1
|
||||
+ done
|
||||
+ fi
|
||||
+ # however in some cases, we also need to check that if there is
|
||||
+ # a specific driver for the parent bus/device. In such cases
|
||||
+ # we also need to enable driver for parent bus/device.
|
||||
+ _wdtppath=$(readlink -f "$_dir/device/..")
|
||||
+ while [[ -d "$_wdtppath" ]] && [[ "$_wdtppath" != "/sys" ]]; do
|
||||
+ _wdtppath=$(readlink -f "$_wdtppath/..")
|
||||
+ [[ -f "$_wdtppath/modalias" ]] || continue
|
||||
+
|
||||
+ _wdtdrv=$(< "$_wdtppath/modalias")
|
||||
+ _wdtdrv=$(modprobe --set-version "$kernel" -R $_wdtdrv 2>/dev/null)
|
||||
+ if [[ $_wdtdrv ]]; then
|
||||
+ instmods $_wdtdrv
|
||||
+ for i in $_wdtdrv; do
|
||||
+ _drivers[$i]=1
|
||||
+ done
|
||||
+ fi
|
||||
+ done
|
||||
done
|
||||
# ensure that watchdog module is loaded as early as possible
|
||||
- [[ $wdtcmdline = "" ]] || echo "rd.driver.pre=$wdtcmdline" > ${initdir}/etc/cmdline.d/00-watchdog.conf
|
||||
+ _alldrivers="${!_drivers[*]}"
|
||||
+ [[ $_alldrivers ]] && echo "rd.driver.pre=${_alldrivers// /,}" > ${initdir}/etc/cmdline.d/00-watchdog.conf
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
From 9d74747f926d038f2e149d70a9c8f955861ab354 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Fri, 15 Apr 2016 12:03:03 +0200
|
||||
Subject: [PATCH] drop to shell on die() if rd.shell=1 is set explicitly
|
||||
|
||||
---
|
||||
modules.d/99base/dracut-lib.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
|
||||
index 0a0b1b9..48fc83d 100755
|
||||
--- a/modules.d/99base/dracut-lib.sh
|
||||
+++ b/modules.d/99base/dracut-lib.sh
|
||||
@@ -457,7 +457,7 @@ die() {
|
||||
|
||||
> /run/initramfs/.die
|
||||
|
||||
- getargbool 0 "rd.debug=" && emergency_shell
|
||||
+ getargbool 0 "rd.shell=" && emergency_shell
|
||||
|
||||
if [ -n "$DRACUT_SYSTEMD" ]; then
|
||||
systemctl --no-block --force halt
|
45
0062-dracut_install-honor-silent-flag.patch
Normal file
45
0062-dracut_install-honor-silent-flag.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From fa295f0bcde8c8d1205cf53ebe6e5dc46629200a Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Fri, 15 Apr 2016 15:25:27 +0200
|
||||
Subject: [PATCH] dracut_install: honor --silent flag
|
||||
|
||||
---
|
||||
dracut-init.sh | 8 +++++++-
|
||||
modules.d/50drm/module-setup.sh | 2 +-
|
||||
2 files changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dracut-init.sh b/dracut-init.sh
|
||||
index 8d1d9fa..1056a31 100644
|
||||
--- a/dracut-init.sh
|
||||
+++ b/dracut-init.sh
|
||||
@@ -219,10 +219,16 @@ dracut_install() {
|
||||
}
|
||||
|
||||
dracut_instmods() {
|
||||
+ local _silent=0;
|
||||
+ local i;
|
||||
[[ $no_kernel = yes ]] && return
|
||||
+ for i in "$@"; do
|
||||
+ [[ $i == "--silent" ]] && silent=1
|
||||
+ done
|
||||
+
|
||||
$DRACUT_INSTALL \
|
||||
${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${srcmods:+--kerneldir "$srcmods"} -m "$@"
|
||||
- (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${srcmods:+--kerneldir "$srcmods"} -m "$@" || :
|
||||
+ (($? != 0)) && (($silent == 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${srcmods:+--kerneldir "$srcmods"} -m "$@" || :
|
||||
}
|
||||
|
||||
inst_library() {
|
||||
diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh
|
||||
index 661dde9..6106d8c 100755
|
||||
--- a/modules.d/50drm/module-setup.sh
|
||||
+++ b/modules.d/50drm/module-setup.sh
|
||||
@@ -34,7 +34,7 @@ installkernel() {
|
||||
if [[ $hostonly ]]; then
|
||||
for i in /sys/bus/{pci/devices,soc/devices/soc?}/*/modalias; do
|
||||
[[ -e $i ]] || continue
|
||||
- if hostonly="" dracut_instmods -s "drm_crtc_init" -S "iw_handler_get_spy" $(<$i) 2>/dev/null; then
|
||||
+ if hostonly="" dracut_instmods --silent -s "drm_crtc_init" -S "iw_handler_get_spy" $(<$i); then
|
||||
if strstr "$(modinfo -F filename $(<$i) 2>/dev/null)" radeon.ko; then
|
||||
hostonly='' instmods amdkfd
|
||||
fi
|
418
0063-dracut-install-make-use-of-_cleanup_-macros-and-impr.patch
Normal file
418
0063-dracut-install-make-use-of-_cleanup_-macros-and-impr.patch
Normal file
@ -0,0 +1,418 @@
|
||||
From eab32bda801e539c276f1b18e7c2b691eeab3d14 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Fri, 15 Apr 2016 15:29:52 +0200
|
||||
Subject: [PATCH] dracut-install: make use of _cleanup_ macros and improve
|
||||
hostonly check
|
||||
|
||||
If a module is renamed or another module takes care of the old one,
|
||||
all of the alias strings have to be checked against the current set of
|
||||
loaded modules.
|
||||
|
||||
This is still incomplete, because to be absolutely correct, all the
|
||||
/sys/*...*/modalias files would have to be checked, if they match the
|
||||
modules alias strings.
|
||||
---
|
||||
install/dracut-install.c | 180 ++++++++++++++++++++++++++++++++++-------------
|
||||
1 file changed, 131 insertions(+), 49 deletions(-)
|
||||
|
||||
diff --git a/install/dracut-install.c b/install/dracut-install.c
|
||||
index bef08da..9a0d53f 100644
|
||||
--- a/install/dracut-install.c
|
||||
+++ b/install/dracut-install.c
|
||||
@@ -66,6 +66,7 @@ static char *logfile = NULL;
|
||||
FILE *logfile_f = NULL;
|
||||
static Hashmap *items = NULL;
|
||||
static Hashmap *items_failed = NULL;
|
||||
+static Hashmap *modules_loaded = NULL;
|
||||
static regex_t mod_filter_path;
|
||||
static regex_t mod_filter_nopath;
|
||||
static regex_t mod_filter_symbol;
|
||||
@@ -79,6 +80,39 @@ static bool arg_mod_filter_noname = false;
|
||||
|
||||
static int dracut_install(const char *src, const char *dst, bool isdir, bool resolvedeps, bool hashdst);
|
||||
|
||||
+
|
||||
+
|
||||
+static inline void kmod_module_unref_listp(struct kmod_list **p) {
|
||||
+ if (*p)
|
||||
+ kmod_module_unref_list(*p);
|
||||
+}
|
||||
+#define _cleanup_kmod_module_unref_list_ _cleanup_(kmod_module_unref_listp)
|
||||
+
|
||||
+static inline void kmod_module_info_free_listp(struct kmod_list **p) {
|
||||
+ if (*p)
|
||||
+ kmod_module_info_free_list(*p);
|
||||
+}
|
||||
+#define _cleanup_kmod_module_info_free_list_ _cleanup_(kmod_module_info_free_listp)
|
||||
+
|
||||
+static inline void kmod_unrefp(struct kmod_ctx **p) {
|
||||
+ kmod_unref(*p);
|
||||
+}
|
||||
+#define _cleanup_kmod_unref_ _cleanup_(kmod_unrefp)
|
||||
+
|
||||
+static inline void kmod_module_dependency_symbols_free_listp(struct kmod_list **p) {
|
||||
+ if (*p)
|
||||
+ kmod_module_dependency_symbols_free_list(*p);
|
||||
+}
|
||||
+#define _cleanup_kmod_module_dependency_symbols_free_list_ _cleanup_(kmod_module_dependency_symbols_free_listp)
|
||||
+
|
||||
+static inline void fts_closep(FTS **p) {
|
||||
+ if (*p)
|
||||
+ fts_close(*p);
|
||||
+}
|
||||
+#define _cleanup_fts_close_ _cleanup_(fts_closep)
|
||||
+
|
||||
+
|
||||
+
|
||||
static size_t dir_len(char const *file)
|
||||
{
|
||||
size_t length;
|
||||
@@ -1058,7 +1092,8 @@ static int install_all(int argc, char **argv)
|
||||
|
||||
static int install_firmware(struct kmod_module *mod)
|
||||
{
|
||||
- struct kmod_list *l, *list = NULL;
|
||||
+ struct kmod_list *l;
|
||||
+ _cleanup_kmod_module_info_free_list_ struct kmod_list *list = NULL;
|
||||
int ret;
|
||||
|
||||
char **q;
|
||||
@@ -1072,7 +1107,6 @@ static int install_firmware(struct kmod_module *mod)
|
||||
kmod_list_foreach(l, list) {
|
||||
const char *key = kmod_module_info_get_key(l);
|
||||
const char *value = NULL;
|
||||
- char *fwpath = NULL;
|
||||
|
||||
if (!streq("firmware", key))
|
||||
continue;
|
||||
@@ -1081,6 +1115,7 @@ static int install_firmware(struct kmod_module *mod)
|
||||
log_debug("Firmware %s", value);
|
||||
ret = -1;
|
||||
STRV_FOREACH(q, firmwaredirs) {
|
||||
+ _cleanup_free_ char *fwpath = NULL;
|
||||
struct stat sb;
|
||||
int r;
|
||||
|
||||
@@ -1092,8 +1127,6 @@ static int install_firmware(struct kmod_module *mod)
|
||||
|
||||
if (stat(fwpath, &sb) != 0) {
|
||||
log_debug("stat(%s) != 0", fwpath);
|
||||
- free(fwpath);
|
||||
- fwpath = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1111,7 +1144,8 @@ static int install_firmware(struct kmod_module *mod)
|
||||
|
||||
static bool check_module_symbols(struct kmod_module *mod)
|
||||
{
|
||||
- struct kmod_list *itr, *deplist = NULL;
|
||||
+ struct kmod_list *itr;
|
||||
+ _cleanup_kmod_module_dependency_symbols_free_list_ struct kmod_list *deplist = NULL;
|
||||
|
||||
if (!arg_mod_filter_symbol && !arg_mod_filter_nosymbol)
|
||||
return true;
|
||||
@@ -1128,7 +1162,6 @@ static bool check_module_symbols(struct kmod_module *mod)
|
||||
const char *symbol = kmod_module_symbol_get_symbol(itr);
|
||||
// log_debug("Checking symbol %s", symbol);
|
||||
if (regexec(&mod_filter_nosymbol, symbol, 0, NULL, 0) == 0) {
|
||||
- kmod_module_dependency_symbols_free_list(deplist);
|
||||
log_debug("Module %s: symbol %s matched exclusion filter", kmod_module_get_name(mod), symbol);
|
||||
return false;
|
||||
}
|
||||
@@ -1140,20 +1173,16 @@ static bool check_module_symbols(struct kmod_module *mod)
|
||||
const char *symbol = kmod_module_dependency_symbol_get_symbol(itr);
|
||||
// log_debug("Checking symbol %s", symbol);
|
||||
if (regexec(&mod_filter_symbol, symbol, 0, NULL, 0) == 0) {
|
||||
- kmod_module_dependency_symbols_free_list(deplist);
|
||||
log_debug("Module %s: symbol %s matched inclusion filter", kmod_module_get_name(mod), symbol);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
- kmod_module_dependency_symbols_free_list(deplist);
|
||||
return false;
|
||||
}
|
||||
|
||||
- kmod_module_dependency_symbols_free_list(deplist);
|
||||
return true;
|
||||
}
|
||||
|
||||
-
|
||||
static bool check_module_path(const char *path)
|
||||
{
|
||||
if (arg_mod_filter_nopath && (regexec(&mod_filter_nopath, path, 0, NULL, 0) == 0)) {
|
||||
@@ -1168,14 +1197,23 @@ static bool check_module_path(const char *path)
|
||||
return true;
|
||||
}
|
||||
|
||||
+static bool check_module_hostonly(struct kmod_module *mod)
|
||||
+{
|
||||
+ const char *name = kmod_module_get_name(mod);
|
||||
+
|
||||
+ if (check_hashmap(modules_loaded, name))
|
||||
+ return true;
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
static int install_module(struct kmod_module *mod)
|
||||
{
|
||||
int ret = 0;
|
||||
- int state;
|
||||
- struct kmod_list *itr, *modlist = NULL;
|
||||
+ struct kmod_list *itr;
|
||||
+ _cleanup_kmod_module_unref_list_ struct kmod_list *modlist = NULL;
|
||||
const char *path = NULL;
|
||||
const char *name = NULL;
|
||||
- state = kmod_module_get_initstate(mod);
|
||||
|
||||
name = kmod_module_get_name(mod);
|
||||
if (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0)) {
|
||||
@@ -1183,7 +1221,7 @@ static int install_module(struct kmod_module *mod)
|
||||
return 0;
|
||||
}
|
||||
|
||||
- if (arg_hostonly && (state != KMOD_MODULE_BUILTIN) && (state != KMOD_MODULE_LIVE)) {
|
||||
+ if (arg_hostonly && ! check_module_hostonly(mod)) {
|
||||
log_debug("dracut_install '%s' not hostonly", name);
|
||||
return 0;
|
||||
}
|
||||
@@ -1232,15 +1270,17 @@ static int install_module(struct kmod_module *mod)
|
||||
}
|
||||
kmod_module_unref(mod);
|
||||
}
|
||||
- kmod_module_unref_list(modlist);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int install_modules(int argc, char **argv)
|
||||
{
|
||||
- struct kmod_ctx *ctx = NULL;
|
||||
- struct kmod_list *itr, *modlist = NULL;
|
||||
+ _cleanup_kmod_unref_ struct kmod_ctx *ctx = NULL;
|
||||
+ struct kmod_list *loaded_list = NULL;
|
||||
+ struct kmod_list *itr, *l;
|
||||
+ int err;
|
||||
+
|
||||
struct kmod_module *mod = NULL, *mod_o = NULL;
|
||||
|
||||
const char *modname = NULL;
|
||||
@@ -1248,12 +1288,48 @@ static int install_modules(int argc, char **argv)
|
||||
|
||||
ctx = kmod_new(kerneldir, NULL);
|
||||
|
||||
+ err = kmod_module_new_from_loaded(ctx, &loaded_list);
|
||||
+ if (err < 0) {
|
||||
+ errno = err;
|
||||
+ log_error("Could not get list of loaded modules: %m");
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ kmod_list_foreach(itr, loaded_list) {
|
||||
+ _cleanup_kmod_module_unref_list_ struct kmod_list *modlist = NULL;
|
||||
+
|
||||
+ struct kmod_module *mod = kmod_module_get_module(itr);
|
||||
+ char *name = strdup(kmod_module_get_name(mod));
|
||||
+ hashmap_put(modules_loaded, name, name);
|
||||
+ kmod_module_unref(mod);
|
||||
+
|
||||
+ /* also put the modules from the new kernel in the hashmap,
|
||||
+ * which resolve the name as an alias, in case a kernel module is
|
||||
+ * renamed.
|
||||
+ */
|
||||
+ err = kmod_module_new_from_lookup(ctx, name, &modlist);
|
||||
+ if (err < 0)
|
||||
+ continue;
|
||||
+ if (!modlist)
|
||||
+ continue;
|
||||
+ kmod_list_foreach(l, modlist) {
|
||||
+ mod = kmod_module_get_module(l);
|
||||
+ char *name = strdup(kmod_module_get_name(mod));
|
||||
+ hashmap_put(modules_loaded, name, name);
|
||||
+ kmod_module_unref(mod);
|
||||
+ }
|
||||
+ }
|
||||
+ kmod_module_unref_list(loaded_list);
|
||||
+
|
||||
for (i = 0; i < argc; i++) {
|
||||
int r = 0;
|
||||
int ret = -1;
|
||||
+
|
||||
log_debug("Handle module '%s'", argv[i]);
|
||||
|
||||
if (argv[i][0] == '/') {
|
||||
+ _cleanup_kmod_module_unref_list_ struct kmod_list *modlist = NULL;
|
||||
+
|
||||
r = kmod_module_new_from_path(ctx, argv[i], &mod_o);
|
||||
if (r < 0) {
|
||||
log_debug("Failed to lookup modules path '%s': %m", argv[i]);
|
||||
@@ -1263,6 +1339,7 @@ static int install_modules(int argc, char **argv)
|
||||
}
|
||||
/* Check, if we have to load another module with that name instead */
|
||||
modname = kmod_module_get_name(mod_o);
|
||||
+
|
||||
if (!modname) {
|
||||
if (!arg_optional) {
|
||||
if (!arg_silent)
|
||||
@@ -1272,8 +1349,11 @@ static int install_modules(int argc, char **argv)
|
||||
log_info("Failed to get name for module '%s'", argv[i]);
|
||||
continue;
|
||||
}
|
||||
+
|
||||
r = kmod_module_new_from_lookup(ctx, modname, &modlist);
|
||||
kmod_module_unref(mod_o);
|
||||
+ mod_o = NULL;
|
||||
+
|
||||
if (r < 0) {
|
||||
if (!arg_optional) {
|
||||
if (!arg_silent)
|
||||
@@ -1303,37 +1383,38 @@ static int install_modules(int argc, char **argv)
|
||||
};
|
||||
ret = ( ret == 0 ? 0 : r );
|
||||
}
|
||||
- kmod_module_unref_list(modlist);
|
||||
- modlist = 0;
|
||||
} else if (argv[i][0] == '=') {
|
||||
- char *path1, *path2, *path3;
|
||||
- FTS *fts;
|
||||
+ _cleanup_free_ char *path1 = NULL, *path2 = NULL, *path3 = NULL;
|
||||
+ _cleanup_fts_close_ FTS *fts = NULL;
|
||||
+
|
||||
log_debug("Handling =%s", &argv[i][1]);
|
||||
/* FIXME and add more paths*/
|
||||
- {
|
||||
- int r;
|
||||
- r = asprintf(&path2, "%s/kernel/%s", kerneldir, &argv[i][1]);
|
||||
- if (r < 0) {
|
||||
- log_error("Out of memory!");
|
||||
- exit(EXIT_FAILURE);
|
||||
- }
|
||||
+ r = asprintf(&path2, "%s/kernel/%s", kerneldir, &argv[i][1]);
|
||||
+ if (r < 0) {
|
||||
+ log_error("Out of memory!");
|
||||
+ exit(EXIT_FAILURE);
|
||||
+ }
|
||||
|
||||
- r = asprintf(&path1, "%s/extra/%s", kerneldir, &argv[i][1]);
|
||||
- if (r < 0) {
|
||||
- log_error("Out of memory!");
|
||||
- exit(EXIT_FAILURE);
|
||||
- }
|
||||
+ r = asprintf(&path1, "%s/extra/%s", kerneldir, &argv[i][1]);
|
||||
+ if (r < 0) {
|
||||
+ log_error("Out of memory!");
|
||||
+ exit(EXIT_FAILURE);
|
||||
+ }
|
||||
|
||||
- r = asprintf(&path3, "%s/updates/%s", kerneldir, &argv[i][1]);
|
||||
- if (r < 0) {
|
||||
- log_error("Out of memory!");
|
||||
- exit(EXIT_FAILURE);
|
||||
- }
|
||||
+ r = asprintf(&path3, "%s/updates/%s", kerneldir, &argv[i][1]);
|
||||
+ if (r < 0) {
|
||||
+ log_error("Out of memory!");
|
||||
+ exit(EXIT_FAILURE);
|
||||
+ }
|
||||
|
||||
+ {
|
||||
char *paths[] = { path1, path2, path3, NULL };
|
||||
fts = fts_open(paths, FTS_COMFOLLOW|FTS_NOCHDIR|FTS_NOSTAT|FTS_LOGICAL, NULL);
|
||||
}
|
||||
+
|
||||
for (FTSENT *ftsent = fts_read(fts); ftsent != NULL; ftsent = fts_read(fts)) {
|
||||
+ _cleanup_kmod_module_unref_list_ struct kmod_list *modlist = NULL;
|
||||
+
|
||||
if((ftsent->fts_info == FTS_D) && !check_module_path(ftsent->fts_accpath)) {
|
||||
fts_set(fts, ftsent, FTS_SKIP);
|
||||
log_debug("Skipping %s", ftsent->fts_accpath);
|
||||
@@ -1356,6 +1437,7 @@ static int install_modules(int argc, char **argv)
|
||||
|
||||
/* Check, if we have to load another module with that name instead */
|
||||
modname = kmod_module_get_name(mod_o);
|
||||
+
|
||||
if (!modname) {
|
||||
log_error("Failed to get name for module '%s'", ftsent->fts_accpath);
|
||||
if (!arg_optional) {
|
||||
@@ -1365,18 +1447,19 @@ static int install_modules(int argc, char **argv)
|
||||
}
|
||||
r = kmod_module_new_from_lookup(ctx, modname, &modlist);
|
||||
kmod_module_unref(mod_o);
|
||||
+ mod_o = NULL;
|
||||
+
|
||||
if (r < 0) {
|
||||
log_error("Failed to lookup alias '%s': %m", modname);
|
||||
- kmod_module_unref_list(modlist);
|
||||
if (!arg_optional) {
|
||||
return -ENOENT;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
+
|
||||
if (!modlist) {
|
||||
log_error("Failed to find module '%s' %s", modname,
|
||||
ftsent->fts_accpath);
|
||||
- kmod_module_unref_list(modlist);
|
||||
if (!arg_optional) {
|
||||
return -ENOENT;
|
||||
}
|
||||
@@ -1393,18 +1476,14 @@ static int install_modules(int argc, char **argv)
|
||||
};
|
||||
ret = ( ret == 0 ? 0 : r );
|
||||
}
|
||||
- kmod_module_unref_list(modlist);
|
||||
- modlist = 0;
|
||||
}
|
||||
if (errno) {
|
||||
log_error("FTS ERROR: %m");
|
||||
}
|
||||
- fts_close(fts);
|
||||
- free(path1); path1 = NULL;
|
||||
- free(path2); path2 = NULL;
|
||||
- free(path3); path3 = NULL;
|
||||
} else {
|
||||
+ _cleanup_kmod_module_unref_list_ struct kmod_list *modlist = NULL;
|
||||
char *modname = argv[i];
|
||||
+
|
||||
if (endswith(modname, ".ko")) {
|
||||
int len = strlen(modname);
|
||||
modname[len-3]=0;
|
||||
@@ -1443,8 +1522,6 @@ static int install_modules(int argc, char **argv)
|
||||
};
|
||||
ret = ( ret == 0 ? 0 : r );
|
||||
}
|
||||
- kmod_module_unref_list(modlist);
|
||||
- modlist = 0;
|
||||
}
|
||||
|
||||
if ((ret != 0) && (!arg_optional)) {
|
||||
@@ -1513,8 +1590,9 @@ int main(int argc, char **argv)
|
||||
|
||||
items = hashmap_new(string_hash_func, string_compare_func);
|
||||
items_failed = hashmap_new(string_hash_func, string_compare_func);
|
||||
+ modules_loaded = hashmap_new(string_hash_func, string_compare_func);
|
||||
|
||||
- if (!items || !items_failed) {
|
||||
+ if (!items || !items_failed || !modules_loaded) {
|
||||
log_error("Out of memory");
|
||||
r = EXIT_FAILURE;
|
||||
goto finish;
|
||||
@@ -1570,6 +1648,9 @@ int main(int argc, char **argv)
|
||||
if (logfile_f)
|
||||
fclose(logfile_f);
|
||||
|
||||
+ while ((i = hashmap_steal_first(modules_loaded)))
|
||||
+ item_free(i);
|
||||
+
|
||||
while ((i = hashmap_steal_first(items)))
|
||||
item_free(i);
|
||||
|
||||
@@ -1578,6 +1659,7 @@ int main(int argc, char **argv)
|
||||
|
||||
hashmap_free(items);
|
||||
hashmap_free(items_failed);
|
||||
+ hashmap_free(modules_loaded);
|
||||
|
||||
free(destrootdir);
|
||||
strv_free(firmwaredirs);
|
148
0064-removed-obsolete-kernel-module-functions-and-host_mo.patch
Normal file
148
0064-removed-obsolete-kernel-module-functions-and-host_mo.patch
Normal file
@ -0,0 +1,148 @@
|
||||
From 3f60444ec1bff8a57a2cf4ada238e782928890eb Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Fri, 15 Apr 2016 16:25:59 +0200
|
||||
Subject: [PATCH] removed obsolete kernel module functions and host_modules
|
||||
variable
|
||||
|
||||
module_is_host_only()
|
||||
find_kernel_modules_by_path()
|
||||
find_kernel_modules()
|
||||
---
|
||||
dracut-init.sh | 54 -----------------------------------
|
||||
dracut.sh | 30 +------------------
|
||||
modules.d/90multipath/module-setup.sh | 2 +-
|
||||
3 files changed, 2 insertions(+), 84 deletions(-)
|
||||
|
||||
diff --git a/dracut-init.sh b/dracut-init.sh
|
||||
index 1056a31..a195c32 100644
|
||||
--- a/dracut-init.sh
|
||||
+++ b/dracut-init.sh
|
||||
@@ -943,60 +943,6 @@ dracut_kernel_post() {
|
||||
|
||||
}
|
||||
|
||||
-[[ "$kernel_current" ]] || export kernel_current=$(uname -r)
|
||||
-
|
||||
-module_is_host_only() {
|
||||
- local _mod=$1
|
||||
- local _modenc a i _k _s _v _aliases
|
||||
- _mod=${_mod##*/}
|
||||
- _mod=${_mod%.ko*}
|
||||
- _modenc=${_mod//-/_}
|
||||
-
|
||||
- [[ " $add_drivers " == *\ ${_mod}\ * ]] && return 0
|
||||
-
|
||||
- # check if module is loaded
|
||||
- [[ ${host_modules["$_modenc"]} ]] && return 0
|
||||
-
|
||||
- [[ "$kernel_current" ]] || export kernel_current=$(uname -r)
|
||||
-
|
||||
- if [[ "$kernel_current" != "$kernel" ]]; then
|
||||
- # check if module is loadable on the current kernel
|
||||
- # this covers the case, where a new module is introduced
|
||||
- # or a module was renamed
|
||||
- # or a module changed from builtin to a module
|
||||
-
|
||||
- if [[ -d /lib/modules/$kernel_current ]]; then
|
||||
- # if the modinfo can be parsed, but the module
|
||||
- # is not loaded, then we can safely return 1
|
||||
- modinfo -F filename "$_mod" &>/dev/null && return 1
|
||||
- fi
|
||||
-
|
||||
- # just install the module, better safe than sorry
|
||||
- return 0
|
||||
- fi
|
||||
-
|
||||
- return 1
|
||||
-}
|
||||
-
|
||||
-find_kernel_modules_by_path () {
|
||||
- local _OLDIFS
|
||||
-
|
||||
- [[ -f "$srcmods/modules.dep" ]] || return 0
|
||||
-
|
||||
- _OLDIFS=$IFS
|
||||
- IFS=:
|
||||
- while read a rest || [ -n "$a" ]; do
|
||||
- [[ $a = */$1/* ]] || [[ $a = updates/* ]] || continue
|
||||
- printf "%s\n" "$srcmods/$a"
|
||||
- done < "$srcmods/modules.dep"
|
||||
- IFS=$_OLDIFS
|
||||
- return 0
|
||||
-}
|
||||
-
|
||||
-find_kernel_modules () {
|
||||
- find_kernel_modules_by_path drivers
|
||||
-}
|
||||
-
|
||||
instmods() {
|
||||
# instmods [-c [-s]] <kernel module> [<kernel module> ... ]
|
||||
# instmods [-c [-s]] <kernel subsystem>
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index aaeb0dc..8232fa4 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -1101,8 +1101,6 @@ if (( ${#add_device_l[@]} )); then
|
||||
push_host_devs "${add_device_l[@]}"
|
||||
fi
|
||||
|
||||
-declare -A host_modules
|
||||
-
|
||||
if [[ $hostonly ]]; then
|
||||
# in hostonly mode, determine all devices, which have to be accessed
|
||||
# and examine them for filesystem types
|
||||
@@ -1190,32 +1188,6 @@ if [[ $hostonly ]]; then
|
||||
fi
|
||||
done < /etc/fstab
|
||||
fi
|
||||
-
|
||||
- # check /proc/modules
|
||||
- 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
|
||||
@@ -1302,7 +1274,7 @@ export initdir dracutbasedir \
|
||||
debug host_fs_types host_devs swap_devs sshkey add_fstab \
|
||||
DRACUT_VERSION udevdir prefix filesystems drivers \
|
||||
systemdutildir systemdsystemunitdir systemdsystemconfdir \
|
||||
- host_modules hostonly_cmdline loginstall \
|
||||
+ hostonly_cmdline loginstall \
|
||||
tmpfilesdir
|
||||
|
||||
mods_to_load=""
|
||||
diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh
|
||||
index 0af777d..1676798 100755
|
||||
--- a/modules.d/90multipath/module-setup.sh
|
||||
+++ b/modules.d/90multipath/module-setup.sh
|
||||
@@ -41,7 +41,7 @@ depends() {
|
||||
# called by dracut
|
||||
cmdline() {
|
||||
for m in scsi_dh_alua scsi_dh_emc scsi_dh_rdac ; do
|
||||
- if module_is_host_only $m ; then
|
||||
+ if grep -m 1 -q "$m" /proc/modules ; then
|
||||
printf 'rd.driver.pre=%s ' "$m"
|
||||
fi
|
||||
done
|
21
0065-watchdog-clean-return-of-installkernel.patch
Normal file
21
0065-watchdog-clean-return-of-installkernel.patch
Normal file
@ -0,0 +1,21 @@
|
||||
From fe83231e30d5bc94e090d02e65f0e3cbef20c6ac Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Mon, 18 Apr 2016 15:49:06 +0200
|
||||
Subject: [PATCH] watchdog: clean return of installkernel()
|
||||
|
||||
return 0, otherwise if _alldrivers is empty, the return code is fail
|
||||
---
|
||||
modules.d/04watchdog/module-setup.sh | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh
|
||||
index 04686f6..7b2685d 100755
|
||||
--- a/modules.d/04watchdog/module-setup.sh
|
||||
+++ b/modules.d/04watchdog/module-setup.sh
|
||||
@@ -74,4 +74,6 @@ installkernel() {
|
||||
# ensure that watchdog module is loaded as early as possible
|
||||
_alldrivers="${!_drivers[*]}"
|
||||
[[ $_alldrivers ]] && echo "rd.driver.pre=${_alldrivers// /,}" > ${initdir}/etc/cmdline.d/00-watchdog.conf
|
||||
+
|
||||
+ return 0
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
From bf75218e45180b957192f08c3fa5d5b147b66c31 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Mon, 18 Apr 2016 15:50:42 +0200
|
||||
Subject: [PATCH] watchdog: start traversing the device tree from the right
|
||||
directory
|
||||
|
||||
start with the device subtree, not with the parent of it
|
||||
---
|
||||
modules.d/04watchdog/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh
|
||||
index 7b2685d..7566d65 100755
|
||||
--- a/modules.d/04watchdog/module-setup.sh
|
||||
+++ b/modules.d/04watchdog/module-setup.sh
|
||||
@@ -56,7 +56,7 @@ installkernel() {
|
||||
# however in some cases, we also need to check that if there is
|
||||
# a specific driver for the parent bus/device. In such cases
|
||||
# we also need to enable driver for parent bus/device.
|
||||
- _wdtppath=$(readlink -f "$_dir/device/..")
|
||||
+ _wdtppath=$(readlink -f "$_dir/device")
|
||||
while [[ -d "$_wdtppath" ]] && [[ "$_wdtppath" != "/sys" ]]; do
|
||||
_wdtppath=$(readlink -f "$_wdtppath/..")
|
||||
[[ -f "$_wdtppath/modalias" ]] || continue
|
@ -0,0 +1,32 @@
|
||||
From 5f91ed0b5345e132d9fe1fa815bfd968778df5ea Mon Sep 17 00:00:00 2001
|
||||
From: Guido Trentalancia <guido@trentalancia.net>
|
||||
Date: Fri, 15 Apr 2016 13:06:45 +0200
|
||||
Subject: [PATCH] dracut: 10i18n: support default loadkeys/setfont data paths
|
||||
using symbolic links
|
||||
|
||||
Avoid keymap/font not found error when loadkeys/setfont
|
||||
are compiled with the default data directory path.
|
||||
|
||||
Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
|
||||
---
|
||||
modules.d/10i18n/module-setup.sh | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh
|
||||
index 9439875..9618aa7 100755
|
||||
--- a/modules.d/10i18n/module-setup.sh
|
||||
+++ b/modules.d/10i18n/module-setup.sh
|
||||
@@ -100,6 +100,13 @@ install() {
|
||||
inst_rules ${moddir}/10-console.rules
|
||||
inst_hook cmdline 20 "${moddir}/parse-i18n.sh"
|
||||
fi
|
||||
+
|
||||
+ if [[ ${kbddir} != "/usr/share" ]]; then
|
||||
+ inst_dir /usr/share
|
||||
+ for _src in $(eval echo {${KBDSUBDIRS}}); do
|
||||
+ [ ! -e "${initdir}/usr/share/${_src}" ] && ln -s "${kbddir}/${_src}" "${initdir}/usr/share/${_src}"
|
||||
+ done
|
||||
+ fi
|
||||
}
|
||||
|
||||
install_all_kbd() {
|
@ -0,0 +1,21 @@
|
||||
From bb44294b62b9469aebaeac8533569ac24b208a45 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= <glen@delfi.ee>
|
||||
Date: Wed, 27 Apr 2016 13:08:42 +0300
|
||||
Subject: [PATCH] ensure parent dir for /usr/lib/initrd-release exists
|
||||
|
||||
---
|
||||
modules.d/99base/module-setup.sh | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh
|
||||
index 5fbf6f7..b03772e 100755
|
||||
--- a/modules.d/99base/module-setup.sh
|
||||
+++ b/modules.d/99base/module-setup.sh
|
||||
@@ -77,6 +77,7 @@ install() {
|
||||
VERSION_ID=$DRACUT_VERSION
|
||||
ANSI_COLOR="0;34"
|
||||
|
||||
+ [ -e "${initdir}/usr/lib" ] || mkdir -m 0755 -p ${initdir}/usr/lib
|
||||
{
|
||||
echo NAME=\"$NAME\"
|
||||
echo VERSION=\"$VERSION\"
|
22
0069-Fix-small-typo-in-dracut.cmdline-7.patch
Normal file
22
0069-Fix-small-typo-in-dracut.cmdline-7.patch
Normal file
@ -0,0 +1,22 @@
|
||||
From ae753baec0ae5b3c3eeabbe4f70c54cc3c24c292 Mon Sep 17 00:00:00 2001
|
||||
From: Ruben Kerkhof <ruben@rubenkerkhof.com>
|
||||
Date: Fri, 29 Apr 2016 15:34:47 +0200
|
||||
Subject: [PATCH] Fix small typo in dracut.cmdline(7)
|
||||
|
||||
---
|
||||
dracut.cmdline.7.asc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
|
||||
index c4c5588..bf00719 100644
|
||||
--- a/dracut.cmdline.7.asc
|
||||
+++ b/dracut.cmdline.7.asc
|
||||
@@ -32,7 +32,7 @@ line is the value, which is honored.
|
||||
Standard
|
||||
~~~~~~~~
|
||||
**init=**__<path to real init>__::
|
||||
- specify the path to the init programm to be started after the initramfs has
|
||||
+ specify the path to the init program to be started after the initramfs has
|
||||
finished
|
||||
|
||||
**root=**__<path to blockdevice>__::
|
30
0070-systemd-ensure-journal-is-volatile.patch
Normal file
30
0070-systemd-ensure-journal-is-volatile.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From 5dea430e087ec7749080547a6a6fe5b152f665ef Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chapman <mike@very.puzzling.org>
|
||||
Date: Wed, 4 May 2016 10:49:56 +1000
|
||||
Subject: [PATCH] systemd: ensure journal is volatile
|
||||
|
||||
If journald.conf already contains Storage=persistent, journald will
|
||||
write to /var/log/journal/, which ends up at /run/initramfs/log/journal/
|
||||
after switching root. We want to make sure early boot logs are written
|
||||
to /run/log/journal/ so they can be flushed to /var/log/journal/ after
|
||||
switching root.
|
||||
---
|
||||
modules.d/00systemd/module-setup.sh | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
|
||||
index deb5e06..951a5be 100755
|
||||
--- a/modules.d/00systemd/module-setup.sh
|
||||
+++ b/modules.d/00systemd/module-setup.sh
|
||||
@@ -210,9 +210,10 @@ install() {
|
||||
done
|
||||
|
||||
mkdir -p "$initdir/etc/systemd"
|
||||
- # turn off RateLimit for journal
|
||||
+ # We must use a volatile journal, and we don't want rate-limiting
|
||||
{
|
||||
echo "[Journal]"
|
||||
+ echo "Storage=volatile"
|
||||
echo "RateLimitInterval=0"
|
||||
echo "RateLimitBurst=0"
|
||||
} >> "$initdir/etc/systemd/journald.conf"
|
43
0071-configure-don-t-hardcode-pkg-config.patch
Normal file
43
0071-configure-don-t-hardcode-pkg-config.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From 699414f5a518f039fa74fd314d21994849a90625 Mon Sep 17 00:00:00 2001
|
||||
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
|
||||
Date: Wed, 4 May 2016 10:18:54 +0200
|
||||
Subject: [PATCH] configure: don't hardcode pkg-config
|
||||
|
||||
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
|
||||
---
|
||||
configure | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index c92cb99..2368680 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -7,6 +7,8 @@ prefix=/usr
|
||||
|
||||
enable_documentation=yes
|
||||
|
||||
+PKG_CONFIG="${PKG_CONFIG:-pkg-config}"
|
||||
+
|
||||
# Little helper function for reading args from the commandline.
|
||||
# it automatically handles -a b and -a=b variants, and returns 1 if
|
||||
# we need to shift $3.
|
||||
@@ -50,7 +52,7 @@ while (($# > 0)); do
|
||||
shift
|
||||
done
|
||||
|
||||
-if ! pkg-config --exists --print-errors " libkmod >= 15 "; then
|
||||
+if ! ${PKG_CONFIG} --exists --print-errors " libkmod >= 15 "; then
|
||||
echo "dracut needs pkg-config and libkmod >= 15." >&2
|
||||
exit 1
|
||||
fi
|
||||
@@ -64,8 +66,8 @@ sbindir ?= ${sbindir:-${prefix}/sbin}
|
||||
mandir ?= ${mandir:-${prefix}/share/man}
|
||||
enable_documentation ?= ${enable_documentation:-yes}
|
||||
bindir ?= ${bindir:-${prefix}/bin}
|
||||
-KMOD_CFLAGS ?= $(pkg-config --cflags " libkmod >= 15 ")
|
||||
-KMOD_LIBS ?= $(pkg-config --libs " libkmod >= 15 ")
|
||||
+KMOD_CFLAGS ?= $(${PKG_CONFIG} --cflags " libkmod >= 15 ")
|
||||
+KMOD_LIBS ?= $(${PKG_CONFIG} --libs " libkmod >= 15 ")
|
||||
EOF
|
||||
|
||||
{
|
@ -0,0 +1,54 @@
|
||||
From 016613c774baf3d30c6425a65ead05d8b55d6279 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kurtz <alexander@kurtz.be>
|
||||
Date: Fri, 6 May 2016 17:25:37 +0200
|
||||
Subject: [PATCH] dracut-systemd/dracut-cmdline.sh: Don't error out if there is
|
||||
no root= argument.
|
||||
|
||||
Thanks to systemd's gpt-auto-generator [0] (which implements the Discoverable
|
||||
Partitions Specification [1]), it is no longer necessary to always specify the
|
||||
root= argument.
|
||||
|
||||
However, dracut would still refuse to boot if there was no root= argument (or
|
||||
if it was set to the special value "gpt-auto" [2]). This commit stops dracut
|
||||
from aborting the boot process in these cases and simply lets systemd do its
|
||||
magic.
|
||||
|
||||
[0] https://github.com/systemd/systemd/blob/v229/src/gpt-auto-generator
|
||||
[1] https://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/
|
||||
[2] https://github.com/systemd/systemd/blob/v229/src/gpt-auto-generator/gpt-auto-generator.c#L928
|
||||
---
|
||||
modules.d/98dracut-systemd/dracut-cmdline.sh | 12 ++++++++++--
|
||||
1 file changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/98dracut-systemd/dracut-cmdline.sh b/modules.d/98dracut-systemd/dracut-cmdline.sh
|
||||
index a1dcf84..ccf24fb 100755
|
||||
--- a/modules.d/98dracut-systemd/dracut-cmdline.sh
|
||||
+++ b/modules.d/98dracut-systemd/dracut-cmdline.sh
|
||||
@@ -21,7 +21,12 @@ getargbool 0 rd.udev.log-priority=debug -d rd.udev.debug -d -n -y rdudevdebug &&
|
||||
|
||||
source_conf /etc/conf.d
|
||||
|
||||
-root=$(getarg root=)
|
||||
+# Get the "root=" parameter from the kernel command line, but differentiate
|
||||
+# between the case where it was set to the empty string and the case where it
|
||||
+# wasn't specified at all.
|
||||
+if ! root="$(getarg root=)"; then
|
||||
+ root='UNSET'
|
||||
+fi
|
||||
|
||||
rflags="$(getarg rootflags=)"
|
||||
getargbool 0 ro && rflags="${rflags},ro"
|
||||
@@ -65,9 +70,12 @@ case "$root" in
|
||||
/dev/*)
|
||||
root="block:${root}"
|
||||
rootok=1 ;;
|
||||
+ UNSET|gpt-auto)
|
||||
+ # systemd's gpt-auto-generator handles this case.
|
||||
+ rootok=1 ;;
|
||||
esac
|
||||
|
||||
-[ -z "$root" ] && die "No or empty root= argument"
|
||||
+[ -z "$root" ] && die "Empty root= argument"
|
||||
[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"
|
||||
|
||||
export root rflags fstype netroot NEWROOT
|
54
0073-move-ln_r-to-dracut-init.sh.patch
Normal file
54
0073-move-ln_r-to-dracut-init.sh.patch
Normal file
@ -0,0 +1,54 @@
|
||||
From 190150018798f88107fba119e92bd32e2a8d4b0b Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Mon, 2 May 2016 12:48:12 +0200
|
||||
Subject: [PATCH] move ln_r() to dracut-init.sh
|
||||
|
||||
---
|
||||
dracut-functions.sh | 12 ------------
|
||||
dracut-init.sh | 13 +++++++++++++
|
||||
2 files changed, 13 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
||||
index c7ea9f5..4496bfe 100755
|
||||
--- a/dracut-functions.sh
|
||||
+++ b/dracut-functions.sh
|
||||
@@ -167,18 +167,6 @@ convert_abs_rel() {
|
||||
printf "%s\n" "$__newpath"
|
||||
}
|
||||
|
||||
-if [[ "$(ln --help)" == *--relative* ]]; then
|
||||
- ln_r() {
|
||||
- ln -sfnr "${initdir}/$1" "${initdir}/$2"
|
||||
- }
|
||||
-else
|
||||
- ln_r() {
|
||||
- local _source=$1
|
||||
- local _dest=$2
|
||||
- [[ -d "${_dest%/*}" ]] && _dest=$(readlink -f "${_dest%/*}")/${_dest##*/}
|
||||
- ln -sfn -- "$(convert_abs_rel "${_dest}" "${_source}")" "${initdir}/${_dest}"
|
||||
- }
|
||||
-fi
|
||||
|
||||
# get_fs_env <device>
|
||||
# Get and the ID_FS_TYPE variable from udev for a device.
|
||||
diff --git a/dracut-init.sh b/dracut-init.sh
|
||||
index a195c32..d2bb845 100644
|
||||
--- a/dracut-init.sh
|
||||
+++ b/dracut-init.sh
|
||||
@@ -997,3 +997,16 @@ instmods() {
|
||||
[[ "$optional" ]] && return 0
|
||||
return $_ret
|
||||
}
|
||||
+
|
||||
+if [[ "$(ln --help)" == *--relative* ]]; then
|
||||
+ ln_r() {
|
||||
+ ln -sfnr "${initdir}/$1" "${initdir}/$2"
|
||||
+ }
|
||||
+else
|
||||
+ ln_r() {
|
||||
+ local _source=$1
|
||||
+ local _dest=$2
|
||||
+ [[ -d "${_dest%/*}" ]] && _dest=$(readlink -f "${_dest%/*}")/${_dest##*/}
|
||||
+ ln -sfn -- "$(convert_abs_rel "${_dest}" "${_source}")" "${initdir}/${_dest}"
|
||||
+ }
|
||||
+fi
|
21
0074-systemd-initrd-add-initrd-root-device.target.patch
Normal file
21
0074-systemd-initrd-add-initrd-root-device.target.patch
Normal file
@ -0,0 +1,21 @@
|
||||
From d4efc0aeeecc470d9a267b7f3c130f472488905c Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Wed, 25 May 2016 15:06:29 +0200
|
||||
Subject: [PATCH] systemd-initrd: add initrd-root-device.target
|
||||
|
||||
---
|
||||
modules.d/01systemd-initrd/module-setup.sh | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/modules.d/01systemd-initrd/module-setup.sh b/modules.d/01systemd-initrd/module-setup.sh
|
||||
index fb6a9ea..c1ccd2a 100755
|
||||
--- a/modules.d/01systemd-initrd/module-setup.sh
|
||||
+++ b/modules.d/01systemd-initrd/module-setup.sh
|
||||
@@ -28,6 +28,7 @@ install() {
|
||||
inst_multiple -o \
|
||||
$systemdsystemunitdir/initrd.target \
|
||||
$systemdsystemunitdir/initrd-fs.target \
|
||||
+ $systemdsystemunitdir/initrd-root-device.target \
|
||||
$systemdsystemunitdir/initrd-root-fs.target \
|
||||
$systemdsystemunitdir/initrd-switch-root.target \
|
||||
$systemdsystemunitdir/initrd-switch-root.service \
|
73
dracut.spec
73
dracut.spec
@ -16,7 +16,7 @@
|
||||
|
||||
Name: dracut
|
||||
Version: 044
|
||||
Release: 18.git20160108%{?dist}
|
||||
Release: 75%{?dist}
|
||||
|
||||
Summary: Initramfs generator using udev
|
||||
%if 0%{?fedora} || 0%{?rhel}
|
||||
@ -51,11 +51,70 @@ Patch13: 0013-base-dracut-lib.sh-dev_unit_name-guard-against-dev-b.patch
|
||||
Patch14: 0014-nbd-add-missing-generator.patch
|
||||
Patch15: 0015-fcoe-no-need-to-copy-lldpad-state.patch
|
||||
Patch16: 0016-dracut.sh-restorecon-final-image-file.patch
|
||||
Patch17: 0017-dracut.cmdline-remove-extra-from-ip-doc.patch
|
||||
Patch18: 0018-dracut.sh-fail-hard-if-we-find-modules-and-modules.d.patch
|
||||
Patch19: 0019-network-net-lib.sh-correctly-set-mac-address-for-ip-.patch
|
||||
Patch20: 0020-dracut-functions.sh-fix-check_vol_slaves-volume-grou.patch
|
||||
Patch21: 0021-multipath-fix-majmin_to_mpath_dev.patch
|
||||
Patch22: 0022-Fixed-vlan-bonding-bridging-team-logic.patch
|
||||
Patch23: 0023-TEST-30-ISCSI-some-tests-have-unknown-return-code.patch
|
||||
Patch24: 0024-network-add-mtu-to-list-of-variables-to-store-in-ove.patch
|
||||
Patch25: 0025-Correctly-handle-module-aliases.patch
|
||||
Patch26: 0026-network-if-rd.neednet-0-we-don-t-need-a-bootdev.patch
|
||||
Patch27: 0027-kernel-modules-add-usb-storage.patch
|
||||
Patch28: 0028-kernel-modules-join-instmods-and-install-all-usb-sto.patch
|
||||
Patch29: 0029-dracut-systemd-dracut-cmdline-ask-fix-dracut-kernel-.patch
|
||||
Patch30: 0030-base-init.sh-don-t-remove-99-cmdline-ask-on-hostonly.patch
|
||||
Patch31: 0031-documentation-hostonly-i18n-no-hostonly-i18n-i18n_in.patch
|
||||
Patch32: 0032-network-dhclient-script.sh-add-classless-static-rout.patch
|
||||
Patch33: 0033-dracut-systemd-dracut-pre-pivot.sh-Break-at-switch_r.patch
|
||||
Patch34: 0034-dracut-install-catch-ldd-message-cannot-execute-bina.patch
|
||||
Patch35: 0035-dracut.conf.5.asc-fix-bold.patch
|
||||
Patch36: 0036-watchdog-Do-not-add-hooks-if-systemd-module-is-inclu.patch
|
||||
Patch37: 0037-watchdog-install-module-for-active-watchdog.patch
|
||||
Patch38: 0038-watchdog-ensure-that-module-is-loaded-as-early-as-po.patch
|
||||
Patch39: 0039-lsinitrd-add-unpack-to-lsinitrd.patch
|
||||
Patch40: 0040-Do-not-use-deprecated-egrep-fgrep.patch
|
||||
Patch41: 0041-nfs-module-setup.sh-Use-colon-instead-of-dot-for-cho.patch
|
||||
Patch42: 0042-Clean-up-some-bashisms-from-bin-sh-scripts.patch
|
||||
Patch43: 0043-dracut-init.sh-Simplify-udev-rule-grepping.patch
|
||||
Patch44: 0044-dracut.sh-call-dracut-install-with-f-in-FIPS-mode.patch
|
||||
Patch45: 0045-dracut-init.sh-Add-file-argument-to-sed-s.patch
|
||||
Patch46: 0046-lsinitrd.sh-fixed-unpack-and-skipcpio-search.patch
|
||||
Patch47: 0047-dracut-init.sh-mark-error-messages-with-FAILED.patch
|
||||
Patch48: 0048-Use-dracut-install-to-install-kernel-modules.patch
|
||||
Patch49: 0049-Use-pkg-config-for-libkmod-CFLAGS-and-LIBS.patch
|
||||
Patch50: 0050-Fix-regressions-with-dracut-install-with-kernel-modu.patch
|
||||
Patch51: 0051-dracut-install-simplify-error-logic.patch
|
||||
Patch52: 0052-dracut-init.sh-beautify-instmods.patch
|
||||
Patch53: 0053-plymouth-plymouth-pretrigger.sh-also-trigger-acpi-su.patch
|
||||
Patch54: 0054-dracut-install-add-help-documentation.patch
|
||||
Patch55: 0055-NEWS-update-for-045.patch
|
||||
Patch56: 0056-Revert-fcoe-no-need-to-copy-lldpad-state.patch
|
||||
Patch57: 0057-base-init.sh-don-t-mount-run-with-noexec-if-the-init.patch
|
||||
Patch58: 0058-kate-config.patch
|
||||
Patch59: 0059-95resume-avoid-possible-symbolic-link-creation-error.patch
|
||||
Patch60: 0060-watchdog-module-setup.sh-rewrite.patch
|
||||
Patch61: 0061-drop-to-shell-on-die-if-rd.shell-1-is-set-explicitly.patch
|
||||
Patch62: 0062-dracut_install-honor-silent-flag.patch
|
||||
Patch63: 0063-dracut-install-make-use-of-_cleanup_-macros-and-impr.patch
|
||||
Patch64: 0064-removed-obsolete-kernel-module-functions-and-host_mo.patch
|
||||
Patch65: 0065-watchdog-clean-return-of-installkernel.patch
|
||||
Patch66: 0066-watchdog-start-traversing-the-device-tree-from-the-r.patch
|
||||
Patch67: 0067-dracut-10i18n-support-default-loadkeys-setfont-data-.patch
|
||||
Patch68: 0068-ensure-parent-dir-for-usr-lib-initrd-release-exists.patch
|
||||
Patch69: 0069-Fix-small-typo-in-dracut.cmdline-7.patch
|
||||
Patch70: 0070-systemd-ensure-journal-is-volatile.patch
|
||||
Patch71: 0071-configure-don-t-hardcode-pkg-config.patch
|
||||
Patch72: 0072-dracut-systemd-dracut-cmdline.sh-Don-t-error-out-if-.patch
|
||||
Patch73: 0073-move-ln_r-to-dracut-init.sh.patch
|
||||
Patch74: 0074-systemd-initrd-add-initrd-root-device.target.patch
|
||||
|
||||
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
|
||||
|
||||
|
||||
BuildRequires: bash git
|
||||
BuildRequires: kmod-devel >= 15
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
@ -63,7 +122,6 @@ BuildRequires: pkgconfig
|
||||
%endif
|
||||
%if 0%{?fedora}
|
||||
BuildRequires: bash-completion
|
||||
BuildRequires: pkgconfig
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version}
|
||||
@ -240,10 +298,13 @@ This package contains tools to assemble the local initrd and host configuration.
|
||||
cp %{SOURCE1} .
|
||||
|
||||
%build
|
||||
%configure --systemdsystemunitdir=%{_unitdir} --bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion) --libdir=%{_prefix}/lib \
|
||||
%configure --systemdsystemunitdir=%{_unitdir} \
|
||||
--bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion) \
|
||||
--libdir=%{_prefix}/lib \
|
||||
%if %{without doc}
|
||||
--disable-documentation
|
||||
--disable-documentation \
|
||||
%endif
|
||||
${NULL}
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
@ -511,6 +572,10 @@ rm -rf -- $RPM_BUILD_ROOT
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Jun 07 2016 Harald Hoyer <harald@redhat.com> - 044-75
|
||||
- fix for systemd >= 230
|
||||
- git snapshot
|
||||
|
||||
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 044-18.git20160108
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user