diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-12-01 13:28:12 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-02-23 14:36:56 +0100 |
commit | 7f22cf0f6cdd6e09ae6729d8762ab265ee7bde4c (patch) | |
tree | 6ad8093798379538a826b7c681b8a3d1d4dc8a14 /src/conf_mode/interfaces-pppoe.py | |
parent | b7c4c202f7f486576151fd0ca1084f8473b2552d (diff) | |
download | vyos-1x-7f22cf0f6cdd6e09ae6729d8762ab265ee7bde4c.tar.gz vyos-1x-7f22cf0f6cdd6e09ae6729d8762ab265ee7bde4c.zip |
pppoe: T1318: support interface description
Diffstat (limited to 'src/conf_mode/interfaces-pppoe.py')
-rwxr-xr-x | src/conf_mode/interfaces-pppoe.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/conf_mode/interfaces-pppoe.py b/src/conf_mode/interfaces-pppoe.py index 0fe4207a7..8acdf8e29 100755 --- a/src/conf_mode/interfaces-pppoe.py +++ b/src/conf_mode/interfaces-pppoe.py @@ -30,11 +30,10 @@ from netifaces import interfaces config_pppoe_tmpl = """ ### Autogenerated by interfaces-pppoe.py ### -# Configuration file for PPP, using PPP over Ethernet (PPPOE) -# to connect to a DSL provider. +{% if description %} +# {{ description }} +{% endif %} -# Default parameters not set by Vyatta templates: -# # Require peer to provide the local IP address if it is not # specified explicitly in the config file. noipdefault @@ -96,6 +95,7 @@ default_config_data = { 'on_demand': False, 'default_route': 'auto', 'deleted': False, + 'description': '', 'disable': False, 'intf': '', 'idle_timeout': '', @@ -145,6 +145,10 @@ def get_config(): if conf.exists('default-route'): pppoe['default_route'] = conf.return_value('default-route') + # Retrieve interface description + if conf.exists('description'): + pppoe['description'] = conf.return_value('description') + # Disable this interface if conf.exists('disable'): pppoe['disable'] = True |