on disable, clear the motd of stale update-motd data
authorDustin Kirkland <kirkland@canonical.com>
Mon, 29 Sep 2008 15:43:02 +0000 (10:43 -0500)
committerDustin Kirkland <kirkland@canonical.com>
Mon, 29 Sep 2008 15:43:02 +0000 (10:43 -0500)
debian/changelog
update-motd

index 2781ea2..d522a67 100644 (file)
@@ -1,3 +1,10 @@
+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.
+
+ -- Dustin Kirkland <kirkland@ubuntu.com>  Mon, 29 Sep 2008 10:34:55 -0500
+
 update-motd (1.7) intrepid; urgency=low
 
   * Packaging suggestions (LP: #271848)
index 462e679..58df5a4 100755 (executable)
@@ -64,6 +64,10 @@ for arg in $@; do
                "--disable"|"-d")
                        touch "$DISABLED"
                        echo "$NAME is now disabled." 1>&2
+                       # Regenerate motd created at boot by
+                       # /etc/init.d/bootmisc.sh
+                       uname -snrvm > $REAL
+                       [ -f $SKEL ] && cat $SKEL >> $REAL
                        exit 0
                ;;
                "--enable"|"-e")