[dracut/f17] dracut-018-65.git20120612
Harald Hoyer
harald at fedoraproject.org
Tue Jun 12 16:56:12 UTC 2012
commit 6f6581eae4e4b96b42da86ab722e9ae06cc10b2a
Author: Harald Hoyer <harald at redhat.com>
Date: Tue Jun 12 18:55:44 2012 +0200
dracut-018-65.git20120612
- revert to "ip=dhcp" by default
...etwork-ifup.sh-default-to-dhcp-for-BOOTIF.patch | 28 ++++
...ork-ifup.sh-do-not-default-to-dhcp-for-in.patch | 33 ++++
...flict-between-cms-network-rules-and-defau.patch | 36 ++++
0058-Add-vlan-support-in-network-module.patch | 170 ++++++++++++++++++++
0059-Add-doc-for-vlan-cmdline.patch | 31 ++++
0060-Add-doc-for-bond-cmdline.patch | 35 ++++
0061-Add-doc-for-birdge-cmdline.patch | 29 ++++
...e-multiple-underlying-devices-of-a-bridge.patch | 168 +++++++++++++++++++
...-lib.sh-use-silent-mode-for-curl-if-TERM-.patch | 29 ++++
...functions-fixed-return-status-of-instmods.patch | 128 +++++++++++++++
dracut.spec | 15 ++-
11 files changed, 701 insertions(+), 1 deletions(-)
---
diff --git a/0055-Revert-network-ifup.sh-default-to-dhcp-for-BOOTIF.patch b/0055-Revert-network-ifup.sh-default-to-dhcp-for-BOOTIF.patch
new file mode 100644
index 0000000..769478c
--- /dev/null
+++ b/0055-Revert-network-ifup.sh-default-to-dhcp-for-BOOTIF.patch
@@ -0,0 +1,28 @@
+From 723386d03bf71b7a41986970f8d2cbaf3ad5abea Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald at redhat.com>
+Date: Tue, 12 Jun 2012 14:35:47 +0200
+Subject: [PATCH] Revert "network/ifup.sh: default to dhcp for BOOTIF"
+
+This reverts commit 4d0cefe6684c33a4d260ab58bf69cafa20e3778d.
+---
+ modules.d/40network/ifup.sh | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
+index aebbbc3..b8f07f4 100755
+--- a/modules.d/40network/ifup.sh
++++ b/modules.d/40network/ifup.sh
+@@ -202,13 +202,6 @@ if [ "$netif" = "$bridgename" ] && [ ! -e /tmp/net.$bridgename.up ]; then
+ brctl addif $bridgename $ethname
+ fi
+
+-# BOOTIF= defaults to dhcpv4
+-bootif=$(getargs BOOTIF=)
+-if [ -n "$bootif" ] ; then
+- do_dhcp -4
+- exit 0
+-fi
+-
+ # Specific configuration, spin through the kernel command line
+ # looking for ip= lines
+ for p in $(getargs ip=); do
diff --git a/0056-Revert-network-ifup.sh-do-not-default-to-dhcp-for-in.patch b/0056-Revert-network-ifup.sh-do-not-default-to-dhcp-for-in.patch
new file mode 100644
index 0000000..5a45a16
--- /dev/null
+++ b/0056-Revert-network-ifup.sh-do-not-default-to-dhcp-for-in.patch
@@ -0,0 +1,33 @@
+From 93643c8cef61d9df4688052752029b0b518c71da Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald at redhat.com>
+Date: Tue, 12 Jun 2012 14:36:34 +0200
+Subject: [PATCH] Revert "network/ifup.sh: do not default to dhcp, for
+ interfaces without ip=..."
+
+This reverts commit 588f0347536f3668708131353b2cb01f21594b59.
+---
+ modules.d/40network/ifup.sh | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
+index b8f07f4..2111b41 100755
+--- a/modules.d/40network/ifup.sh
++++ b/modules.d/40network/ifup.sh
+@@ -202,6 +202,17 @@ if [ "$netif" = "$bridgename" ] && [ ! -e /tmp/net.$bridgename.up ]; then
+ brctl addif $bridgename $ethname
+ fi
+
++# No ip lines default to dhcp
++ip=$(getarg ip)
++
++if [ -z "$ip" ]; then
++ if [ "$netroot" = "dhcp6" ]; then
++ do_dhcp -6
++ else
++ do_dhcp -4
++ fi
++fi
++
+ # Specific configuration, spin through the kernel command line
+ # looking for ip= lines
+ for p in $(getargs ip=); do
diff --git a/0057-resolve-conflict-between-cms-network-rules-and-defau.patch b/0057-resolve-conflict-between-cms-network-rules-and-defau.patch
new file mode 100644
index 0000000..f44a40e
--- /dev/null
+++ b/0057-resolve-conflict-between-cms-network-rules-and-defau.patch
@@ -0,0 +1,36 @@
+From 8a232c2785e000b2dfb06646246bc17fe74063c6 Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald at redhat.com>
+Date: Tue, 12 Jun 2012 14:40:43 +0200
+Subject: [PATCH] resolve conflict between cms network rules and default rules
+
+---
+ modules.d/40network/net-genrules.sh | 2 +-
+ modules.d/80cms/cmssetup.sh | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh
+index b3d5584..8a2df8f 100755
+--- a/modules.d/40network/net-genrules.sh
++++ b/modules.d/40network/net-genrules.sh
+@@ -48,7 +48,7 @@ fix_bootif() {
+
+ # Default: We don't know the interface to use, handle all
+ else
+- printf 'SUBSYSTEM=="net", RUN+="%s"\n' "/sbin/initqueue --onetime $ifup"
++ printf 'SUBSYSTEM=="net", RUN+="%s"\n' "/sbin/initqueue --onetime $ifup" > /etc/udev/rules.d/61-default-net.rules
+ fi
+
+ # Run the "online" hook
+diff --git a/modules.d/80cms/cmssetup.sh b/modules.d/80cms/cmssetup.sh
+index 41c853c..2208803 100755
+--- a/modules.d/80cms/cmssetup.sh
++++ b/modules.d/80cms/cmssetup.sh
+@@ -166,6 +166,8 @@ processcmsfile()
+ fi
+
+ printf 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="%s", KERNELS=="%s", ENV{INTERFACE}=="?*", RUN+="/sbin/initqueue --onetime --unique --name cmsifup-$env{INTERFACE} /sbin/cmsifup $env{INTERFACE}"\n' "$driver" "$devbusid" > /etc/udev/rules.d/99-cms.rules
++ # remove the default net rules
++ rm -f /etc/udev/rules.d/61-default-net.rules
+ [[ -f /etc/udev/rules.d/60-net.rules ]] \
+ || printf 'SUBSYSTEM=="net", ACTION=="online", RUN+="/sbin/initqueue --onetime --env netif=$env{INTERFACE} source_hook initqueue/online"\n' >> /etc/udev/rules.d/99-cms.rules
+
diff --git a/0058-Add-vlan-support-in-network-module.patch b/0058-Add-vlan-support-in-network-module.patch
new file mode 100644
index 0000000..3e970c5
--- /dev/null
+++ b/0058-Add-vlan-support-in-network-module.patch
@@ -0,0 +1,170 @@
+From 6daf7e43dfa48a986a86fe7da7e331e959eb1a00 Mon Sep 17 00:00:00 2001
+From: Cong Wang <xiyou.wangcong at gmail.com>
+Date: Tue, 29 May 2012 17:00:28 +0800
+Subject: [PATCH] Add vlan support in network module
+
+This patch adds basic vlan support in network module.
+
+The cmdline syntax for vlan is:
+
+ vlan=<vlanname>:<phydevice>
+
+for an example:
+
+ vlan=eth0.2:eth0
+
+or
+ vlan=vlan2:eth0
+
+See also patch 2/8.
+
+Cc: Harald Hoyer <harald at redhat.com>
+Cc: Dave Young <dyoung at redhat.com>
+Cc: Vivek Goyal <vgoyal at redhat.com>
+Signed-off-by: Cong Wang <xiyou.wangcong at gmail.com>
+
+Conflicts:
+ modules.d/40network/ifup.sh
+---
+ modules.d/40network/ifup.sh | 29 ++++++++++++++++++++++
+ modules.d/40network/module-setup.sh | 3 +++
+ modules.d/40network/net-genrules.sh | 5 ++++
+ modules.d/40network/parse-vlan.sh | 45 +++++++++++++++++++++++++++++++++++
+ 4 files changed, 82 insertions(+)
+ create mode 100644 modules.d/40network/parse-vlan.sh
+
+diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
+index 2111b41..46ce1e7 100755
+--- a/modules.d/40network/ifup.sh
++++ b/modules.d/40network/ifup.sh
+@@ -40,6 +40,17 @@ if [ -e /tmp/bridge.info ]; then
+ fi
+ 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)
++ else
++ netif="$vlanname"
++ fi
++ fi
++fi
++
+ # bail immediately if the interface is already up
+ # or we don't need the network
+ [ -f "/tmp/net.$netif.up" ] && exit 0
+@@ -202,6 +213,24 @@ if [ "$netif" = "$bridgename" ] && [ ! -e /tmp/net.$bridgename.up ]; then
+ brctl addif $bridgename $ethname
+ fi
+
++get_vid() {
++ case "$1" in
++ vlan*)
++ return ${1#vlan}
++ ;;
++ *.*)
++ return ${1##*.}
++ ;;
++ esac
++}
++
++if [ "$netif" = "$vlanname" ] && [ ! -e /tmp/net.$vlanname.up ]; then
++ modprobe 8021q
++ ip link set "$phydevice" up
++ wait_for_if_up "$phydevice"
++ ip link add dev "$vlanname" link "$phydevice" type vlan id "$(get_vid $vlanname; echo $?)"
++fi
++
+ # No ip lines default to dhcp
+ ip=$(getarg ip)
+
+diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
+index e32eb28..efe0511 100755
+--- a/modules.d/40network/module-setup.sh
++++ b/modules.d/40network/module-setup.sh
+@@ -71,6 +71,8 @@ installkernel() {
+ instmods ipv6
+ # bonding
+ instmods bonding
++ # vlan
++ instmods 8021q
+ }
+
+ install() {
+@@ -85,6 +87,7 @@ install() {
+ inst_hook pre-udev 50 "$moddir/ifname-genrules.sh"
+ inst_hook pre-udev 60 "$moddir/net-genrules.sh"
+ inst_hook cmdline 91 "$moddir/dhcp-root.sh"
++ inst_hook cmdline 95 "$moddir/parse-vlan.sh"
+ inst_hook cmdline 96 "$moddir/parse-bond.sh"
+ inst_hook cmdline 97 "$moddir/parse-bridge.sh"
+ inst_hook cmdline 98 "$moddir/parse-ip-opts.sh"
+diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh
+index 8a2df8f..4e0362a 100755
+--- a/modules.d/40network/net-genrules.sh
++++ b/modules.d/40network/net-genrules.sh
+@@ -31,6 +31,11 @@ fix_bootif() {
+ IFACES=${bondslaves%% *}
+ fi
+
++ if [ -e /tmp/vlan.info ]; then
++ . /tmp/vlan.info
++ IFACES=$phydevice
++ fi
++
+ ifup='/sbin/ifup $env{INTERFACE}'
+ [ -z "$netroot" ] && ifup="$ifup -m"
+
+diff --git a/modules.d/40network/parse-vlan.sh b/modules.d/40network/parse-vlan.sh
+new file mode 100644
+index 0000000..60b09d8
+--- /dev/null
++++ b/modules.d/40network/parse-vlan.sh
+@@ -0,0 +1,45 @@
++#!/bin/sh
++#
++# Format:
++# vlan=<vlanname>:<phydevice>
++#
++
++# return if vlan already parsed
++[ -n "$vlanname" ] && return
++
++# Check if vlan parameter is valid
++if getarg vlan= >/dev/null ; then
++ if [ -z "$netroot" ] ; then
++ die "No netboot configured, vlan is invalid"
++ fi
++ :
++fi
++
++parsevlan() {
++ local v=${1}:
++ set --
++ while [ -n "$v" ]; do
++ set -- "$@" "${v%%:*}"
++ v=${v#*:}
++ done
++
++ unset vlanname phydevice
++ case $# in
++ 2) vlanname=$1; phydevice=$2 ;;
++ *) die "vlan= requires two parameters" ;;
++ esac
++}
++
++unset vlanname phydevice
++
++if getarg vlan >/dev/null; then
++ # Read vlan= parameters if they exist
++ vlan="$(getarg vlan=)"
++ if [ ! "$vlan" = "vlan" ]; then
++ parsevlan "$(getarg vlan=)"
++ fi
++
++ echo "vlanname=\"$vlanname\"" > /tmp/vlan.info
++ echo "phydevice=\"$phydevice\"" >> /tmp/vlan.info
++ return
++fi
diff --git a/0059-Add-doc-for-vlan-cmdline.patch b/0059-Add-doc-for-vlan-cmdline.patch
new file mode 100644
index 0000000..d49f0ce
--- /dev/null
+++ b/0059-Add-doc-for-vlan-cmdline.patch
@@ -0,0 +1,31 @@
+From 70b9c73b69f15c99ab65e8f9b3ad159c8cbe2108 Mon Sep 17 00:00:00 2001
+From: Cong Wang <xiyou.wangcong at gmail.com>
+Date: Tue, 29 May 2012 17:00:29 +0800
+Subject: [PATCH] Add doc for vlan= cmdline
+
+Document vlan= cmdline in dracut.cmdline(7).
+
+Cc: Dave Young <dyoung at redhat.com>
+Cc: Harald Hoyer <harald at redhat.com>
+Cc: Vivek Goyal <vgoyal at redhat.com>
+Signed-off-by: Cong Wang <xiyou.wangcong at gmail.com>
+---
+ dracut.cmdline.7.asc | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
+index 884d194..58d90a7 100644
+--- a/dracut.cmdline.7.asc
++++ b/dracut.cmdline.7.asc
+@@ -314,6 +314,11 @@ auto6::: do IPv6 autoconfiguration
+ **rd.neednet=1**::
+ boolean, bring up network even without netroot set
+
++**vlan=_<vlanname>_:_<phydevice>_**::
++ Setup vlan device named <vlanname> on <phydeivce>.
++ We support the four styles of vlan names: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5),
++ DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5)
++
+ NFS
+ ~~~
+ **root=**[_<server-ip>_:]_<root-dir>_[:_<nfs-options>_]::
diff --git a/0060-Add-doc-for-bond-cmdline.patch b/0060-Add-doc-for-bond-cmdline.patch
new file mode 100644
index 0000000..093a8cd
--- /dev/null
+++ b/0060-Add-doc-for-bond-cmdline.patch
@@ -0,0 +1,35 @@
+From 3751f1a78ee693301b2e44a0e36cb8df54235821 Mon Sep 17 00:00:00 2001
+From: Cong Wang <xiyou.wangcong at gmail.com>
+Date: Tue, 29 May 2012 17:00:30 +0800
+Subject: [PATCH] Add doc for bond= cmdline
+
+Document bond= cmdline in dracut.cmdline(7).
+
+Cc: Harald Hoyer <harald at redhat.com>
+Cc: Dave Young <dyoung at redhat.com>
+Cc: Vivek Goyal <vgoyal at redhat.com>
+Signed-off-by: Cong Wang <xiyou.wangcong at gmail.com>
+---
+ dracut.cmdline.7.asc | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
+index 58d90a7..24d00ac 100644
+--- a/dracut.cmdline.7.asc
++++ b/dracut.cmdline.7.asc
+@@ -319,6 +319,15 @@ auto6::: do IPv6 autoconfiguration
+ We support the four styles of vlan names: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5),
+ DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5)
+
++**bond=_<bondname>_[:_<bondslaves>_:[:_<options>_]]**::
++ Setup bonding device <bondname> on top of <bondslaves>.
++ <bondslaves> is a comma-separated list of physical (ethernet) interfaces.
++ <options> is a comma-separated list on bonding options (modinfo bonding for details)
++ in format compatible with initscripts. If <options> includes multi-valued arp_ip_target option,
++ then its values should be separated by semicolon.
++ Bond without parameters assumes bond=bond0:eth0,eth1:mode=balance-rr
++
++
+ NFS
+ ~~~
+ **root=**[_<server-ip>_:]_<root-dir>_[:_<nfs-options>_]::
diff --git a/0061-Add-doc-for-birdge-cmdline.patch b/0061-Add-doc-for-birdge-cmdline.patch
new file mode 100644
index 0000000..00f7be4
--- /dev/null
+++ b/0061-Add-doc-for-birdge-cmdline.patch
@@ -0,0 +1,29 @@
+From 7e0b500a08a50f40b2304ac63eccddce3c0fbfbd Mon Sep 17 00:00:00 2001
+From: Cong Wang <xiyou.wangcong at gmail.com>
+Date: Tue, 29 May 2012 17:00:31 +0800
+Subject: [PATCH] Add doc for birdge= cmdline
+
+Document bridge= cmdline in dracut.cmdline(7).
+
+Cc: Harald Hoyer <harald at redhat.com>
+Cc: Dave Young <dyoung at redhat.com>
+Cc: Vivek Goyal <vgoyal at redhat.com>
+Signed-off-by: Cong Wang <xiyou.wangcong at gmail.com>
+---
+ dracut.cmdline.7.asc | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
+index 24d00ac..324dd19 100644
+--- a/dracut.cmdline.7.asc
++++ b/dracut.cmdline.7.asc
+@@ -327,6 +327,9 @@ auto6::: do IPv6 autoconfiguration
+ then its values should be separated by semicolon.
+ Bond without parameters assumes bond=bond0:eth0,eth1:mode=balance-rr
+
++**bridge=_<bridgename>_:_<ethname>_**::
++ Setup bridge <bridgename> with <ethname>. Bridge without parameters assumes bridge=br0:eth0
++
+
+ NFS
+ ~~~
diff --git a/0062-Handle-multiple-underlying-devices-of-a-bridge.patch b/0062-Handle-multiple-underlying-devices-of-a-bridge.patch
new file mode 100644
index 0000000..9405afe
--- /dev/null
+++ b/0062-Handle-multiple-underlying-devices-of-a-bridge.patch
@@ -0,0 +1,168 @@
+From 7e0fc8e3e81ff24b8d669801d5cd43456a140163 Mon Sep 17 00:00:00 2001
+From: Cong Wang <xiyou.wangcong at gmail.com>
+Date: Thu, 31 May 2012 22:07:38 +0800
+Subject: [PATCH] Handle multiple underlying devices of a bridge
+
+A bridge device with only one underlying ethernet device is almost
+useless, for sure we want to support a bridge with multiple
+underlying devices.
+
+This patch adds the support by extending <ethname> in the original
+bridge= cmdline to a comma-separated list of ethernet interfaces.
+
+Cc: Harald Hoyer <harald at redhat.com>
+Cc: Dave Young <dyoung at redhat.com>
+Cc: Vivek Goyal <vgoyal at redhat.com>
+Signed-off-by: Cong Wang <xiyou.wangcong at gmail.com>
+---
+ dracut.cmdline.7.asc | 5 +++--
+ modules.d/40network/ifup.sh | 38 ++++++++++++++++++++---------------
+ modules.d/40network/net-genrules.sh | 2 +-
+ modules.d/40network/parse-bridge.sh | 17 ++++++++--------
+ 4 files changed, 35 insertions(+), 27 deletions(-)
+
+diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
+index 324dd19..c0fae89 100644
+--- a/dracut.cmdline.7.asc
++++ b/dracut.cmdline.7.asc
+@@ -327,8 +327,9 @@ auto6::: do IPv6 autoconfiguration
+ then its values should be separated by semicolon.
+ Bond without parameters assumes bond=bond0:eth0,eth1:mode=balance-rr
+
+-**bridge=_<bridgename>_:_<ethname>_**::
+- Setup bridge <bridgename> with <ethname>. Bridge without parameters assumes bridge=br0:eth0
++**bridge=_<bridgename>_:_<ethnames>_**::
++ Setup bridge <bridgename> with <ethnames>. <ethnames> is a comma-separated
++ list of physical (ethernet) interfaces. Bridge without parameters assumes bridge=br0:eth0
+
+
+ NFS
+diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
+index 46ce1e7..8b5c27b 100755
+--- a/modules.d/40network/ifup.sh
++++ b/modules.d/40network/ifup.sh
+@@ -31,13 +31,15 @@ fi
+ # bridge this interface?
+ if [ -e /tmp/bridge.info ]; then
+ . /tmp/bridge.info
+- if [ "$netif" = "$ethname" ]; then
+- if [ "$netif" = "$bondname" ] && [ -n "$DO_BOND_SETUP" ] ; then
+- : # We need to really setup bond (recursive call)
+- else
+- netif="$bridgename"
++ for ethname in $ethnames ; do
++ if [ "$netif" = "$ethname" ]; then
++ if [ "$netif" = "$bondname" ] && [ -n "$DO_BOND_SETUP" ] ; then
++ : # We need to really setup bond (recursive call)
++ else
++ netif="$bridgename"
++ fi
+ fi
+- fi
++ done
+ fi
+
+ if [ -e /tmp/vlan.info ]; then
+@@ -199,18 +201,22 @@ fi
+
+ # XXX need error handling like dhclient-script
+
++if [ -e /tmp/bridge.info ]; then
++ . /tmp/bridge.info
+ # start bridge if necessary
+-if [ "$netif" = "$bridgename" ] && [ ! -e /tmp/net.$bridgename.up ]; then
+- if [ "$ethname" = "$bondname" ] ; then
+- DO_BOND_SETUP=yes ifup $bondname
+- else
+- ip link set $ethname up
++ if [ "$netif" = "$bridgename" ] && [ ! -e /tmp/net.$bridgename.up ]; then
++ brctl addbr $bridgename
++ brctl setfd $bridgename 0
++ for ethname in $ethnames ; do
++ if [ "$ethname" = "$bondname" ] ; then
++ DO_BOND_SETUP=yes ifup $bondname
++ else
++ ip link set $ethname up
++ fi
++ wait_for_if_up $ethname
++ brctl addif $bridgename $ethname
++ done
+ fi
+- wait_for_if_up $ethname
+- # Create bridge and add eth to bridge
+- brctl addbr $bridgename
+- brctl setfd $bridgename 0
+- brctl addif $bridgename $ethname
+ fi
+
+ get_vid() {
+diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh
+index 4e0362a..d8f8f8d 100755
+--- a/modules.d/40network/net-genrules.sh
++++ b/modules.d/40network/net-genrules.sh
+@@ -21,7 +21,7 @@ fix_bootif() {
+ # bridge: attempt only the defined interface
+ if [ -e /tmp/bridge.info ]; then
+ . /tmp/bridge.info
+- IFACES=$ethname
++ IFACES=${ethnames%% *}
+ fi
+
+ # bond: attempt only the defined interface (override bridge defines)
+diff --git a/modules.d/40network/parse-bridge.sh b/modules.d/40network/parse-bridge.sh
+index 6e1fee1..5728fb6 100755
+--- a/modules.d/40network/parse-bridge.sh
++++ b/modules.d/40network/parse-bridge.sh
+@@ -3,8 +3,9 @@
+ # ex: ts=8 sw=4 sts=4 et filetype=sh
+ #
+ # Format:
+-# bridge=<bridgename>:<ethname>
++# bridge=<bridgename>:<ethnames>
+ #
++# <ethnames> is a comma-separated list of physical (ethernet) interfaces
+ # bridge without parameters assumes bridge=br0:eth0
+ #
+
+@@ -24,16 +25,16 @@ parsebridge() {
+ v=${v#*:}
+ done
+
+- unset bridgename ethname
++ unset bridgename ethnames
+ case $# in
+- 0) bridgename=br0; ethname=$iface ;;
++ 0) bridgename=br0; ethnames=$iface ;;
+ 1) die "bridge= requires two parameters" ;;
+- 2) bridgename=$1; ethname=$2 ;;
++ 2) bridgename=$1; ethnames=$(echo $2|tr "," " ") ;;
+ *) die "bridge= requires two parameters" ;;
+ esac
+ }
+
+-unset bridgename ethname
++unset bridgename ethnames
+
+ iface=eth0
+ if [ -e /tmp/bond.info ]; then
+@@ -43,7 +44,7 @@ if [ -e /tmp/bond.info ]; then
+ fi
+ fi
+
+-# Parse bridge for bridgename and ethname
++# Parse bridge for bridgename and ethnames
+ if bridge="$(getarg bridge)"; then
+ # Read bridge= parameters if they exist
+ if [ -n "$bridge" ]; then
+@@ -52,9 +53,9 @@ if bridge="$(getarg bridge)"; then
+ # Simple default bridge
+ if [ -z "$bridgename" ]; then
+ bridgename=br0
+- ethname=$iface
++ ethnames=$iface
+ fi
+ echo "bridgename=$bridgename" > /tmp/bridge.info
+- echo "ethname=$ethname" >> /tmp/bridge.info
++ echo "ethnames=\"$ethnames\"" >> /tmp/bridge.info
+ return
+ fi
diff --git a/0063-url-lib-url-lib.sh-use-silent-mode-for-curl-if-TERM-.patch b/0063-url-lib-url-lib.sh-use-silent-mode-for-curl-if-TERM-.patch
new file mode 100644
index 0000000..3a4f201
--- /dev/null
+++ b/0063-url-lib-url-lib.sh-use-silent-mode-for-curl-if-TERM-.patch
@@ -0,0 +1,29 @@
+From 0e104d73ef6f67c7515088ec65337302ff4f5fb0 Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald at redhat.com>
+Date: Tue, 12 Jun 2012 15:00:08 +0200
+Subject: [PATCH] url-lib/url-lib.sh: use silent mode for curl if TERM=dumb
+
+---
+ modules.d/45url-lib/url-lib.sh | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/modules.d/45url-lib/url-lib.sh b/modules.d/45url-lib/url-lib.sh
+index e9ece70..ef351ff 100755
+--- a/modules.d/45url-lib/url-lib.sh
++++ b/modules.d/45url-lib/url-lib.sh
+@@ -54,8 +54,15 @@ add_url_handler() {
+
+ export CURL_HOME="/run/initramfs/url-lib"
+ mkdir -p $CURL_HOME
++
++# we do not want --progress-bar as it slows down curl significantly
+ curl_args="--location --retry 3 --fail --show-error"
+
++# technically "dumb" can handle the progress bar, but the only thing I've ever
++# seen using TERM=dumb is s390 CMS, and it's too dumb for --progress-bar or
++# the standard output
++[ "$TERM" = "dumb" ] && curl_args="$curl_args --silent"
++
+ curl_fetch_url() {
+ local url="$1" outloc="$2"
+ echo "$url" > /proc/self/fd/0
diff --git a/0064-dracut-functions-fixed-return-status-of-instmods.patch b/0064-dracut-functions-fixed-return-status-of-instmods.patch
new file mode 100644
index 0000000..4c45baf
--- /dev/null
+++ b/0064-dracut-functions-fixed-return-status-of-instmods.patch
@@ -0,0 +1,128 @@
+From eb74dc4b0752731e5bf6929bec06d16aebf93b03 Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald at redhat.com>
+Date: Tue, 12 Jun 2012 11:06:58 -0400
+Subject: [PATCH] dracut-functions: fixed return status of instmods()
+
+---
+ dracut-functions.sh | 24 ++++++++++++++++--------
+ dracut.sh | 4 ++++
+ 2 files changed, 20 insertions(+), 8 deletions(-)
+
+diff --git a/dracut-functions.sh b/dracut-functions.sh
+index ccf3ba6..7b1c8dc 100755
+--- a/dracut-functions.sh
++++ b/dracut-functions.sh
+@@ -1054,17 +1054,17 @@ install_kmod_with_fw() {
+ # rest of args = arguments to modprobe
+ # _fderr specifies FD passed from surrounding scope
+ for_each_kmod_dep() {
+- local _func=$1 _kmod=$2 _cmd _modpath _options _found=0
++ local _func=$1 _kmod=$2 _cmd _modpath _options _ret
+ shift 2
+ modprobe "$@" --ignore-install --show-depends $_kmod 2>&${_fderr} | (
+ while read _cmd _modpath _options; do
+ [[ $_cmd = insmod ]] || continue
+ $_func ${_modpath} || exit $?
+- _found=1
+ done
+- [[ $_found -eq 0 ]] && exit 1
+ exit 0
+ )
++ _ret=$?
++ return $_ret
+ }
+
+ # filter kernel modules to install certain modules that meet specific
+@@ -1130,16 +1130,19 @@ instmods() {
+
+ function inst1mod() {
+ local _mod="$1"
++ local _ret=0
+ case $_mod in
+ =*)
+ if [ -f $srcmods/modules.${_mod#=} ]; then
+ ( [[ "$_mpargs" ]] && echo $_mpargs
+ cat "${srcmods}/modules.${_mod#=}" ) \
+ | instmods
++ ((_ret+=$?))
+ else
+ ( [[ "$_mpargs" ]] && echo $_mpargs
+ find "$srcmods" -path "*/${_mod#=}/*" -printf '%f\n' ) \
+ | instmods
++ ((_ret+=$?))
+ fi
+ ;;
+ --*) _mpargs+=" $_mod" ;;
+@@ -1152,13 +1155,13 @@ instmods() {
+
+ if [[ $omit_drivers ]] && [[ "$1" =~ $omit_drivers ]]; then
+ dinfo "Omitting driver ${_mod##$srcmods}"
+- return
++ return 0
+ fi
+ # If we are building a host-specific initramfs and this
+ # module is not already loaded, move on to the next one.
+ [[ $hostonly ]] && ! grep -qe "\<${_mod//-/_}\>" /proc/modules \
+ && ! echo $add_drivers | grep -qe "\<${_mod}\>" \
+- && return
++ && return 0
+
+ # We use '-d' option in modprobe only if modules prefix path
+ # differs from default '/'. This allows us to use Dracut with
+@@ -1173,6 +1176,7 @@ instmods() {
+ ((_ret+=$?))
+ ;;
+ esac
++ return $_ret
+ }
+
+ function instmods_1() {
+@@ -1180,19 +1184,23 @@ instmods() {
+ if (($# == 0)); then # filenames from stdin
+ while read _mod; do
+ inst1mod "${_mod%.ko*}"
++ ((_ret+=$?))
+ done
+ fi
+ while (($# > 0)); do # filenames as arguments
+ inst1mod ${1%.ko*}
++ ((_ret+=$?))
+ shift
+ done
+ return $_ret
+ }
+
+ local _filter_not_found='FATAL: Module .* not found.'
++ local _ret=0;
+ # Capture all stderr from modprobe to _fderr. We could use {var}>...
+ # redirections, but that would make dracut require bash4 at least.
+- eval "( instmods_1 \"\$@\" ) ${_fderr}>&1" \
+- | while read line; do [[ "$line" =~ $_filter_not_found ]] || echo $line;done | derror
+- return $?
++ eval "( instmods_1 \"\$@\" ) ${_fderr}>&1" | \
++ while read line; do [[ "$line" =~ $_filter_not_found ]] || echo $line;done | derror
++ _ret=$?
++ return $_ret
+ }
+diff --git a/dracut.sh b/dracut.sh
+index 44dcc94..eb58f78 100755
+--- a/dracut.sh
++++ b/dracut.sh
+@@ -26,6 +26,9 @@
+ # store for logging
+ dracut_args="$@"
+
++# we want the whole pipe to succeed
++set -o pipefail
++
+ usage() {
+ # 80x25 linebreak here ^
+ cat << EOF
+@@ -729,6 +732,7 @@ done
+ unset moddir
+
+ for i in $modules_loaded; do
++ mkdir -p $initdir/lib/dracut
+ echo "$i" >> $initdir/lib/dracut/modules.txt
+ done
+
diff --git a/dracut.spec b/dracut.spec
index fd9920e..4b7c782 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -10,7 +10,7 @@
Name: dracut
Version: 018
-Release: 55.git20120611%{?dist}
+Release: 65.git20120612%{?dist}
Summary: Initramfs generator using udev
%if 0%{?fedora} || 0%{?rhel}
@@ -78,6 +78,16 @@ Patch51: 0051-dasd_mod-change-rd.dasd-to-dasd_mod-kernel-parameter.patch
Patch52: 0052-dracut.spec-remove-typo-from-BuildRequires-for-suse.patch
Patch53: 0053-kernel-modules-module-setup.sh-include-omapdrm-in-th.patch
Patch54: 0054-network-ifup.sh-default-to-dhcp-for-BOOTIF.patch
+Patch55: 0055-Revert-network-ifup.sh-default-to-dhcp-for-BOOTIF.patch
+Patch56: 0056-Revert-network-ifup.sh-do-not-default-to-dhcp-for-in.patch
+Patch57: 0057-resolve-conflict-between-cms-network-rules-and-defau.patch
+Patch58: 0058-Add-vlan-support-in-network-module.patch
+Patch59: 0059-Add-doc-for-vlan-cmdline.patch
+Patch60: 0060-Add-doc-for-bond-cmdline.patch
+Patch61: 0061-Add-doc-for-birdge-cmdline.patch
+Patch62: 0062-Handle-multiple-underlying-devices-of-a-bridge.patch
+Patch63: 0063-url-lib-url-lib.sh-use-silent-mode-for-curl-if-TERM-.patch
+Patch64: 0064-dracut-functions-fixed-return-status-of-instmods.patch
BuildArch: noarch
@@ -393,6 +403,9 @@ rm -rf $RPM_BUILD_ROOT
%dir /var/lib/dracut/overlay
%changelog
+* Tue Jun 12 2012 Harald Hoyer <harald at redhat.com> 018-65.git20120612
+- revert to "ip=dhcp" by default
+
* Mon Jun 11 2012 Harald Hoyer <harald at redhat.com> 018-55.git20120611
- default to dhcp for BOOTIF
More information about the scm-commits
mailing list