diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-04-06 08:42:12 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-04-06 09:26:51 -0700 |
commit | 9a72c020fc5befebb846984923ac6c35f5907c5c (patch) | |
tree | 13eb979cb3c9c37dc3855dc245514bd46d2bd423 /templates | |
parent | 723ad4e1888f7d2dadb685a8874bec53a5c293c5 (diff) | |
download | vyatta-cfg-system-9a72c020fc5befebb846984923ac6c35f5907c5c.tar.gz vyatta-cfg-system-9a72c020fc5befebb846984923ac6c35f5907c5c.zip |
Add input pseudo-interface configuration
This is configuration wrapper for IFB. See spec.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/interfaces/input/node.def | 10 | ||||
-rw-r--r-- | templates/interfaces/input/node.tag/description/node.def | 4 |
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" |