[Pkg-sysvinit-devel] Bug#624391: initscripts: postinst dupes /etc/motd into /etc/motd.tail
apollock at debian.org
Sat Apr 30 16:51:00 UTC 2011
On Sat, Apr 30, 2011 at 10:09:22PM +1000, Kel Modderman wrote:
> On Thu, 28 Apr 2011 02:44:15 PM Andrew Pollock wrote:
> > Package: initscripts
> > Version: 2.86.ds1-61
> > Severity: minor
> > I encountered this bug on Ubuntu 10.04, but the maintainer script in
> > question appears unmodified from Debian.
> > Basically, the postinst of initscripts appears to copy the contents of
> > /etc/motd into /etc/motd.tail, if it doesn't exist.
> > This appears to be benign on Debian, but on Ubuntu, which will dynamically
> > create an /etc/motd out of shell fragments in /etc/update-motd.d and
> > /etc/motd.tail, it has the undesired effect of caused duplicated stale
> > content.
> > Ubuntu recently pushed an updated initscripts package to 10.04, which
> > caused the problem I describe.
> > More information in
> > https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/634387
> > In short, I don't think the postinst should be creating an /etc/motd.tail
> > if one doesn't exist already.
> I do not completely understand this statement. Do you mean: postinst should
> never create /etc/motd.tail at all?
Right. Unless the intended purpose of /etc/motd.tail differs between Debian
and Ubuntu? From reading motd.tail(5), perhaps the answer is yes, they do
have different purposes... Although the manpages say the same thing on
Debian and Ubuntu, the comment in /etc/update-motd.d/99-footer says
# motd.tail is reserved for the admin to append static
# trailing information to a dynamically generated
which I think is consistent with the spirit of how it's intended to be used
on Debian as well, isn't it?
> > I also don't think it should go putting anything in it if it does exist.
> Tend to agree with this one.
> I'd be happy to look at/apply a patch if you could please whip one up?
Okay, but what's the agreed course of action?
Currently we have:
f [ ! -f /etc/motd.tail ]
if [ -f /etc/motd ]
sed 1d /etc/motd > /etc/motd.tail
[ -s /etc/motd.tail ] || rm -f /etc/motd.tail
Under what circumstances would the postinst want to be messing around with
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 835 bytes
Desc: Digital signature
More information about the Pkg-sysvinit-devel