* Don't run dhclient on Xen's peth* devices.
svn path=/nixos/trunk/; revision=23779
This commit is contained in:
parent
c4f910f550
commit
ea4d3e2c8c
@ -78,9 +78,13 @@ in
|
||||
|
||||
for i in $(cd /sys/class/net && ls -d *); do
|
||||
# Only run dhclient on interfaces of type ARPHRD_ETHER
|
||||
# (1), i.e. Ethernet.
|
||||
if [ "$(cat /sys/class/net/$i/type)" = 1 ]; then
|
||||
if ! for j in ${toString ignoredInterfaces}; do echo $j; done | grep -F -x -q "$i"; then
|
||||
# (1), i.e. Ethernet. Ignore peth* devices; on Xen,
|
||||
# they're renamed physical Ethernet cards used for
|
||||
# bridging.
|
||||
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.*";
|
||||
then
|
||||
echo "Running dhclient on $i"
|
||||
interfaces="$interfaces $i"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user