[debian-edu-commits] [Git][debian-edu/upstream/sitesummary][master] Adjusted system info collector to handle missing runlevel command.

Petter Reinholdtsen (@pere) gitlab at salsa.debian.org
Tue Feb 10 19:34:31 GMT 2026



Petter Reinholdtsen pushed to branch master at Debian Edu / upstream / sitesummary


Commits:
1c61a0fe by Petter Reinholdtsen at 2026-02-10T20:32:29+01:00
Adjusted system info collector to handle missing runlevel command.

Also added code to collect information about systemd setup.

Patch from Hector Cao.

Closes: #1127467

- - - - -


1 changed file:

- collect.d/system


Changes:

=====================================
collect.d/system
=====================================
@@ -58,7 +58,13 @@ cat /proc/mounts > procmounts
 
 # Document current runlevel, useful to differenciate LTSP
 # thin clients from diskless workstations.
-runlevel > runlevel
+if command -v runlevel >/dev/null 2>&1; then
+    runlevel > runlevel
+fi
+
+if command -v systemctl >/dev/null 2>&1 && [ -d /run/systemd/system ]; then
+    systemctl list-units --type=target --state=active > systemd-targets
+fi
 
 # Throw away error message from laptop-detect using dmidecode in Xen
 # domUs.  See #438693 for more info.



View it on GitLab: https://salsa.debian.org/debian-edu/upstream/sitesummary/-/commit/1c61a0fe131ee001f0588e678ccb494a212c74e2

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/upstream/sitesummary/-/commit/1c61a0fe131ee001f0588e678ccb494a212c74e2
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20260210/d535598e/attachment.htm>


More information about the debian-edu-commits mailing list