summaryrefslogtreecommitdiff
path: root/templates/interfaces/ethernet
diff options
context:
space:
mode:
Diffstat (limited to 'templates/interfaces/ethernet')
-rw-r--r--templates/interfaces/ethernet/node.tag/mac/node.def15
1 files changed, 4 insertions, 11 deletions
diff --git a/templates/interfaces/ethernet/node.tag/mac/node.def b/templates/interfaces/ethernet/node.tag/mac/node.def
index e556743..d25b378 100644
--- a/templates/interfaces/ethernet/node.tag/mac/node.def
+++ b/templates/interfaces/ethernet/node.tag/mac/node.def
@@ -1,14 +1,7 @@
type: macaddr
help: Set the MAC address of this interface
+syntax:expression: exec "\
+ /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(../@) --valid-mac $VAR(@)"
+update: /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(../@) --set-mac $VAR(@)
+delete: /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(../@) --set-mac $VAR(../hw-id/@)
-update:expression: "sudo sh -c \"ip link set $VAR(../@) down && \
- ip link set $VAR(../@) address $VAR(@) && \
- ip link set $VAR(../@) up; \" "; \
- "Error setting MAC address on dev $VAR(../@)"
-
-delete:expression: "sudo sh -c \"ip link set $VAR(../@) down && \
- ip link set $VAR(../@) address \
- $VAR(../hw-id/@) && \
- ip link set $VAR(../@) up;\" "; \
- "Error resetting MAC address on dev $VAR(../@) to \
- $VAR(../hw-id/@)"