diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-09-29 11:59:54 -0700 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-09-29 11:59:54 -0700 |
commit | f2aeab36c814c8d0327756547caf167314e5534c (patch) | |
tree | af468d36eed091f28b0d0c7e20d8fd1304c9e04e | |
parent | 12f22437ba934f759d671c09501261df701067c3 (diff) | |
parent | d3acd9102ddffe8d67d468fefa43ed2a84978e0a (diff) | |
download | vyatta-cfg-system-f2aeab36c814c8d0327756547caf167314e5534c.tar.gz vyatta-cfg-system-f2aeab36c814c8d0327756547caf167314e5534c.zip |
Merge branch 'oxnard' of git.vyatta.com:/git/vyatta-cfg-system into changes-john-southworth
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | templates/interfaces/ethernet/node.def | 13 |
2 files changed, 15 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog index 3f2a8b2e..25dc1420 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-cfg-system (0.19.120) unstable; urgency=low + + * Bugfix 7492: Reset mac address to hw-id when the mac is deleted + + -- John Southworth <john.southworth@vyatta.com> Tue, 27 Sep 2011 13:59:13 -0500 + vyatta-cfg-system (0.19.119) unstable; urgency=low * Bugfix 7502: Get "add system image" to work on Xen diff --git a/templates/interfaces/ethernet/node.def b/templates/interfaces/ethernet/node.def index 45d6ec09..e51fe7df 100644 --- a/templates/interfaces/ethernet/node.def +++ b/templates/interfaces/ethernet/node.def @@ -14,12 +14,17 @@ syntax:expression: exec \ fi" begin: rm -f /tmp/speed-duplex.$VAR(@) - if [ -n "$VAR(mac/@)" ] && - [ -d "/sys/class/net/$VAR(@)" ]; then - /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(@) \ - --set-mac "$VAR(mac/@)" + if [ -d "/sys/class/net/$VAR(@)" ]; then + if [ -n "$VAR(mac/@)" ]; then + /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(@) \ + --set-mac "$VAR(mac/@)" + else + /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(@) \ + --set-mac "$VAR(hw-id/@)" + fi fi + create: if ! cli-shell-api exists interfaces ethernet $VAR(@) disable; then ip link set $VAR(@) up fi |