Skip to contentSkip to conversation

network-script: use default network device

PATCH Applied Bill Nottingham 2 participants 2 messages Jan 31, 2006 – Feb 10, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 network-script: use default network device

(Warning: I'm not subscribed, please CC me on replies...)

Rather than require config changes if you aren't using eth0, use the default network device available no matter the name. It can still be configured if you want a specific network device.

Bill

tools/examples/network-bridge +1 -0
diff -ru xen-3.0.0/tools/examples/network-bridge xen-3.0.0-new/tools/examples/network-bridge
@@ -61,6 +61,7 @@
 
 vifnum=${vifnum:-0}
 bridge=${bridge:-xenbr${vifnum}}
+netdev=${netdev:-$(ip route list default scope global| awk '{ print $NF }')}
 netdev=${netdev:-eth${vifnum}}
 antispoof=${antispoof:-no}
 
tools/examples/xend-config.sxp +2 -2
diff -ru xen-3.0.0/tools/examples/xend-config.sxp xen-3.0.0-new/tools/examples/xend-config.sxp
@@ -70,8 +70,8 @@
 #
 # (network-script network-bridge)
 #
-# Your eth0 is used as the outgoing interface, by default.  To use a different
-# one (e.g. eth1) use
+# Your default ethernet device is used as the outgoing interface, by default. 
+# To use a different one (e.g. eth1) use
 #
 # (network-script 'network-bridge netdev=eth1')
 #
tools/examples/xend-config.sxp.mem-min +2 -2
diff -ru xen-3.0.0/tools/examples/xend-config.sxp.mem-min xen-3.0.0-new/tools/examples/xend-config.sxp.mem-min
@@ -70,8 +70,8 @@
 #
 # (network-script network-bridge)
 #
-# Your eth0 is used as the outgoing interface, by default.  To use a different
-# one (e.g. eth1) use
+# Your default ethernet device is used as the outgoing interface, by default.
+# To use a different one (e.g. eth1) use
 #
 # (network-script 'network-bridge netdev=eth1')
 #

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Applied
#1 lore raw
Quoted 5 lines · Bill Nottingham

(Warning: I'm not subscribed, please CC me on replies...)

Rather than require config changes if you aren't using eth0, use the default network device available no matter the name. It can still be configured if you want a specific network device.

Applied, thank you.

Could you please include a Signed-off-by line in your patches from now on?

Thanks,

Ewan.