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

"Petter Reinholdtsen (@pere)" <[email protected]> Tue, 10 Feb 2026 19:34:31 +0000
Newsgroups gmane.linux.skolelinux.cvs
Message-ID <[email protected]>

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.

_______________________________________________
debian-edu-commits mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-edu-commits