summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-23 11:15:58 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-23 11:15:58 -0700
commit71be1922653a66274d02ce79fe4a2ef0a197b5aa (patch)
tree956b2b5e0b160b63fd1b459d5ad0a09c6b5e05b2 /templates
parent505e67d13bc4e5d24c330f84f4a0fb06bed12541 (diff)
downloadvyatta-cfg-quagga-71be1922653a66274d02ce79fe4a2ef0a197b5aa.tar.gz
vyatta-cfg-quagga-71be1922653a66274d02ce79fe4a2ef0a197b5aa.zip
Save interface description in kernel
Diffstat (limited to 'templates')
-rw-r--r--templates/interfaces/bonding/node.tag/description/node.def2
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/description/node.def2
-rw-r--r--templates/interfaces/bridge/node.tag/description/node.def4
-rw-r--r--templates/interfaces/tunnel/node.tag/description/node.def4
4 files changed, 10 insertions, 2 deletions
diff --git a/templates/interfaces/bonding/node.tag/description/node.def b/templates/interfaces/bonding/node.tag/description/node.def
index aeb40f0b..76140377 100644
--- a/templates/interfaces/bonding/node.tag/description/node.def
+++ b/templates/interfaces/bonding/node.tag/description/node.def
@@ -1,2 +1,4 @@
type: txt
help: Set description for this interface
+create: sudo sh -c "echo $VAR(@) >/sys/class/net/$VAR(../@)/ifalias"
+delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../@)/ifalias"
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/description/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/description/node.def
index aeb40f0b..49a72afe 100644
--- a/templates/interfaces/bonding/node.tag/vif/node.tag/description/node.def
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/description/node.def
@@ -1,2 +1,4 @@
type: txt
help: Set description for this interface
+create: sudo sh -c "echo $VAR(@) >/sys/class/net/$VAR(../../@).$VAR(../@)/ifalias"
+delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../../@).$VAR(../@)/ifalias"
diff --git a/templates/interfaces/bridge/node.tag/description/node.def b/templates/interfaces/bridge/node.tag/description/node.def
index 50250a24..76140377 100644
--- a/templates/interfaces/bridge/node.tag/description/node.def
+++ b/templates/interfaces/bridge/node.tag/description/node.def
@@ -1,2 +1,4 @@
type: txt
-help: Set a description of the interface
+help: Set description for this interface
+create: sudo sh -c "echo $VAR(@) >/sys/class/net/$VAR(../@)/ifalias"
+delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../@)/ifalias"
diff --git a/templates/interfaces/tunnel/node.tag/description/node.def b/templates/interfaces/tunnel/node.tag/description/node.def
index b53ae684..76140377 100644
--- a/templates/interfaces/tunnel/node.tag/description/node.def
+++ b/templates/interfaces/tunnel/node.tag/description/node.def
@@ -1,2 +1,4 @@
type: txt
-help: Set description of this tunnel interface
+help: Set description for this interface
+create: sudo sh -c "echo $VAR(@) >/sys/class/net/$VAR(../@)/ifalias"
+delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../@)/ifalias"