diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-03-23 11:06:02 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-03-23 11:06:02 -0700 |
commit | e23a6efaeeaf1e1d35b64ac819aed7ea096e5288 (patch) | |
tree | 34fd3bbddbff4279a1104e9d430d5f0a86343b1f /templates | |
parent | 1aecbf16ddf51516299df5ba444a35b259180d64 (diff) | |
download | vyatta-cfg-e23a6efaeeaf1e1d35b64ac819aed7ea096e5288.tar.gz vyatta-cfg-e23a6efaeeaf1e1d35b64ac819aed7ea096e5288.zip |
Store description in ifalias
Use new kernel field to store description.
Diffstat (limited to 'templates')
3 files changed, 6 insertions, 0 deletions
diff --git a/templates/interfaces/ethernet/node.tag/description/node.def b/templates/interfaces/ethernet/node.tag/description/node.def index aeb40f0..7614037 100644 --- a/templates/interfaces/ethernet/node.tag/description/node.def +++ b/templates/interfaces/ethernet/node.tag/description/node.def @@ -1,2 +1,4 @@ type: txt help: Set description for this interface +create: 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 aeb40f0..49a72af 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,2 +1,4 @@ type: txt help: Set description for this interface +create: 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 aeb40f0..7614037 100644 --- a/templates/interfaces/loopback/node.tag/description/node.def +++ b/templates/interfaces/loopback/node.tag/description/node.def @@ -1,2 +1,4 @@ type: txt help: Set description for this interface +create: sudo sh -c "echo $VAR(@) >/sys/class/net/$VAR(../@)/ifalias" +delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../@)/ifalias" |