WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-users] network scripts

To: <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-users] network scripts
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
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcWokhs0981x4QF8SGaDLfh4b8zOJg==
Thread-topic: network scripts

Hi,

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 @@
     fi

     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!

regards,
Jan

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-users] network scripts, Lockenvitz, Jan \(EXT\) <=