diff --git a/moonraker/components/machine.py b/moonraker/components/machine.py index 3c77c4d..1d2a963 100644 --- a/moonraker/components/machine.py +++ b/moonraker/components/machine.py @@ -8,6 +8,7 @@ import re import pathlib import logging import platform +import distro from tornado.ioloop import IOLoop ALLOWED_SERVICES = ["moonraker", "klipper", "webcamd"] @@ -21,9 +22,12 @@ SD_MFGRS = { class Machine: def __init__(self, config): self.server = config.get_server() + dist_info = {'name': distro.name(pretty=True)} + dist_info.update(distro.info()) self.system_info = { 'cpu_info': self._get_cpu_info(), - 'sd_info': self._get_sdcard_info() + 'sd_info': self._get_sdcard_info(), + 'distribution': dist_info } # Add system info to log rollover sys_info_msg = "\nSystem Info:" diff --git a/scripts/moonraker-requirements.txt b/scripts/moonraker-requirements.txt index a379303..8d42bed 100644 --- a/scripts/moonraker-requirements.txt +++ b/scripts/moonraker-requirements.txt @@ -4,3 +4,4 @@ pyserial==3.4 pillow==8.1.2 lmdb==1.2.1 streaming-form-data==1.8.1 +distro==1.5.0