summaryrefslogtreecommitdiff
path: root/templates/interfaces/loopback
diff options
context:
space:
mode:
Diffstat (limited to 'templates/interfaces/loopback')
-rw-r--r--templates/interfaces/loopback/node.def13
1 files changed, 3 insertions, 10 deletions
diff --git a/templates/interfaces/loopback/node.def b/templates/interfaces/loopback/node.def
index e57f4b1..690dc39 100644
--- a/templates/interfaces/loopback/node.def
+++ b/templates/interfaces/loopback/node.def
@@ -1,14 +1,7 @@
tag:
type: txt
help: Set loopback interface
-allowed: echo "lo"
-syntax:expression: exec "\
- if [ ! -d /sys/class/net/$VAR(@) ]; then \
- echo \"loopback interface $VAR(@) does not exist\"; \
- exit 1; \
- elif [ $(cat /sys/class/net/$VAR(@)/type) -ne 772 ]; then \
- echo \"interface $VAR(@) is not a loopback interface\"; \
- exit 1; \
- fi"
-
+syntax:expression: exec \
+ "/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --check=loopback"
+allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=loopback
update: sudo ip link set $VAR(@) up