I noticed that if /run/motd.mythtv-status doesn't exist then
update-motd.d/50-mythtv-status exits with exit code 1 and pam_motd spits a
warning. I don't really want that to happen.
mythtv-status (1.0.1-2) UNRELEASED; urgency=medium
* Update systemd service file to use -f with rm (Closes: #954734).
+ * Patch to ensure that 50-mythtv-status has exit code 0 if no status file
+ exists.
-- Andrew Ruthven <andrew@etc.gen.nz> Sun, 06 Dec 2020 22:51:12 +1300
--- /dev/null
+Description: Ensure that 50-mythtv-status has exit code 0 if no status file eixsts.
+Author: Andrew Ruthven <andrew@etc.gen.nz>
+Origin: upstream
+Forwarded: not-needed
+Applied-Upstream: 1.0.2
+Last-Update: 2021-04-08
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/update-motd.d/50-mythtv-status
++++ b/update-motd.d/50-mythtv-status
+@@ -2,4 +2,9 @@
+ # See:
+ # man mythtv-update-motd
+ # on how to disable this service if you don't want it to run.
+-[ -f /run/motd.mythtv-status ] && cat /run/motd.mythtv-status
++
++if [ -f /run/motd.mythtv-status ]; then
++ cat /run/motd.mythtv-status
++else
++ exit 0
++fi
--- /dev/null
+50-mythtv-status-exit-code.patch