From 7f22cf0f6cdd6e09ae6729d8762ab265ee7bde4c Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 1 Dec 2019 13:28:12 +0100 Subject: pppoe: T1318: support interface description --- src/conf_mode/interfaces-pppoe.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') 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 -- cgit v1.2.3