Removes trailing newline from /etc/fstab

Bug #279093 reported by Scott James Remnant (Canonical)
4
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Critical
Michael Vogt
Intrepid
Fix Released
Critical
Michael Vogt

Bug Description

Binary package hint: update-manager

The dist ugprader tarball includes the following:

        if replaced:
            logging.debug("writing new /etc/fstab")
            open("/etc/fstab.intrepid","w").write("\n".join(lines))
            os.rename("/etc/fstab.intrepid","/etc/fstab")

This will write a new copy of /etc/fstab _WITHOUT_ the final newline (it only puts newlines between the existant lines).

Removing the final newline means that the shell code in several places that tries to parse /etc/fstab will fail, in particular this will mean:

 - if the last entry is a swap partition, it will not be activated
 - if the last entry is an ordinary partition, it will not be checked (and may not be mounted!)
 - if the last entry is an NFS mount, it will not be mounted

While you could argue those are bugs in themselves, it would be nice if the dist-upgrader didn't cause them :p

Changed in update-manager:
assignee: nobody → mvo
importance: Undecided → Critical
milestone: none → ubuntu-8.10
Michael Vogt (mvo)
Changed in update-manager:
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-manager - 1:0.93.20

---------------
update-manager (1:0.93.20) intrepid; urgency=low

  * DistUpgrade/DistUpgradeGettext.py:
    - translated the empty "" into "" (the qt frontend
      may call this on empty strings in translate_widget)
  * DistUpgrade/DistUpgradeQuirks.py:
    - make sure to write a final newline in /etc/fstab
      when adding the relatime option (LP: #279093)

 -- Michael Vogt <email address hidden> Tue, 07 Oct 2008 10:42:13 +0200

Changed in update-manager:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.