There is a need for the BSD installer to add a password change script to PostgreSQL. The script looks like this:
The database is initialized and started, but the password is not set. The command is correct for normal execution. Maybe for the installer it needs to be issued differently or what could be the problem?
Code:
#!/bin/sh
read -p "New password: " POSTWD
chroot $BSDINSTALL_CHROOT /usr/local/etc/rc.d/postgresql oneinitdb
chroot $BSDINSTALL_CHROOT /usr/local/etc/rc.d/postgresql onestart
chroot $BSDINSTALL_CHROOT psql -U postgres -c "alter user postgres with password '$POSTWD'"