* 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
|
for i in $(cd /sys/class/net && ls -d *); do
|
||||||
# Only run dhclient on interfaces of type ARPHRD_ETHER
|
# Only run dhclient on interfaces of type ARPHRD_ETHER
|
||||||
# (1), i.e. Ethernet.
|
# (1), i.e. Ethernet. Ignore peth* devices; on Xen,
|
||||||
if [ "$(cat /sys/class/net/$i/type)" = 1 ]; then
|
# they're renamed physical Ethernet cards used for
|
||||||
if ! for j in ${toString ignoredInterfaces}; do echo $j; done | grep -F -x -q "$i"; then
|
# 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"
|
echo "Running dhclient on $i"
|
||||||
interfaces="$interfaces $i"
|
interfaces="$interfaces $i"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user