From 53a7bece51cfb07a8e3dd581aa04580f0cd7d71e Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 14 May 2008 13:55:29 -0700 Subject: Avoid any problems with non-device entries in /sys/class/net Bonding leaves file in /sys/class/net/bonding. Avoid any problems this causes. --- templates/interfaces/ethernet/node.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templates/interfaces/ethernet') 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 -- cgit v1.2.3