tag 508660 + patch
thanks

Hi,

The attached patch will allow you to specify the network interface via
the NETIFACE variable in /etc/default/autopkgtest. If this variable is
not set, the interface will be guessed as the first interface in
/proc/net/dev - More correct altrnatives can be, of course, found
playing a bit with heuristics, but this will at least not break your
init. 

Note that I am completely unfamiliar with this tool. I noticed eth0 is
hardcoded as well in xen/fixups and xen/fixups-inside - They should
also be looked into.

Greetings,

-- 
Gunnar Wolf - gw...@gwolf.org - (+52-55)5623-0154 / 1451-2244
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973  F800 D80E F35A 8BB5 27AF
diff --git a/xen/initscript b/xen/initscript
index 373d265..91c959f 100755
--- a/xen/initscript
+++ b/xen/initscript
@@ -22,6 +22,14 @@ else
   log_end_msg () { echo "done."; }
 fi
 . /etc/default/rcS
+if [ -f /etc/default/autopkgtest]; then
+    . /etc/default/autopkgtest
+fi
+
+if [ "$NETIFACE" = "" ]; then
+    NETIFACE=$(grep : /proc/net/dev | grep -v ' lo:' | \
+	cut -f 1 -d :|sed 's/ *//'|head -1)
+fi
 
 chains='AdtXenIn AdtXenFwd AdtXenIcmp'
 
@@ -167,6 +175,6 @@ iptables -D AdtXenIcmp -j DROP
 
 log_progress_msg proxyarp
 
-echo 1 >/proc/sys/net/ipv4/conf/eth0/proxy_arp 
+echo 1 >/proc/sys/net/ipv4/conf/$NETIFACE/proxy_arp 
 
 log_end_msg 0

Reply via email to