Author: eelco
Date: Tue Sep 14 11:17:48 2010
New Revision: 23779
URL: https://svn.nixos.org/websvn/nix/?rev=23779&sc=1

Log:
* Don't run dhclient on Xen's peth* devices.

Modified:
   nixos/trunk/modules/services/networking/dhclient.nix

Modified: nixos/trunk/modules/services/networking/dhclient.nix
==============================================================================
--- nixos/trunk/modules/services/networking/dhclient.nix        Tue Sep 14 
10:54:50 2010        (r23778)
+++ nixos/trunk/modules/services/networking/dhclient.nix        Tue Sep 14 
11:17:48 2010        (r23779)
@@ -78,9 +78,13 @@
 
             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
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to