From ea5439cd08cd0f79dce8a7a885f06b5ec211eebb Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 9 Sep 2009 14:19:43 -0700 Subject: Allow empty description Bug 4918 --- templates/interfaces/ethernet/node.tag/description/node.def | 2 +- .../interfaces/ethernet/node.tag/vif/node.tag/description/node.def | 2 +- templates/interfaces/loopback/node.tag/description/node.def | 2 +- 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 ccec5e1..7f64c78 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 ip link set $VAR(../@) alias "$VAR(@)" +update: 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/ethernet/node.tag/vif/node.tag/description/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/description/node.def index fda2e3c..d85db27 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 ip link set dev "$VAR(../../@).$VAR(../@)" alias "$VAR(@)" +update: 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/loopback/node.tag/description/node.def b/templates/interfaces/loopback/node.tag/description/node.def index ccec5e1..7f64c78 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 ip link set $VAR(../@) alias "$VAR(@)" +update: sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../@)/ifalias" delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../@)/ifalias" -- cgit v1.2.3