summaryrefslogtreecommitdiff
path: root/templates/interfaces/ethernet/node.def
diff options
context:
space:
mode:
Diffstat (limited to 'templates/interfaces/ethernet/node.def')
-rw-r--r--templates/interfaces/ethernet/node.def11
1 files changed, 3 insertions, 8 deletions
diff --git a/templates/interfaces/ethernet/node.def b/templates/interfaces/ethernet/node.def
index a9113e7a..426f8f87 100644
--- a/templates/interfaces/ethernet/node.def
+++ b/templates/interfaces/ethernet/node.def
@@ -14,15 +14,10 @@ syntax:expression: exec \
fi"
begin: rm -f /tmp/speed-duplex.$VAR(@)
- if [ -d "/sys/class/net/$VAR(@)" ]; then
- s_mac="$VAR(hw-id/@)"
- if [ -n "$VAR(mac/@)" ]; then
- s_mac="$VAR(mac/@)"
- fi
- if [ -n "$s_mac" ]; then
+ if [ -n "$VAR(mac/@)" ] &&
+ [ -d "/sys/class/net/$VAR(@)" ]; then
/opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(@) \
- --set-mac $s_mac
- fi
+ --set-mac "$VAR(mac/@)"
fi
create: ip link set "$VAR(@)" up