* Don't run dhclient on Xen's vif* and tap* interfaces.

svn path=/nixos/trunk/; revision=24948
This commit is contained in:
Eelco Dolstra 2010-12-01 16:14:44 +00:00
parent 1b8dd6cf27
commit 29813b418c

View File

@ -80,10 +80,10 @@ in
# Only run dhclient on interfaces of type ARPHRD_ETHER
# (1), i.e. Ethernet. Ignore peth* devices; on Xen,
# they're renamed physical Ethernet cards used for
# bridging.
# bridging. Likewise for vif* and tap*.
if [ "$(cat /sys/class/net/$i/type)" = 1 ]; then
if ! for j in ${toString ignoredInterfaces}; do echo $j; done | grep -F -x -q "$i" &&
! echo "$i" | grep -x -q "peth.*";
! echo "$i" | grep -x -q "peth.*\|vif.*\|tap.*";
then
echo "Running dhclient on $i"
interfaces="$interfaces $i"