diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-05-14 13:55:29 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-05-14 13:55:29 -0700 |
commit | 53a7bece51cfb07a8e3dd581aa04580f0cd7d71e (patch) | |
tree | b53e387bee234a0d4d828cfda54fc76bc024ed36 /templates/interfaces | |
parent | a6c714e9b6a8471f428824a310dae8c9fccb2908 (diff) | |
download | vyatta-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.def | 2 |
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 |