diff options
-rw-r--r-- | interface-definitions/interfaces-pppoe.xml.in | 5 | ||||
-rwxr-xr-x | src/conf_mode/interfaces-pppoe.py | 12 |
2 files changed, 13 insertions, 4 deletions
diff --git a/interface-definitions/interfaces-pppoe.xml.in b/interface-definitions/interfaces-pppoe.xml.in index f5431852a..7511cc51d 100644 --- a/interface-definitions/interfaces-pppoe.xml.in +++ b/interface-definitions/interfaces-pppoe.xml.in @@ -56,6 +56,11 @@ <constraintErrorMessage>Must be either 'auto', 'none' or 'force'</constraintErrorMessage> </properties> </leafNode> + <leafNode name="description"> + <properties> + <help>Interface description</help> + </properties> + </leafNode> <leafNode name="disable"> <properties> <help>Disable interface</help> 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 |