[Bug 1282046] [NEW] Symlink /etc/motd gets removed on installation or upgrade from Precise

Michael Schaller misch at google.com
Wed Feb 19 11:26:39 UTC 2014


Public bug reported:

Hi everyone,

The postinst maintainer script of the initscripts package contains this code:
if dpkg --compare-versions "$PREV_VER" lt "2.88dsf-24" ; then
   if [ -L /etc/motd ] && [ "$(readlink /etc/motd)" = "/var/run/motd"  ]; then
       rm /etc/motd
...


This code is problematic as it removes /etc/motd for new installs and during an upgrade from Precise.
New installs:
$ dpkg --compare-versions "" lt "2.88dsf-24" && echo true || echo false
true

Upgrade from Precise:
$ dpkg --compare-versions "2.88dsf-13.10ubuntu11.1" lt "2.88dsf-24" && echo true || echo false
true


To me it looks like this issue is present since Saucy and got introduced with version 2.88dsf-41ubuntu1.

Best,

Michael Schaller

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


** Tags: saucy trusty

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

Title:
  Symlink /etc/motd gets removed on installation or upgrade from Precise

Status in “sysvinit” package in Ubuntu:
  New

Bug description:
  Hi everyone,

  The postinst maintainer script of the initscripts package contains this code:
  if dpkg --compare-versions "$PREV_VER" lt "2.88dsf-24" ; then
     if [ -L /etc/motd ] && [ "$(readlink /etc/motd)" = "/var/run/motd"  ]; then
         rm /etc/motd
  ...

  
  This code is problematic as it removes /etc/motd for new installs and during an upgrade from Precise.
  New installs:
  $ dpkg --compare-versions "" lt "2.88dsf-24" && echo true || echo false
  true

  Upgrade from Precise:
  $ dpkg --compare-versions "2.88dsf-13.10ubuntu11.1" lt "2.88dsf-24" && echo true || echo false
  true

  
  To me it looks like this issue is present since Saucy and got introduced with version 2.88dsf-41ubuntu1.

  Best,

  Michael Schaller

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



More information about the foundations-bugs mailing list