[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-users] network scripts

  • To: <xen-users@xxxxxxxxxxxxxxxxxxx>
  • From: "Lockenvitz, Jan \(EXT\)" <Jan.Lockenvitz.extern@xxxxxxxxxxxxxx>
  • Date: Wed, 24 Aug 2005 11:56:13 +0200
  • Delivery-date: Wed, 24 Aug 2005 09:54:44 +0000
  • List-id: Xen user discussion <xen-users.lists.xensource.com>
  • Thread-index: AcWokhs0981x4QF8SGaDLfh4b8zOJg==
  • Thread-topic: network scripts


i had a problem with the network script "network-bridge" (after xend start network was down). Because i have a german localized Linux version the MAC-address of my eth could not be found ("Harware Adresse" instead of "HWadd"). I changed the network script so it is working for me and hopefully is independent of localized versions:

--- network-bridge.org  2005-08-24 12:20:20.497526353 +0200
+++ network-bridge      2005-08-24 13:31:53.838944412 +0200
@@ -176,7 +176,7 @@

     if ifconfig veth0 2>/dev/null | grep -q veth0 ; then
-       mac=`ifconfig ${netdev} | grep HWadd | sed -e 's/.*\(..:..:..:..:..:..\).*/\1/'`
+       mac=`ip link show ${netdev} | tail -1 | sed -e 's/.*\(..:..:..:..:..:..\) brd.*/\1/'`
        if ! ifdown ${netdev} ; then
                # if ifup didn't work, see if we have an ip= on cmd line
                if egrep 'ip=[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:' /proc/cmdline ;

Hope this helps others too!


Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.