mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[yolo] Detect moar hardware name
This commit is contained in:
parent
d77d5afb2c
commit
b685a27481
2 changed files with 9 additions and 3 deletions
|
@ -32,11 +32,17 @@ class BaseSystemDiagnoser(Diagnoser):
|
|||
data={"virt": virt, "arch": arch},
|
||||
summary="diagnosis_basesystem_hardware")
|
||||
|
||||
# Also possibly the board name
|
||||
# Also possibly the board / hardware name
|
||||
if os.path.exists("/proc/device-tree/model"):
|
||||
model = read_file('/proc/device-tree/model').strip().replace('\x00', '')
|
||||
hardware["data"]["model"] = model
|
||||
hardware["details"] = ["diagnosis_basesystem_hardware_board"]
|
||||
hardware["details"] = ["diagnosis_basesystem_hardware_model"]
|
||||
elif os.path.exists("/sys/devices/virtual/dmi/id/sys_vendor"):
|
||||
model = read_file("/sys/devices/virtual/dmi/id/sys_vendor").strip()
|
||||
if os.path.exists("/sys/devices/virtual/dmi/id/product_name"):
|
||||
model = "%s %s" % (model, read_file("/sys/devices/virtual/dmi/id/product_name").strip())
|
||||
hardware["data"]["model"] = model
|
||||
hardware["details"] = ["diagnosis_basesystem_hardware_model"]
|
||||
|
||||
yield hardware
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@
|
|||
"confirm_app_install_thirdparty": "DANGER! This app is not part of Yunohost's app catalog. Installing third-party apps may compromise the integrity and security of your system. You should probably NOT install it unless you know what you are doing. NO SUPPORT will be provided if this app doesn't work or breaks your system… If you are willing to take that risk anyway, type '{answers:s}'",
|
||||
"custom_app_url_required": "You must provide a URL to upgrade your custom app {app:s}",
|
||||
"diagnosis_basesystem_hardware": "Server hardware architecture is {virt} {arch}",
|
||||
"diagnosis_basesystem_hardware_board": "Server board model is {model}",
|
||||
"diagnosis_basesystem_hardware_model": "Server model is {model}",
|
||||
"diagnosis_basesystem_host": "Server is running Debian {debian_version}",
|
||||
"diagnosis_basesystem_kernel": "Server is running Linux kernel {kernel_version}",
|
||||
"diagnosis_basesystem_ynh_single_version": "{package} version: {version} ({repo})",
|
||||
|
|
Loading…
Add table
Reference in a new issue