summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-07-07 14:44:58 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-07-07 15:33:03 -0700
commit1755bfab4b22cc822f96fb78a1e05392d5f07398 (patch)
tree3d0cc8d4e4e38bbe2a2945528cb42bb8462dd5a6 /templates
parentf1969a39a91ecfd426310eabe0804f23cfa1d64b (diff)
downloadvyatta-cfg-1755bfab4b22cc822f96fb78a1e05392d5f07398.tar.gz
vyatta-cfg-1755bfab4b22cc822f96fb78a1e05392d5f07398.zip
Use ip command rather than sysfs to set ifalias
Bug 4672 By using ip command instead of sysfs, avoid subshell quoting issues.
Diffstat (limited to 'templates')
-rw-r--r--templates/interfaces/ethernet/node.tag/description/node.def2
-rw-r--r--templates/interfaces/ethernet/node.tag/vif/node.tag/description/node.def2
-rw-r--r--templates/interfaces/loopback/node.tag/description/node.def2
3 files changed, 3 insertions, 3 deletions
diff --git a/templates/interfaces/ethernet/node.tag/description/node.def b/templates/interfaces/ethernet/node.tag/description/node.def
index d7becd1..ccec5e1 100644
--- a/templates/interfaces/ethernet/node.tag/description/node.def
+++ b/templates/interfaces/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 link set $VAR(../@) alias "$VAR(@)"
delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../@)/ifalias"
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/description/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/description/node.def
index 40f04bc..fda2e3c 100644
--- a/templates/interfaces/ethernet/node.tag/vif/node.tag/description/node.def
+++ b/templates/interfaces/ethernet/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 link set dev "$VAR(../../@).$VAR(../@)" alias "$VAR(@)"
delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../../@).$VAR(../@)/ifalias"
diff --git a/templates/interfaces/loopback/node.tag/description/node.def b/templates/interfaces/loopback/node.tag/description/node.def
index d7becd1..ccec5e1 100644
--- a/templates/interfaces/loopback/node.tag/description/node.def
+++ b/templates/interfaces/loopback/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 link set $VAR(../@) alias "$VAR(@)"
delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../@)/ifalias"