summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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" \