diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-07-07 14:44:58 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-07-07 15:33:03 -0700 |
commit | 1755bfab4b22cc822f96fb78a1e05392d5f07398 (patch) | |
tree | 3d0cc8d4e4e38bbe2a2945528cb42bb8462dd5a6 /templates | |
parent | f1969a39a91ecfd426310eabe0804f23cfa1d64b (diff) | |
download | vyatta-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')
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" |