Public bug reported:

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)

** Affects: sysvinit (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug i386 natty

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

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

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to