summaryrefslogtreecommitdiff
path: root/templates/interfaces
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-05-14 13:55:29 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-05-14 13:55:29 -0700
commit53a7bece51cfb07a8e3dd581aa04580f0cd7d71e (patch)
treeb53e387bee234a0d4d828cfda54fc76bc024ed36 /templates/interfaces
parenta6c714e9b6a8471f428824a310dae8c9fccb2908 (diff)
downloadvyatta-cfg-53a7bece51cfb07a8e3dd581aa04580f0cd7d71e.tar.gz
vyatta-cfg-53a7bece51cfb07a8e3dd581aa04580f0cd7d71e.zip
Avoid any problems with non-device entries in /sys/class/net
Bonding leaves file in /sys/class/net/bonding. Avoid any problems this causes.
Diffstat (limited to 'templates/interfaces')
-rw-r--r--templates/interfaces/ethernet/node.def2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/interfaces/ethernet/node.def b/templates/interfaces/ethernet/node.def
index 4c311fc..1049f3e 100644
--- a/templates/interfaces/ethernet/node.def
+++ b/templates/interfaces/ethernet/node.def
@@ -11,7 +11,7 @@ update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\"
-c \"link-detect\"; "
delete:expression: "sudo ip link set $VAR(@) down" ; "Error disabling dev $VAR(@)"
allowed: for dev in /sys/class/net/*;
- do if [[ -L $dev/device ]]
+ do if [[ -d $dev && -L $dev/device ]]
then if [[ $(cat $dev/type) -eq 1 ]]
then echo -n ${dev##*/} " "
fi