diff options
author | Simon Rettberg | 2021-10-20 13:34:10 +0200 |
---|---|---|
committer | Simon Rettberg | 2021-10-20 13:34:10 +0200 |
commit | 25dc8e0ea7af9e6d8d7806d5ecf031e3bfe187c9 (patch) | |
tree | 8e94228c54b9fdd55e0b36a579ddb702872e5195 /core/modules/hardware-stats | |
parent | [german] Yet another locale tool to call (diff) | |
download | mltk-25dc8e0ea7af9e6d8d7806d5ecf031e3bfe187c9.tar.gz mltk-25dc8e0ea7af9e6d8d7806d5ecf031e3bfe187c9.tar.xz mltk-25dc8e0ea7af9e6d8d7806d5ecf031e3bfe187c9.zip |
[system-check/hardware-stats] Refactor report stats gather split stuff
Reporting to server is now a separate service, as it slows down
system-check for no reason via hooks.d.
Also add a couple comments and simplifications to system-check main
script. We now redirect to the tags file within the main script instead
of letting each hook individually open the tags file and write to it
concurrently, which seems like a bad idea in retrospect.
Diffstat (limited to 'core/modules/hardware-stats')
-rw-r--r-- | core/modules/hardware-stats/data/etc/systemd/system/hardware-report.service | 11 | ||||
-rw-r--r-- | core/modules/hardware-stats/data/etc/systemd/system/hardware-stats.service | 3 | ||||
l--------- | core/modules/hardware-stats/data/etc/systemd/system/multi-user.target.wants/hardware-report.service | 1 | ||||
-rwxr-xr-x | core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_report (renamed from core/modules/hardware-stats/data/opt/openslx/system-check/hooks.d/50-hardware-report) | 0 |
4 files changed, 13 insertions, 2 deletions
diff --git a/core/modules/hardware-stats/data/etc/systemd/system/hardware-report.service b/core/modules/hardware-stats/data/etc/systemd/system/hardware-report.service new file mode 100644 index 00000000..d4649c4a --- /dev/null +++ b/core/modules/hardware-stats/data/etc/systemd/system/hardware-report.service @@ -0,0 +1,11 @@ +[Unit] +Description=Send hardware information to boot server +After=system-check.service hardware-stats.service +Wants=system-check.service hardware-stats.service + +[Service] +Type=oneshot +ExecStart=/opt/openslx/scripts/systemd-hardware_report +RemainAfterExit=yes +ExecStop=/opt/openslx/scripts/shutdown-system_usage_update + diff --git a/core/modules/hardware-stats/data/etc/systemd/system/hardware-stats.service b/core/modules/hardware-stats/data/etc/systemd/system/hardware-stats.service index f23f3384..8106af74 100644 --- a/core/modules/hardware-stats/data/etc/systemd/system/hardware-stats.service +++ b/core/modules/hardware-stats/data/etc/systemd/system/hardware-stats.service @@ -1,5 +1,5 @@ [Unit] -Description=Gather statistics about this machine and send to boot server +Description=Gather hardware information about this machine After=tmp.target mount-vm-store.service network.target run-virt-env.service Wants=tmp.target system-check.service Before=system-check.service @@ -8,5 +8,4 @@ Before=system-check.service Type=oneshot ExecStart=/opt/openslx/scripts/systemd-hardware_stats RemainAfterExit=yes -ExecStop=/opt/openslx/scripts/shutdown-system_usage_update diff --git a/core/modules/hardware-stats/data/etc/systemd/system/multi-user.target.wants/hardware-report.service b/core/modules/hardware-stats/data/etc/systemd/system/multi-user.target.wants/hardware-report.service new file mode 120000 index 00000000..d9610279 --- /dev/null +++ b/core/modules/hardware-stats/data/etc/systemd/system/multi-user.target.wants/hardware-report.service @@ -0,0 +1 @@ +../hardware-report.service
\ No newline at end of file diff --git a/core/modules/hardware-stats/data/opt/openslx/system-check/hooks.d/50-hardware-report b/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_report index 09d8efc9..09d8efc9 100755 --- a/core/modules/hardware-stats/data/opt/openslx/system-check/hooks.d/50-hardware-report +++ b/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_report |