Project

General

Profile

Actions

Bug #18014

closed

rudder-reports-postinst errors during upgrade from 6.1.0 to 6.1.1

Added by François ARMAND over 4 years ago. Updated over 4 years ago.

Status:
Released
Priority:
N/A
Category:
Packaging
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
User visibility:
Operational - other Techniques | Rudder settings | Plugins
Effort required:
Priority:
32
Name check:
To do
Fix check:
Checked
Regression:

Description

On suse 12, during upgrade from rudder 6.1.0 to 6.1.1, we got:

INFO: Waiting for PostgreSQL to be up... Done
/opt/rudder/share/package-scripts/rudder-reports-postinst: line 112: [: too many arguments
/opt/rudder/share/package-scripts/rudder-reports-postinst: line 120: [: too many arguments

Corresponding lines in script in rudder-package/rudder-reports/SOURCES/rudder-reports-postinst:

CHK_PG_DB=$(su - postgres -c "psql -t -c \"select count(1) from pg_catalog.pg_database where datname = '${DBNAME}'\"")
CHK_PG_USER=$(su - postgres -c "psql -t -c \"select count(1) from pg_user where usename = '${USERNAME}'\"")

# Rudder user
if [ ${CHK_PG_USER} -eq 0 ] # <- line 112
then
...

# Rudder database
if [ ${CHK_PG_DB} -eq 0 ] # <- line 120
then
...
Actions

Also available in: Atom PDF