summaryrefslogtreecommitdiff
path: root/templates/interfaces/loopback
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2007-09-25 15:55:26 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2007-09-25 15:55:26 -0700
commite9a79a249cec69fc178098d2f75db9389068510a (patch)
tree0e366094b7fecd3988c243fbbb574015e0c900c8 /templates/interfaces/loopback
downloadvyatta-cfg-e9a79a249cec69fc178098d2f75db9389068510a.tar.gz
vyatta-cfg-e9a79a249cec69fc178098d2f75db9389068510a.zip
initial import (from eureka /cli) plus new build system.upstream
Diffstat (limited to 'templates/interfaces/loopback')
-rw-r--r--templates/interfaces/loopback/node.def8
-rw-r--r--templates/interfaces/loopback/node.tag/address/node.def6
-rw-r--r--templates/interfaces/loopback/node.tag/description/node.def2
3 files changed, 16 insertions, 0 deletions
diff --git a/templates/interfaces/loopback/node.def b/templates/interfaces/loopback/node.def
new file mode 100644
index 0000000..50df935
--- /dev/null
+++ b/templates/interfaces/loopback/node.def
@@ -0,0 +1,8 @@
+tag:
+type: txt
+help: "loopback interface name"
+syntax: exec " \
+ if [ -z \"`ip addr | grep $(@) `\" ]; then \
+ echo loopback interface $(@) doesn\\'t exist on this system ; \
+ exit 1 ; \
+ fi ; "
diff --git a/templates/interfaces/loopback/node.tag/address/node.def b/templates/interfaces/loopback/node.tag/address/node.def
new file mode 100644
index 0000000..2e7e106
--- /dev/null
+++ b/templates/interfaces/loopback/node.tag/address/node.def
@@ -0,0 +1,6 @@
+multi:
+type: ipv4net
+help: "Set IPv4 address and prefix for this interface"
+# TODO make sure 127.0.0.0/8 not in here.
+create: "ip addr add $(@) dev $(../@)"; "error setting address $(@) on dev $(../@)"
+delete: "ip addr del $(@) dev $(../@)"; "error deleteing address $(@) on dev $(../@)"
diff --git a/templates/interfaces/loopback/node.tag/description/node.def b/templates/interfaces/loopback/node.tag/description/node.def
new file mode 100644
index 0000000..abd0a26
--- /dev/null
+++ b/templates/interfaces/loopback/node.tag/description/node.def
@@ -0,0 +1,2 @@
+type: txt
+help: "description for this interface"