LordOS — a free, fast and secure GNU/Linux distribution based on Debian, with its own desktop environment: display server and Wayland compositor in C, a React UI engine on QuickJS, and private native apps.
C cdebiandesktop-environmentebpffirewalllandlocklinuxlinux-distributionopen-sourceprivacyquickjsraspberry-pi-5reactsecuritywaylandwayland-compositor
Debian's smartd stays off: a smartmontools drop-in with an opt-in file, and migration 004 stops a running one
Federico Pereira339324424d1b
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 57ad380..5c29fe0 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -71,6 +71,9 @@ of the matching [GitHub release](https://github.com/lordbasex/LordOS/releases),the panel header wrap to two lines instead of being cut, long destinations wrap too, and the applist gives the name more room (the counts moved next to the traffic bar, the Data and Rulecolumns are narrower).+- **Debian's smartd stays off.** Installing smartmontools from Disks no longer leaves its+ monitoring daemon polling the disks every 30 minutes; Disks and the Monitor read SMART on demand.+ Administrators can opt back in (docs/SYSTEM.md, "smartd").### Securitydiff --git a/docs/SYSTEM.md b/docs/SYSTEM.mdindex 6a990b8..10b1bd7 100644--- a/docs/SYSTEM.md+++ b/docs/SYSTEM.md@@ -248,8 +248,11 @@ so 0.8.2 uses it instead of growing our own:enables `smartmontools.service`, which starts at the next boot (on VM 119 it was enabled but notstarted right after the install). Debian's default configuration checks each disk every 30minutes with `-n standby` (a resting disk is not woken) and mails root, which goes nowhere on a-desktop. LordOS's own notices (`MONITOR.md`) don't need it; an administrator can turn it off with-`systemctl disable --now smartmontools`.+desktop. LordOS's own notices (`MONITOR.md`) don't need it, so since 0.8.3 it stays off: the+`lordos` package ships `/usr/lib/systemd/system/smartmontools.service.d/lordos.conf` with+`ConditionPathExists=/etc/lordos/smartd-enabled`, and migration `004-0.8.3-smartd-off.sh` stops a+smartd already running from an earlier install. An administrator who wants it creates that file+and runs `systemctl start smartmontools`.### Measured on VM 119diff --git a/packaging/migrations/004-0.8.3-smartd-off.sh b/packaging/migrations/004-0.8.3-smartd-off.shnew file mode 100644index 0000000..af82bcc--- /dev/null+++ b/packaging/migrations/004-0.8.3-smartd-off.sh@@ -0,0 +1,12 @@+# 0.8.3: Debian's smartd stays off (the package now ships a drop-in for smartmontools.service with+# ConditionPathExists=/etc/lordos/smartd-enabled, docs/SYSTEM.md "smartd"). A condition is only+# checked at start, so a smartd already running from an earlier smartmontools install is stopped+# here once. Nothing to do where smartmontools isn't installed or an administrator opted in.+[ -d /run/systemd/system ] || exit 0+command -v systemctl >/dev/null 2>&1 || exit 0+[ -e /etc/lordos/smartd-enabled ] && exit 0+systemctl daemon-reload 2>/dev/null || true+if systemctl is-active --quiet smartmontools.service 2>/dev/null; then+ systemctl stop smartmontools.service 2>/dev/null || true+fi+exit 0diff --git a/packaging/systemd/smartmontools-lordos.conf b/packaging/systemd/smartmontools-lordos.confnew file mode 100644index 0000000..9224b91--- /dev/null+++ b/packaging/systemd/smartmontools-lordos.conf@@ -0,0 +1,6 @@+# LordOS: Debian's smartd monitoring daemon stays off. The Disks app and the Monitor read SMART on+# demand through smartctl (docs/SYSTEM.md, "smartd"); smartd would poll every disk every 30 minutes+# and mail root, which goes nowhere on a desktop. An administrator who wants it creates+# /etc/lordos/smartd-enabled and runs: systemctl start smartmontools+[Unit]+ConditionPathExists=/etc/lordos/smartd-enableddiff --git a/tools/iso/mkdeb.sh b/tools/iso/mkdeb.shindex c1c5236..c21f297 100755--- a/tools/iso/mkdeb.sh+++ b/tools/iso/mkdeb.sh@@ -29,6 +29,7 @@# /usr/lib/lordos/migrate, migrations/ version-to-version system migrations, run by postinst# /etc/kernel/postinst.d/zz-lordos-reboot-required "restart required" after a kernel update# /usr/lib/modules-load.d/lordos-drivetemp.conf SATA disk temperatures (drivetemp) at boot+# /usr/lib/systemd/system/smartmontools.service.d/lordos.conf Debian's smartd stays off# /usr/share/chromium/extensions/lordos-video/ LordOS's own browser extension for smooth video without# hardware decoding (Debian's chromium loads every folder there;# docs/VIDEO.md). Its settings are written at login by the@@ -120,6 +121,8 @@ install -D -m 644 tools/iso/rootfs/etc/wireplumber/wireplumber.conf.d/lordos-vm-install -D -m 644 tools/iso/rootfs/etc/modprobe.d/lordos-vmwgfx.conf "$PKG/etc/modprobe.d/lordos-vmwgfx.conf"# SATA disk temperatures for Monitor → Disks: the drivetemp module at boot (docs/MONITOR.md)install -D -m 644 tools/iso/rootfs/etc/modules-load.d/lordos-drivetemp.conf "$PKG/usr/lib/modules-load.d/lordos-drivetemp.conf"+# Debian's smartd stays off: Disks and the Monitor read SMART on demand (docs/SYSTEM.md, "smartd")+install -D -m 644 packaging/systemd/smartmontools-lordos.conf "$PKG/usr/lib/systemd/system/smartmontools.service.d/lordos.conf"# remote login (SSH) defaults, read only once openssh-server is installed (docs/REMOTE.md)install -D -m 644 tools/iso/rootfs/etc/ssh/sshd_config.d/10-lordos.conf "$PKG/etc/ssh/sshd_config.d/10-lordos.conf"# a process may only trace its own descendants: a restricted Linux app must not take over an