[Bug 878412] Re: initscripts.postinst always removes /etc/motd.tail

Ryan Daly 878412 at bugs.launchpad.net
Wed Oct 19 18:30:12 UTC 2011


-- 
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/878412

Title:
  initscripts.postinst always removes /etc/motd.tail

Status in “sysvinit” package in Ubuntu:
  New

Bug description:
  I noticed this behavior when upgrading from 10.04.1 -> 10.04.3.  The
  following code (inside initscripts.postinst) will always remove
  /etc/motd.tail if there is any character (even a single space) in the
  file.  If the file is empty, it appears to be left alone.

  <code>
          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
                  # Rebuild the motd now that motd.tail has been fixed.
  [..]
          fi
  </code>

  The 'fgrep -q "$help_text" /etc/motd.tail' *always* matches if the
  file is non-null.  This is bad in that it wipes out custom
  modifications to the motd.

  ProblemType: Bug
  DistroRelease: Ubuntu 11.04
  Package: initscripts 2.87dsf-4ubuntu23
  ProcVersionSignature: Ubuntu 2.6.38-11.50-generic-pae 2.6.38.8
  Uname: Linux 2.6.38-11-generic-pae i686
  NonfreeKernelModules: nvidia wl
  Architecture: i386
  Date: Wed Oct 19 14:18:15 2011
  SourcePackage: sysvinit
  UpgradeStatus: Upgraded to natty on 2011-04-28 (173 days ago)

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




More information about the foundations-bugs mailing list