]> git.etc.gen.nz Git - mythtv-status.git/commitdiff
Make sure that /var/run/motd exists before trying to operate on it.
authorAndrew Ruthven <andrew@etc.gen.nz>
Tue, 28 Oct 2008 02:13:19 +0000 (15:13 +1300)
committerAndrew Ruthven <andrew@etc.gen.nz>
Tue, 28 Oct 2008 02:46:17 +0000 (15:46 +1300)
debian/changelog
debian/init.d

index 84997ea2f318a2039e2fc379f174df8151b16f00..df7390a16690202765f80eaf71ccffba4f465f89 100644 (file)
@@ -1,3 +1,11 @@
+mythtv-status (0.9.0-3) unstable; urgency=medium
+
+  * If someone has removed /var/run/motd then tries to install (or
+    reinstall) this package, then it fails.  We should make sure that
+    doesn't happen by making sure that /var/run/motd exists.
+
+ -- Andrew Ruthven <andrew@etc.gen.nz>  Tue, 28 Oct 2008 15:12:02 +1300
+
 mythtv-status (0.9.0-2) unstable; urgency=low
 
   * The init.d script shouldn't check the return code anymore, as the
index 685f312ed6b54e663446d7d43206c1f1fd3a4699..14c770302de36a705981e5eb580973f6241b896e 100644 (file)
@@ -57,6 +57,9 @@ set -e
 case "$1" in
   start|reload|refresh|restart|force-reload)
     log_daemon_msg "Updating $DESC" "$NAME"
+
+    # Just incase someone has removed their motd file.
+    [ ! -f /var/run/motd ] && touch /var/run/motd
     [ ! -f /var/run/motd.orig ] && cp /var/run/motd /var/run/motd.orig
 
     cp /var/run/motd.orig /var/run/motd.new