Invalid 'runuser' usage

From: Alexander Lakhin <exclusion(at)gmail(dot)com>
To: pgsql-pkg-yum(at)lists(dot)postgresql(dot)org
Subject: Invalid 'runuser' usage
Date: 2020-03-02 07:30:35
Message-ID: 948ee124-ed8d-8f5f-4022-bceafdb6d6a5@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-pkg-yum

Hello,
When trying to perform `setup initdb` on Centos 8 with an user-defined
PATH I get the following error:

[test(at)localhost ~]$ echo $PATH
/home/test/.local/bin:/home/test/bin:/usr/local/bin:/usr/bin

[test(at)localhost ~]$ sudo --preserve-env=PATH
/usr/pgsql-12/bin/postgresql-12-setup initdb
Initializing database ... failed, see /var/lib/pgsql/12/initdb.log

[test(at)localhost ~]$ sudo cat /var/lib/pgsql/12/initdb.log
/usr/pgsql-12/bin/postgresql-12-setup: line 143: runuser: command not found

Shouldn't the runuser be specified with the full path here?:
if [ -x /sbin/runuser ]
then
    SU=runuser

Best regards,
Alexander

Responses

Browse pgsql-pkg-yum by date

  From Date Subject
Next Message Rébeli-Szabó Tamás 2020-03-02 09:45:04 Re: PgAdmin4 installation fails for RHEL 7.7
Previous Message Markus Bräunig 2020-03-02 06:50:00 pg_partman 4.3