summaryrefslogtreecommitdiff
path: root/templates/protocols/ripng/interface/node.def
diff options
context:
space:
mode:
Diffstat (limited to 'templates/protocols/ripng/interface/node.def')
-rw-r--r--templates/protocols/ripng/interface/node.def21
1 files changed, 21 insertions, 0 deletions
diff --git a/templates/protocols/ripng/interface/node.def b/templates/protocols/ripng/interface/node.def
new file mode 100644
index 00000000..f62343a0
--- /dev/null
+++ b/templates/protocols/ripng/interface/node.def
@@ -0,0 +1,21 @@
+multi:
+type: txt
+help: Set interface name
+
+syntax:expression: exec " \
+ if [ -z \"`ip addr | grep $VAR(@) `\" ]; then \
+ echo ethernet interface $VAR(@) doesn\\'t exist on this system ; \
+ exit 1 ; \
+ fi ; "
+
+create: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "network $VAR(@)"
+
+delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no network $VAR(@)" "
+
+allowed: local -a array;
+ array=( /sys/class/net/{eth,vmnet}* ) ;
+ echo -n ${array[@]##*/}