From: Dustin Kirkland Date: Tue, 30 Sep 2008 22:31:44 +0000 (-0500) Subject: fixes for bug #276539 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffb4b3db0b4af2fcbe6286bcc115b38ff1a000ff;p=update-motd.git fixes for bug #276539 --- diff --git a/debian/changelog b/debian/changelog index d522a67..95a6b9c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,11 @@ update-motd (1.8) UNRELEASED; urgency=low - * update-motd: On disable, regenerate a motd that does not have the possibly - stale update-motd data in it. + * update-motd: on disable, regenerate a motd that does not have the possibly + stale update-motd data in it; on enable, run update-motd immediately + (LP: #276539) + * update-motd.1: update the manpage accordingly - -- Dustin Kirkland Mon, 29 Sep 2008 10:34:55 -0500 + -- Dustin Kirkland Tue, 30 Sep 2008 17:30:34 -0500 update-motd (1.7) intrepid; urgency=low diff --git a/update-motd b/update-motd index 58df5a4..044802c 100755 --- a/update-motd +++ b/update-motd @@ -73,7 +73,8 @@ for arg in $@; do "--enable"|"-e") rm -f "$DISABLED" echo "$NAME is now enabled." 1>&2 - exit 0 + # Do not exit here, as we want to update the MOTD + # immediately upon enabling ;; "--force"|"-f") FORCE=1 diff --git a/update-motd.1 b/update-motd.1 index f7ef35d..729295b 100644 --- a/update-motd.1 +++ b/update-motd.1 @@ -12,10 +12,10 @@ update\-motd [\-\-disable|\-\-enable|\-\-force] .IX Header "OPTIONS" .TP \fB\-\-disable\fP -Prevent update-motd from running. This is useful for temporarily disabling automatic updates of \fI/etc/motd\fP by the \fI/etc/cron.d/update-motd\fP cronjob. Note that this exits immediately after disabling, and does update the MOTD. +Prevent update-motd from running. This is useful for temporarily disabling automatic updates of \fI/etc/motd\fP by the \fI/etc/cron.d/update-motd\fP cronjob. Note that this regenerates a base MOTD without the update-motd additions, and then exits. .TP \fB\-\-enable\fP -Allow update-motd to run. This is useful for enabling automatic updates of \fI/etc/motd\fP through the \fI/etc/cron.d/update-motd\fP cronjob. Note that this exits immediately after enabling, and does update the MOTD. +Allow update-motd to run. This is useful for enabling automatic updates of \fI/etc/motd\fP through the \fI/etc/cron.d/update-motd\fP cronjob. Note that this updates the MOTD immediately. .TP \fB\-\-force\fP Override a disabled update-motd for a single, immediate update of \fI/etc/motd\fP.