summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorSimon Rettberg2024-12-11 17:11:08 +0100
committerSimon Rettberg2024-12-11 17:11:08 +0100
commit988f0a90d36777597d6c8e7e8bc25ade8545056b (patch)
treefee1e4406c5dae17028abfe935aabf056975792f /core
parentqemu: Switch back to mainline virt-viewer, fork too unstable (diff)
downloadmltk-988f0a90d36777597d6c8e7e8bc25ade8545056b.tar.gz
mltk-988f0a90d36777597d6c8e7e8bc25ade8545056b.tar.xz
mltk-988f0a90d36777597d6c8e7e8bc25ade8545056b.zip
[hardware-stats] Report firmware type
Diffstat (limited to 'core')
-rwxr-xr-xcore/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_report5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_report b/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_report
index bf1fe6ee..caaf09d4 100755
--- a/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_report
+++ b/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_report
@@ -53,6 +53,10 @@ report_hardware_info() {
[ -s "$hwreport" ] || touch "$hwreport"
[ -s "$jsonfile" ] || touch "$jsonfile"
+ # EFI?
+ fw=BIOS
+ [ -d /sys/firmware/efi ] && fw=EFI
+
# Bail out if a shutdown was triggered and submitted in the meantime
[ -e /run/openslx/shutdown.mutex ] && exit 0
@@ -68,6 +72,7 @@ report_hardware_info() {
--data-urlencode "id44mb=$HW_ID44" \
--data-urlencode "badsectors=$HW_BADSECTORS" --data-urlencode "systemmodel=$model" \
--data-urlencode "subnet=$subnet" \
+ --data-urlencode "firmware=$fw" \
--data-urlencode "runmode=$runmode" --data-urlencode "data@$hwreport" --data-urlencode "json@$jsonfile" \
"$SLX_REMOTE_LOG" | grep -q "RESULT=0"
local ret=$?