diff options
author | Daniil Baturin <daniil@baturin.org> | 2018-11-06 01:18:35 +0100 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2018-11-06 01:18:35 +0100 |
commit | 7e6e5a211325b8f00e58a01a67ad2c01d073ff2a (patch) | |
tree | 2e0623e5391d2bb529b056d5a0020b4235affba3 /src/conf_mode | |
parent | 71de01f3536a9739d7dfc257a8ad9802560e7918 (diff) | |
parent | 19a53701d7c0bd2bfc9d773db88ef3f8634d15f3 (diff) | |
download | vyos-1x-7e6e5a211325b8f00e58a01a67ad2c01d073ff2a.tar.gz vyos-1x-7e6e5a211325b8f00e58a01a67ad2c01d073ff2a.zip |
Merge branch 'crux' of https://github.com/vyos/vyos-1x into crux
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/wireguard.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/conf_mode/wireguard.py b/src/conf_mode/wireguard.py index 3c8ade1db..5d390f39f 100755 --- a/src/conf_mode/wireguard.py +++ b/src/conf_mode/wireguard.py @@ -221,11 +221,12 @@ def apply(c): configure_interface(c, intf) ### ifalias for snmp from description - descr_eff = c_eff.return_effective_value(intf + ' description') - cnf_descr = c['interfaces'][intf]['descr'] - if descr_eff != cnf_descr: - with open('/sys/class/net/' + str(intf) + '/ifalias', 'w') as fh: - fh.write(str(cnf_descr)) + if c['interfaces'][intf]['status'] != 'delete': + descr_eff = c_eff.return_effective_value(intf + ' description') + cnf_descr = c['interfaces'][intf]['descr'] + if descr_eff != cnf_descr: + with open('/sys/class/net/' + str(intf) + '/ifalias', 'w') as fh: + fh.write(str(cnf_descr)) def configure_interface(c, intf): for p in c['interfaces'][intf]['peer']: |