diff --git a/plinth/modules/help/help.py b/plinth/modules/help/help.py index 222bce3c8..3ee86af0e 100644 --- a/plinth/modules/help/help.py +++ b/plinth/modules/help/help.py @@ -57,7 +57,8 @@ def about(request): context = { 'title': _('About {box_name}').format(box_name=_(cfg.box_name)), 'version': __version__, - 'new_version': not plinth.candidate.is_installed + 'new_version': not plinth.candidate.is_installed, + 'os_release': get_os_release() } return TemplateResponse(request, 'help_about.html', context) @@ -90,3 +91,15 @@ def status_log(request): 'data': data } return TemplateResponse(request, 'statuslog.html', context) + + +def get_os_release(): + """Returns the Debian release number and name""" + output = 'Error: Cannot read PRETTY_NAME in /etc/os-release.' + with open('/etc/os-release', 'r') as release_file: + for line in release_file: + if 'PRETTY_NAME=' in line: + line = line.replace('"', '').strip() + line = line.split('=') + output = line[1] + return output diff --git a/plinth/modules/help/templates/help_about.html b/plinth/modules/help/templates/help_about.html index da8c3c5f5..6819d8513 100644 --- a/plinth/modules/help/templates/help_about.html +++ b/plinth/modules/help/templates/help_about.html @@ -74,12 +74,16 @@

{% blocktrans trimmed %} - You are running Plinth version {{ version }}. + You are running {{ os_release }} and Plinth version {{ version }}. {% endblocktrans %} {% if new_version %} {% blocktrans trimmed %} - There is a new version available. + There is a new Plinth version available. + {% endblocktrans %} + {% else %} + {% blocktrans trimmed %} + Plinth is up to date. {% endblocktrans %} {% endif %}