diff options
author | Harald Hoyer <harald@redhat.com> | 2013-08-09 14:21:29 +0200 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2013-08-09 14:21:29 +0200 |
commit | f8c4a0f4e5e46e7b415502f39eb98c7f261086a3 (patch) | |
tree | b888b11ebb6397582d545d75acc4a15caae121b7 /0018-network-net-lib.sh-fix-ibft-interface-configuration.patch | |
parent | da021423ae95d6f703b30c16de1f5279dcf29742 (diff) | |
download | dracut-f8c4a0f4e5e46e7b415502f39eb98c7f261086a3.tar.gz dracut-f8c4a0f4e5e46e7b415502f39eb98c7f261086a3.tar.xz dracut-f8c4a0f4e5e46e7b415502f39eb98c7f261086a3.zip |
dracut-031-22.git20130809
- lsinitrd.sh: add old cpio signature
- dracut.sh: call find with -print0 and cpio with --null
- dracut.asc: small corrections
- systemd/dracut-initqueue.sh: continue to boot if finished failed
- dracut.sh/dracut-functions.sh: handle root on non-block device
- dracut-functions.sh: removed non dracut-install shell functions
- dracut-functions.sh: inst_multiple == dracut_install
- 51-dracut-rescue.install: fixed rescue image creation
- dracut.sh: do not strip in FIPS mode
Resolves: rhbz#990250
- dracut.sh: check the value of --kver
- crypt: Fix typo--/etc/crypttab not /etc/cryptab
- network/net-lib.sh: fix ibft interface configuration
- iscsi/module-setup.sh: install some modules regardless of hostonly
- multipath: need_shutdown if multipath devices exist
Resolves: rhbz#994913
- omit drivers fix
Diffstat (limited to '0018-network-net-lib.sh-fix-ibft-interface-configuration.patch')
-rw-r--r-- | 0018-network-net-lib.sh-fix-ibft-interface-configuration.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/0018-network-net-lib.sh-fix-ibft-interface-configuration.patch b/0018-network-net-lib.sh-fix-ibft-interface-configuration.patch new file mode 100644 index 0000000..fa20e3b --- /dev/null +++ b/0018-network-net-lib.sh-fix-ibft-interface-configuration.patch @@ -0,0 +1,58 @@ +From 0b11ea71996a7b804afbc38d1d5461fb0f4ef882 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 7 Aug 2013 16:05:03 +0200 +Subject: [PATCH] network/net-lib.sh: fix ibft interface configuration + +also skip ibft$num names, which have been already given + +https://bugzilla.redhat.com/show_bug.cgi?id=989944 +--- + modules.d/40network/net-lib.sh | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 494960c..ca4b393 100644 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -172,13 +172,20 @@ save_netinfo() { + } + + set_ifname() { +- local name="$1" mac="$2" num=0 n="" ++ local name="$1" mac="$2" num=-1 n="" + # if it's already set, return the existing name + for n in $(getargs ifname=); do + strstr "$n" "$mac" && echo ${n%%:*} && return + done + # otherwise, pick a new name and use that +- while [ -e /sys/class/net/$name$num ]; do num=$(($num+1)); done ++ while :; do ++ num=$(($num+1)); ++ [ -e /sys/class/net/$name$num ] && continue ++ for n in $(getargs ifname=); do ++ [ "$name$num" = "${n%%:*}" ] && continue 2 ++ done ++ break ++ done + echo "ifname=$name$num:$mac" >> /etc/cmdline.d/45-ifname.conf + echo "$name$num" + } +@@ -205,6 +212,9 @@ ibft_to_cmdline() { + mac=$(read a < ${iface}/mac; echo $a) + [ -z "$mac" ] && continue + dev=$(set_ifname ibft $mac) ++ ++ [ -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) +@@ -215,6 +225,8 @@ ibft_to_cmdline() { + echo "ip=$dev:dhcp" + elif [ -e ${iface}/ip-addr ]; then + [ -e ${iface}/ip-addr ] && ip=$(read a < ${iface}/ip-addr; echo $a) ++ # skip not assigned ip adresses ++ [ "$ip" = "0.0.0.0" ] && continue + [ -e ${iface}/gateway ] && gw=$(read a < ${iface}/gateway; echo $a) + [ -e ${iface}/subnet-mask ] && mask=$(read a < ${iface}/subnet-mask; echo $a) + [ -e ${iface}/hostname ] && hostname=$(read a < ${iface}/hostname; echo $a) |