summaryrefslogtreecommitdiffstats
path: root/core/modules/hardware-stats
diff options
context:
space:
mode:
authorSimon Rettberg2023-02-03 10:38:25 +0100
committerSimon Rettberg2023-02-03 10:38:25 +0100
commit602a1e411646c2eef22458f6941dc73e8b66a604 (patch)
tree70f8e0e51df26380dc67db22e5020ddc0eaf123f /core/modules/hardware-stats
parent[qemu] Add ungrab script for xscreensaver (diff)
downloadmltk-602a1e411646c2eef22458f6941dc73e8b66a604.tar.gz
mltk-602a1e411646c2eef22458f6941dc73e8b66a604.tar.xz
mltk-602a1e411646c2eef22458f6941dc73e8b66a604.zip
[hardware-stats] Get uptime when submitting report, not 5 hours earlier
Diffstat (limited to 'core/modules/hardware-stats')
-rwxr-xr-xcore/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_report6
1 files changed, 3 insertions, 3 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 3354230f..b162b8a8 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
@@ -30,9 +30,6 @@ report_hardware_info() {
fi
. "$hwinfo"
- # got everything, get the last infos
- uptime=$(grep -oE '^[0-9]+' /proc/uptime)
-
uuid=$(cat /etc/system-uuid)
if [ -z "$uuid" ] || [ "${#uuid}" -ne "36" ]; then
echo "No/malformed UUID, aborting" >&2
@@ -61,6 +58,9 @@ report_hardware_info() {
# Bail out if a shutdown was triggered and submitted in the meantime
[ -e /run/openslx/shutdown.mutex ] && exit 0
# just assume the uuid/mac dumped are valid here (its checked often enough :))
+
+ # got everything, get the last infos
+ uptime=$(grep -oE '^[0-9]+' /proc/uptime)
echo -n "Submitting to '$SLX_REMOTE_LOG' ... "
curl --retry 4 --retry-connrefused --max-time 5 --retry-max-time 15 \
--data-urlencode "type=~poweron" --data-urlencode "uuid=$uuid" --data-urlencode "macaddr=$HW_MAC" \