View Issue Details

IDProjectCategoryView StatusLast Update
0001209bareos-core[All Projects] Generalpublic2020-03-05 17:12
ReportermgronczewskiAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version19.2.6 
Fixed in Version 
Summary0001209: Scripts should run psql with --no-psqlrc
DescriptionScripts like upgrade_database fail miserably if user have some options set in .psqlrc, for example the result:

sudo -u postgres ./update_bareos_tables
Updating postgresql tables
./update_bareos_tables: 110: [: Expanded: unexpected operator
./update_bareos_tables: 126: [: Expanded: unexpected operator
./update_bareos_tables: 126: [: Expanded: unexpected operator
./update_bareos_tables: 126: [: Expanded: unexpected operator
./update_bareos_tables: 126: [: Expanded: unexpected operator
./update_bareos_tables: 126: [: Expanded: unexpected operator
./update_bareos_tables: 126: [: Expanded: unexpected operator
./update_bareos_tables: 126: [: Expanded: unexpected operator
./update_bareos_tables: 126: [: Expanded: unexpected operator
./update_bareos_tables: 126: [: Expanded: unexpected operator
./update_bareos_tables: 126: [: Expanded: unexpected operator
Don't know how to upgrade from version Expanded display is used automatically.

caused by having different prompt and expanded display enabled.
Steps To Reproducein .psqlrc:

\set PROMPT1 '%M:%> %n@\033[40;1;32m%/\033[0m%R%#%x '
\set PROMPT2 '%M:%> %n@\033[32m%/\033[0m%R%#%x '
\set HISTFILE ~/.psql/.psql_history- :DBNAME
\x auto

\echo 'server: \033[1;32mexample.com\033[0m'
TagsNo tags attached.
bareos-master: impact
bareos-master: action
bareos-19.2: impact
bareos-19.2: action
bareos-18.2: impact
bareos-18.2: action
bareos-17.2: impact
bareos-17.2: action
bareos-16.2: impact
bareos-16.2: action
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impact
bareos-14.2: action
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-03-05 17:12 mgronczewski New Issue