summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-07-07 15:34:23 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-07-07 15:34:23 -0700
commit1b4902564b5a853b925d2c239c8e6a39b1734433 (patch)
tree34fd86cf044ee53a95cd7ad70c4a0f9ad8cdf2aa
parent438c31eb30a2b4e934f644530777e6296c0297b6 (diff)
downloadvyatta-cfg-system-1b4902564b5a853b925d2c239c8e6a39b1734433.tar.gz
vyatta-cfg-system-1b4902564b5a853b925d2c239c8e6a39b1734433.zip
Fix descriptions with meta-characters
Bug 4672 Use ip command rather than sysfs to avoid quoting issues
-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.def2
-rw-r--r--templates/interfaces/pseudo-ethernet/node.tag/description/node.def2
-rw-r--r--templates/interfaces/tunnel/node.tag/description/node.def2
5 files changed, 5 insertions, 5 deletions
diff --git a/templates/interfaces/bonding/node.tag/description/node.def b/templates/interfaces/bonding/node.tag/description/node.def
index d7becd13..1fcca391 100644
--- a/templates/interfaces/bonding/node.tag/description/node.def
+++ b/templates/interfaces/bonding/node.tag/description/node.def
@@ -1,4 +1,4 @@
type: txt
help: Set description for this interface
-update: sudo sh -c "echo $VAR(@) >/sys/class/net/$VAR(../@)/ifalias"
+update: sudo ip li set dev $VAR(../@) alias "$VAR(@)"
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 40f04bcc..26195fcc 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,4 +1,4 @@
type: txt
help: Set description for this interface
-update: sudo sh -c "echo $VAR(@) >/sys/class/net/$VAR(../../@).$VAR(../@)/ifalias"
+update: sudo ip li set dev "$VAR(../../@).$VAR(../@)" alias "$VAR(@)"
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 d7becd13..1fcca391 100644
--- a/templates/interfaces/bridge/node.tag/description/node.def
+++ b/templates/interfaces/bridge/node.tag/description/node.def
@@ -1,4 +1,4 @@
type: txt
help: Set description for this interface
-update: sudo sh -c "echo $VAR(@) >/sys/class/net/$VAR(../@)/ifalias"
+update: sudo ip li set dev $VAR(../@) alias "$VAR(@)"
delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../@)/ifalias"
diff --git a/templates/interfaces/pseudo-ethernet/node.tag/description/node.def b/templates/interfaces/pseudo-ethernet/node.tag/description/node.def
index d7becd13..1fcca391 100644
--- a/templates/interfaces/pseudo-ethernet/node.tag/description/node.def
+++ b/templates/interfaces/pseudo-ethernet/node.tag/description/node.def
@@ -1,4 +1,4 @@
type: txt
help: Set description for this interface
-update: sudo sh -c "echo $VAR(@) >/sys/class/net/$VAR(../@)/ifalias"
+update: sudo ip li set dev $VAR(../@) alias "$VAR(@)"
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 d7becd13..1fcca391 100644
--- a/templates/interfaces/tunnel/node.tag/description/node.def
+++ b/templates/interfaces/tunnel/node.tag/description/node.def
@@ -1,4 +1,4 @@
type: txt
help: Set description for this interface
-update: sudo sh -c "echo $VAR(@) >/sys/class/net/$VAR(../@)/ifalias"
+update: sudo ip li set dev $VAR(../@) alias "$VAR(@)"
delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../@)/ifalias"