From: Andrew Ruthven Date: Tue, 28 Oct 2008 02:13:19 +0000 (+1300) Subject: Make sure that /var/run/motd exists before trying to operate on it. X-Git-Tag: debian-0.9.0-3~2 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=929eecd2d7c9ead5d586b709a6086a7032456911;p=mythtv-status.git Make sure that /var/run/motd exists before trying to operate on it. --- diff --git a/debian/changelog b/debian/changelog index 84997ea..df7390a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 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 diff --git a/debian/init.d b/debian/init.d index 685f312..14c7703 100644 --- a/debian/init.d +++ b/debian/init.d @@ -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