Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.5.2
-
None
-
None
-
2021-17
Description
columnstore-post-install has a syntax error in 1.5.2. The problem is with the following line:
It results in errors like this:
/usr/bin/columnstore-post-install: line 18: [: too many arguments
|
strings: /proc/1502/environ: Permission denied
|
strings: '/proc/0/environ': No such file
|
error: process ID out of range
|
The problem appears to happen because $pid is not surrounded in quotes.
It is easy enough to reproduce with the following bash snippet:
$ while [ -z "$ENV_VAR" -a $pid != 1 ]; do
|
> ENV_VAR=test
|
> pid=2
|
> done
|
-bash: [: too many arguments
|
It is fixed by quoting $pid. For example:
$ while [ -z "$ENV_VAR" -a "$pid" != 1 ]; do
|
> ENV_VAR=test
|
> pid=2
|
> done
|
This is with the following bash version and OS:
$ bash --version
|
GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)
|
Copyright (C) 2016 Free Software Foundation, Inc.
|
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
|
 |
This is free software; you are free to change and redistribute it.
|
There is NO WARRANTY, to the extent permitted by law.
|
$ cat /etc/os-release
|
NAME="Ubuntu"
|
VERSION="18.04.3 LTS (Bionic Beaver)"
|
ID=ubuntu
|
ID_LIKE=debian
|
PRETTY_NAME="Ubuntu 18.04.3 LTS"
|
VERSION_ID="18.04"
|
HOME_URL="https://www.ubuntu.com/"
|
SUPPORT_URL="https://help.ubuntu.com/"
|
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
|
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
|
VERSION_CODENAME=bionic
|
UBUNTU_CODENAME=bionic
|