summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/interfaces/input/node.def10
-rw-r--r--templates/interfaces/input/node.tag/description/node.def4
2 files changed, 14 insertions, 0 deletions
diff --git a/templates/interfaces/input/node.def b/templates/interfaces/input/node.def
new file mode 100644
index 00000000..931da978
--- /dev/null
+++ b/templates/interfaces/input/node.def
@@ -0,0 +1,10 @@
+tag:
+priority: 390
+type: txt
+help: Set input virtual interface
+syntax:expression: pattern $VAR(@) "^in[0-9]+$" ; "name must be (in0-in999)"
+
+begin: [ -d /sys/module/ifb ] || sudo modprobe ifb numifbs=0
+create: sudo ip link add $VAR(@) type ifb && sudo ip link set $VAR(@) up
+delete: sudo ip link delete dev $VAR(@)
+comp_help: Enter input virtual interface name (in0 - in999)
diff --git a/templates/interfaces/input/node.tag/description/node.def b/templates/interfaces/input/node.tag/description/node.def
new file mode 100644
index 00000000..7f64c788
--- /dev/null
+++ b/templates/interfaces/input/node.tag/description/node.def
@@ -0,0 +1,4 @@
+type: txt
+help: Set description for this interface
+update: sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../@)/ifalias"
+delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../@)/ifalias"