Description of problem: not sure but '[' is external command for bash (/usr/bin/[), thus the syntax is not ok - comparing <nothing> in algebraically equal test. iiuc if you would use bash's '[[' it would work. also would work if all vars would be defined in the beginning with its default values (ie. LIVE=0). if [ "${LIVE}" -eq 1 ]; then echo "Generating reports:" echo "===================" tmpfile=$(mktemp) rhv-log-collector-analyzer-live --csv > "${tmpfile}" && asciidoctor -a toc=left -o "${HTML_OUT}" "${tmpfile}" echo "Generated ${HTML_OUT}" exit $? fi Version-Release number of selected component (if applicable): rhv-log-collector-analyzer-0.1.2-0.el7ev.noarch How reproducible: 100% Steps to Reproduce: 1. run the tool, eg. $ rhv-log-collector-analyzer /tmp/sosreport-LogCollector-20180725114347.tar.xz 2. check output 3. Actual results: syntax is incorrect Expected results: not syntax issues Additional info:
ok, rhv-log-collector-analyzer-0.1.5-0.el7ev.noarch $ rhv-log-collector-analyzer /temp/sosreport-LogCollector-20180817140049.tar.xz Preparing environment: ====================== Temporary working directory is /temp/tmp.rMp9TTazmh Unpacking postgres data. This can take up to several minutes. sos-report extracted into: /temp/tmp.rMp9TTazmh/unpacked_sosreport pgdump extracted into: /temp/tmp.rMp9TTazmh/pg_dump_dir Welcome to unpackHostsSosReports script! Creating a temporary database in /temp/tmp.rMp9TTazmh/postgresDb/pgdata. Log of initdb is in /temp/tmp.rMp9TTazmh/initdb.log WARNING: enabling "trust" authentication for local connections You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. LOG: redirecting log output to logging collector process HINT: Future log output will appear in directory "pg_log". Importing the dump into a temporary database. Log of the restore process is in /temp/tmp.rMp9TTazmh/db-restore.log Generating reports: =================== Generated analyzer_report.html Cleaning up: ============ Stopping temporary database Removing temporary directory /temp/tmp.rMp9TTazmh
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2018:2639