[Bug 1637800] Re: add a motd script for news

Andreas Hasenack andreas at canonical.com
Fri Sep 27 19:17:12 UTC 2019


+ [ -d /run/systemd/system ]
+ systemctl --system daemon-reload
+ deb-systemd-invoke start motd-news.service
motd-news.service is a disabled or a static unit, not starting it.
+ [ -d /run/systemd/system ]
+ systemctl --system daemon-reload
+ deb-systemd-invoke start motd-news.timer
motd-news.timer is a disabled or a static unit, not starting it.

The xenial package is not using debhelper, and the manual entries in
postinst do not enable it, just try to start it.

This is the bit that dh_systemd_enable adds to postinst in bionic, for example:
# Automatically added by dh_systemd_enable/11.1.6ubuntu2
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
        # This will only remove masks created by d-s-h on package removal.
        deb-systemd-helper unmask 'motd-news.timer' >/dev/null || true

        # was-enabled defaults to true, so new installations run enable.
        if deb-systemd-helper --quiet was-enabled 'motd-news.timer'; then
                # Enables the unit on first installation, creates new
                # symlinks on upgrades if the unit file has changed.
                deb-systemd-helper enable 'motd-news.timer' >/dev/null || true
        else
                # Update the statefile to add new symlinks (if any), which need to be
                # cleaned up on purge. Also remove old symlinks.
                deb-systemd-helper update-state 'motd-news.timer' >/dev/null || true
        fi
fi

And then come the deb-systemd-invoke start bits that were added manually
to the xenial package.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to base-files in Ubuntu.
https://bugs.launchpad.net/bugs/1637800

Title:
  add a motd script for news

Status in base-files package in Ubuntu:
  Fix Released
Status in base-files source package in Xenial:
  Fix Committed

Bug description:
  Add a new update-motd script for printing news and/or important
  notices.

  == SRU ==

  [IMPACT]
  We should add important security messages or other news to the MOTD.

  [TEST CASE]
  Login to the system and ensure that the "news" section of the motd is displayed.  Note that you might need to force trigger an update by running 'sudo update-motd'.

  [REGRESSION POTENTIAL]
  No reasonable regression potential.  The script simply prints 2 lines of text to the MOTD.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/base-files/+bug/1637800/+subscriptions



More information about the foundations-bugs mailing list