[Bug 1000298] Re: /etc/motd.tail is silently removed on upgrade of initscripts

Steve Langasek steve.langasek at canonical.com
Fri May 17 22:19:24 UTC 2013


It happens that this will be fixed in the next upload to saucy because
Debian's motd handling has changed altogether and we are following suit,
so those commands are no longer present in the maintainer script at all;
but we should backport this fix to precise.

** Changed in: sysvinit (Ubuntu)
       Status: Confirmed => Triaged

** Changed in: sysvinit (Ubuntu)
   Importance: Undecided => Medium

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

Title:
  /etc/motd.tail is silently removed on upgrade of initscripts

Status in “sysvinit” package in Ubuntu:
  Triaged

Bug description:
  /etc/motd.tail is always removed on upgrade of initscripts. I
  encountered this problem on upgrading my Ubuntu server from 10.04 to
  12.04.

  This problem is caused by misuse of fgrep in initscripts.postinst:

   ...
          help_text=$(/etc/update-motd.d/10-help-text 2>/dev/null || true)
          if [ -n "$help_text" ] && fgrep -q "$help_text" /etc/motd.tail
          then
                  rm -f /etc/motd.tail
   ...

  /etc/update-motd.d/10-help-text *outputs a single newline* before the
  line containing "Documents: https://help.ubuntu.com/". On the other
  hands, man grep reads:

         -F, --fixed-strings
                Interpret PATTERN as a list of fixed strings, separated by newlines, any of which is to be matched.  (-F is specified by POSIX.)

  Then this fgrep call always succeeds and /etc/motd.tail is removed.

  I attached a patch to solve this issue.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/1000298/+subscriptions




More information about the foundations-bugs mailing list