/etc/update-motd.d/91-release-upgrade: 4: [: =: unexpected operator

Bug #1306673 reported by Brian Candler
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Fix Released
High
Michael Vogt
Trusty
Fix Released
High
Michael Vogt

Bug Description

Message seen when logging in to Ubuntu 14.04 beta (freshly updated):

/etc/update-motd.d/91-release-upgrade: 4: [: =: unexpected operator

The problem seems to be missing quotes around an expression. This fixes it:

-if [ $(lsb_release -sd | cut -d" " -f4) = "(development" ]; then
+if [ "$(lsb_release -sd | cut -d" " -f4)" = "(development" ]; then

The bug is triggered because

$ lsb_release -sd
Ubuntu 14.04 LTS

has only 3 columns; therefore asking for -f4 just gives an empty string.

Additional info:

$ lsb_release -rd
Description: Ubuntu 14.04 LTS
Release: 14.04
$ apt-cache policy ubuntu-release-upgrader-core
ubuntu-release-upgrader-core:
  Installed: 1:0.220
  Candidate: 1:0.220
  Version table:
 *** 1:0.220 0
        500 http://gb.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

Related branches

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thanks for your report.

Changed in ubuntu-release-upgrader (Ubuntu Trusty):
importance: Undecided → High
status: New → Triaged
Michael Vogt (mvo)
Changed in ubuntu-release-upgrader (Ubuntu Trusty):
assignee: nobody → Michael Vogt (mvo)
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:0.220.1

---------------
ubuntu-release-upgrader (1:0.220.1) trusty; urgency=low

  * fix error message in motd on fresh install (LP: #1306673)
 -- Michael Vogt <email address hidden> Fri, 11 Apr 2014 17:59:31 +0200

Changed in ubuntu-release-upgrader (Ubuntu Trusty):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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