3
0
Fork 0
forked from mirrors/nixpkgs

modules/services/networking/{dhclient,dhcpcd}.nix: ignore virtual veth* devices created by LXC/cgroups

svn path=/nixos/trunk/; revision=33928
This commit is contained in:
Peter Simons 2012-04-26 12:31:33 +00:00
parent 8c93993e1b
commit 8b841505ff
2 changed files with 4 additions and 4 deletions

View file

@ -63,10 +63,10 @@ in
# (1), i.e. Ethernet. Ignore peth* devices; on Xen,
# they're renamed physical Ethernet cards used for
# bridging. Likewise for vif* and tap* (Xen) and
# virbr* and vnet* (libvirt).
# virbr* and vnet* (libvirt) and veth* (cgroup).
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.*\|vif.*\|tap.*\|virbr.*\|vnet.*";
! echo "$i" | grep -x -q "peth.*\|vif.*\|tap.*\|virbr.*\|vnet.*\|veth.*";
then
echo "Running dhclient on $i"
interfaces="$interfaces $i"

View file

@ -31,8 +31,8 @@ let
# Ignore peth* devices; on Xen, they're renamed physical
# Ethernet cards used for bridging. Likewise for vif* and tap*
# (Xen) and virbr* and vnet* (libvirt).
denyinterfaces ${toString ignoredInterfaces} peth* vif* tap* tun* virbr* vnet* vboxnet*
# (Xen) and virbr* and vnet* (libvirt) and veth* (cgroups).
denyinterfaces ${toString ignoredInterfaces} peth* vif* tap* tun* virbr* vnet* vboxnet* veth*
'';
# Hook for emitting ip-up/ip-down events.