diff --git a/plinth/modules/networks/forms.py b/plinth/modules/networks/forms.py index 73ef6a96d..908426b98 100644 --- a/plinth/modules/networks/forms.py +++ b/plinth/modules/networks/forms.py @@ -74,7 +74,7 @@ available over this interfaces. Select Internal only for trusted networks.'), class AddPPPoEForm(forms.Form): - """Form to create a new pppoe connection.""" + """Form to create a new PPPoE connection.""" name = forms.CharField(label=_('Connection Name')) interface = forms.ChoiceField( label=_('Physical Interface'), @@ -100,7 +100,7 @@ available over this interfaces. Select Internal only for trusted networks.'), class AddWifiForm(forms.Form): - """Form to create a new wifi connection.""" + """Form to create a new Wi-Fi connection.""" name = forms.CharField(label=_('Connection Name')) interface = forms.ChoiceField( label=_('Physical interface'), diff --git a/plinth/modules/networks/networks.py b/plinth/modules/networks/networks.py index 0d03346bf..7c0ec3ede 100644 --- a/plinth/modules/networks/networks.py +++ b/plinth/modules/networks/networks.py @@ -22,8 +22,8 @@ from django.template.response import TemplateResponse from gettext import gettext as _ from logging import Logger -from .forms import ConnectionTypeSelectForm, AddEthernetForm, AddWifiForm -from .forms import AddPPPoEForm +from .forms import (ConnectionTypeSelectForm, AddEthernetForm, AddPPPoEForm, + AddWifiForm) from plinth import cfg from plinth import network from plinth import package diff --git a/plinth/network.py b/plinth/network.py index 9bbec500f..28b8dc830 100644 --- a/plinth/network.py +++ b/plinth/network.py @@ -192,13 +192,13 @@ def _update_ethernet_settings(connection, connection_uuid, name, interface, def _update_pppoe_settings(connection, connection_uuid, name, interface, zone, username, password): - """Create/edit ethernet settings for network manager connections.""" + """Create/edit PPPoE settings for network manager connections.""" type_ = 'pppoe' connection = _update_common_settings(connection, connection_uuid, name, type_, interface, zone) - #pppoe + # PPPoE settings = connection.get_setting_pppoe() if not settings: settings = nm.SettingPppoe.new() @@ -212,8 +212,8 @@ def _update_pppoe_settings(connection, connection_uuid, name, interface, zone, settings = nm.SettingPpp.new() connection.add_setting(settings) - #ToDo: make this configurable? - #ToDo: apt-get install ppp pppoe + # TODO: make this configurable? Some PPP peers don't respond to + # echo requests according to NetworkManager documentation. settings.set_property(nm.SETTING_PPP_LCP_ECHO_FAILURE, 5) settings.set_property(nm.SETTING_PPP_LCP_ECHO_INTERVAL, 30) @@ -221,7 +221,7 @@ def _update_pppoe_settings(connection, connection_uuid, name, interface, zone, def add_pppoe_connection(name, interface, zone, username, password): - """Add an automatic pppoe connection in network manager. + """Add an automatic PPPoE connection in network manager. Return the UUID for the connection. """