[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] hotplug: network-bridge: fix for interfaces with no gateway
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1341877305 -3600 # Node ID 310aa4c07d02168234a36e113a76d0d4eef373a7 # Parent 1d33f934dd675a1b91d2d4e0fa2d2a873a8debf5 hotplug: network-bridge: fix for interfaces with no gateway This comes from an old Debian bug report http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588477 which refers to http://lists.xen.org/archives/html/xen-users/2010-06/msg00420.html. Although we no longer have a trap in _claim_lock as described (this was removed in 25590:bb250383a4f5 "hotplug/Linux: use flock based locking") and the use of network-* scripts is discouraged (in favour of using distro provided mechanisms) the general principal that relying on the semantics of /bin/sh's && is unwise seems sound. Signed-off-by: Ian Campbell <ian.campbel@xxxxxxxxxx> diff -r 1d33f934dd67 -r 310aa4c07d02 tools/hotplug/Linux/network-bridge --- a/tools/hotplug/Linux/network-bridge Tue Jul 10 00:14:54 2012 +0100 +++ b/tools/hotplug/Linux/network-bridge Tue Jul 10 00:41:45 2012 +0100 @@ -115,7 +115,9 @@ do_ifup() { ip addr add ${addr_pfx} dev $1 fi ip link set dev $1 up - [ -n "$gateway" ] && ip route add default via ${gateway} + if [ -n "$gateway" ] ; then + ip route add default via ${gateway} + fi fi } _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |