[Bug 1306673] Re: /etc/update-motd.d/91-release-upgrade: 4: [: =: unexpected operator
Michael Vogt
michael.vogt at canonical.com
Fri Apr 11 16:05:35 UTC 2014
** Changed in: ubuntu-release-upgrader (Ubuntu Trusty)
Status: Triaged => In Progress
** Changed in: ubuntu-release-upgrader (Ubuntu Trusty)
Assignee: (unassigned) => Michael Vogt (mvo)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-release-upgrader in
Ubuntu.
https://bugs.launchpad.net/bugs/1306673
Title:
/etc/update-motd.d/91-release-upgrade: 4: [: =: unexpected operator
Status in “ubuntu-release-upgrader” package in Ubuntu:
In Progress
Status in “ubuntu-release-upgrader” source package in Trusty:
In Progress
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1306673/+subscriptions
More information about the foundations-bugs
mailing list