diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-07-07 15:34:23 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2009-07-17 14:56:06 -0700 |
commit | 3636e1dd5cbba36309207826e40b222cca853297 (patch) | |
tree | ae6a8472aa69d44bfcef85ba23f7cecf3aefc08c | |
parent | 2b1af8589dbb6e2bbd40d497a1999c5c58e04eb0 (diff) | |
download | vyatta-cfg-quagga-3636e1dd5cbba36309207826e40b222cca853297.tar.gz vyatta-cfg-quagga-3636e1dd5cbba36309207826e40b222cca853297.zip |
Fix descriptions with meta-characters
Bug 4672
Use ip command rather than sysfs to avoid quoting issues
(cherry picked from commit 1b4902564b5a853b925d2c239c8e6a39b1734433)
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" |