Bug 11425 - Creating default database fail on empty /var/lib/pgsql-root/var/lib/pgsql/data
: Creating default database fail on empty /var/lib/pgsql-root/var/lib/pgsql/data
Status: CLOSED DUPLICATE of bug 10807
: Sisyphus
(All bugs in Sisyphus/postgresql8.2-server)
: unstable
: all Linux
: P2 normal
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2007-04-09 13:41 by
Modified: 2007-04-17 20:54 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2007-04-09 13:41:07
После dist-upgrade и очистки /var/lib/pgsql-root/var/lib/pgsql/data:

# service postgresql start
Adjusting environment for postgresql:                                          
                                                       [ DONE ]
Creating default database: /bin/su: unrecognized option
`--pgdata=/var/lib/pgsql-root/var/lib/pgsql/data'
usage: su [-|-l] [-c "command"] [-s "shell"] [username]

                                                       [FAILED]

При запуске с bash -x вижу такое:

+ echo -n 'Creating default database: '
Creating default database: + initlog -q -c '/bin/su -s /bin/sh -l postgres -c
/usr/bin/initdb --pgdata="/var/lib/pgsql-root/var/lib/pgsql/data"'
/bin/su: unrecognized option `--pgdata=/var/lib/pgsql-root/var/lib/pgsql/data'
usage: su [-|-l] [-c "command"] [-s "shell"] [username]

При этом:

# grep initdb /etc/init.d/postgresql      
                echo "export LANG LC_ALL LC_CTYPE LC_COLLATE LC_NUMERIC
LC_CTYPE
LC_TIME" >> "$PG_CHROOT_DIR$PGDATA/../initdb.i18n"
                action "Creating default database:" /bin/su -s /bin/sh -l
postgres -c "/usr/bin/initdb --pgdata=\"$PG_CHROOT_DIR$PGDATA\""

Куда девался " перед /usr/bin/initdb?
------- Comment #1 From 2007-04-17 20:54:46 -------

*** This bug has been marked as a duplicate of 10807 ***