* Don't run dhclient on Xen's vif* and tap* interfaces.
svn path=/nixos/trunk/; revision=24948
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user