Bug 11425 - Creating default database fail on empty /var/lib/pgsql-root/var/lib/pgsql/data
Summary: Creating default database fail on empty /var/lib/pgsql-root/var/lib/pgsql/data
Status: CLOSED DUPLICATE of bug 10807
Alias: None
Product: Sisyphus
Classification: Development
Component: postgresql8.2-server (show other bugs)
Version: unstable
Hardware: all Linux
: P2 normal
Assignee: Ivan Fedorov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-09 13:41 MSD by enp
Modified: 2007-04-17 20:54 MSD (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description enp 2007-04-09 13:41:07 MSD
После 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 Ivan Fedorov 2007-04-17 20:54:46 MSD

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