Hello,
When trying to perform `setup initdb` on Centos 8 with an user-defined
PATH I get the following error:
[test@localhost ~]$ echo $PATH
/home/test/.local/bin:/home/test/bin:/usr/local/bin:/usr/bin
[test@localhost ~]$ sudo --preserve-env=PATH
/usr/pgsql-12/bin/postgresql-12-setup initdb
Initializing database ... failed, see /var/lib/pgsql/12/initdb.log
[test@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