From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bill Nottingham Subject: [PATCH] network-script: use default network device Date: Tue, 31 Jan 2006 12:32:25 -0500 Message-ID: <20060131173225.GA2766@devserv.devel.redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="YZ5djTAD1cGYuMQK" Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline (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 --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="xen-default-network.patch" diff -ru xen-3.0.0/tools/examples/network-bridge xen-3.0.0-new/tools/examples/network-bridge --- xen-3.0.0/tools/examples/network-bridge 2006-01-25 15:30:13.000000000 -0500 +++ xen-3.0.0-new/tools/examples/network-bridge 2006-01-31 12:20:25.000000000 -0500 @@ -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} diff -ru xen-3.0.0/tools/examples/xend-config.sxp xen-3.0.0-new/tools/examples/xend-config.sxp --- xen-3.0.0/tools/examples/xend-config.sxp 2006-01-31 12:23:38.000000000 -0500 +++ xen-3.0.0-new/tools/examples/xend-config.sxp 2006-01-31 12:24:44.000000000 -0500 @@ -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') # 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 --- xen-3.0.0/tools/examples/xend-config.sxp.mem-min 2006-01-06 17:42:59.000000000 -0500 +++ xen-3.0.0-new/tools/examples/xend-config.sxp.mem-min 2006-01-31 12:25:13.000000000 -0500 @@ -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') # --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --YZ5djTAD1cGYuMQK--