From 9a72c020fc5befebb846984923ac6c35f5907c5c Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 6 Apr 2010 08:42:12 -0700 Subject: Add input pseudo-interface configuration This is configuration wrapper for IFB. See spec. --- templates/interfaces/input/node.def | 10 ++++++++++ templates/interfaces/input/node.tag/description/node.def | 4 ++++ 2 files changed, 14 insertions(+) create mode 100644 templates/interfaces/input/node.def create mode 100644 templates/interfaces/input/node.tag/description/node.def (limited to 'templates') 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" -- cgit v1.2.3