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:
parent
8c93993e1b
commit
8b841505ff
|
@ -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"
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue