diff options
author | Harald Hoyer <harald@redhat.com> | 2013-09-04 13:43:12 +0200 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2013-09-04 13:43:12 +0200 |
commit | fe48c9c4e590d7ab905da3307e021b9c48545a9a (patch) | |
tree | 29503658db53c8f22eba77857925b7d33936cf2f /0021-net-lib-ibft_to_cmdline-fixes.patch | |
parent | b6aad2a9c88b5822b30c1686ce66dd31e2fb1a80 (diff) | |
download | dracut-fe48c9c4e590d7ab905da3307e021b9c48545a9a.tar.gz dracut-fe48c9c4e590d7ab905da3307e021b9c48545a9a.tar.xz dracut-fe48c9c4e590d7ab905da3307e021b9c48545a9a.zip |
dracut-032-23.git20130904
- fixed curl error with zero size kickstart file
Resolves: rhbz#989133
- fixed systemd-cat failure, when systemd is installed
but not actually running
Resolves: rhbz#1002021
- do not fail on empty dracut module directories
Resolves: rhbz#1003153
Diffstat (limited to '0021-net-lib-ibft_to_cmdline-fixes.patch')
-rw-r--r-- | 0021-net-lib-ibft_to_cmdline-fixes.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/0021-net-lib-ibft_to_cmdline-fixes.patch b/0021-net-lib-ibft_to_cmdline-fixes.patch new file mode 100644 index 0000000..5d4c681 --- /dev/null +++ b/0021-net-lib-ibft_to_cmdline-fixes.patch @@ -0,0 +1,57 @@ +From f2cbd4cbd639df9b0f3d9320df491bf23c109edb Mon Sep 17 00:00:00 2001 +From: WANG Chao <chaowang@redhat.com> +Date: Wed, 4 Sep 2013 01:29:58 +0800 +Subject: [PATCH] net-lib: ibft_to_cmdline() fixes + +Fix 3 issues in ibft_to_cmdline(): +- unset local variables at the beginning of each loop +- only write vlan.conf when we write out ip=xxx +- when vlan id is 0, don't write out vlan.conf. Because 0 means untagged + and we don't actually need vlan interface. +--- + modules.d/40network/net-lib.sh | 15 +++++++++------ + 1 file changed, 9 insertions(+), 6 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index ca4b393..82c4f72 100644 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -203,11 +203,13 @@ fix_bootif() { + } + + ibft_to_cmdline() { +- local iface="" mac="" dev="" +- local dhcp="" ip="" gw="" mask="" hostname="" ++ local iface="" + modprobe -q iscsi_ibft + ( + for iface in /sys/firmware/ibft/ethernet*; do ++ local mac="" dev="" ++ local dhcp="" ip="" gw="" mask="" hostname="" ++ + [ -e ${iface}/mac ] || continue + mac=$(read a < ${iface}/mac; echo $a) + [ -z "$mac" ] && continue +@@ -216,10 +218,6 @@ ibft_to_cmdline() { + [ -e /tmp/net.${dev}.has_ibft_config ] && continue + + [ -e ${iface}/dhcp ] && dhcp=$(read a < ${iface}/dhcp; echo $a) +- if [ -e ${iface}/vlan ]; then +- vlan=$(read a < ${iface}/vlan; echo $a) +- echo "vlan=$vlan:$dev" +- fi + + if [ -n "$dhcp" ]; then + echo "ip=$dev:dhcp" +@@ -244,6 +242,11 @@ ibft_to_cmdline() { + ls -l ${iface} | vinfo + fi + ++ if [ -e ${iface}/vlan ]; then ++ vlan=$(read a < ${iface}/vlan; echo $a) ++ [ "$vlan" -ne "0" ] && echo "vlan=$vlan:$dev" ++ fi ++ + echo $mac > /tmp/net.${dev}.has_ibft_config + done + ) >> /etc/cmdline.d/40-ibft.conf |