changing user within a post install.

Chuck Mead csm at lunar-linux.org
Thu Apr 1 18:07:44 GMT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dennis Veatch wrote:
| On Thursday 01 April 2004 05:35 pm, Jon South wrote:
|
|>Dennis Veatch wrote:
|>
|>>Now I just need to add a bit of logic to detect /var/lib/pgsql/data
|>>exists so as not to reinitialize the database if one already exists.
|>
|>if [ ! -e "/var/lib/pgsql/data" ]; then do_it; fi
|>
|>-Striker
|
|
| Thanks. But I pulled this out of my rear :). At least I think it works;
|
| if [ ! -d "/var/lib/pgsql/data" ]; then
|   su postgres -c '/usr/bin/initdb -D /var/lib/pgsql/data'
| fi
|
| Oh, wait that's what your saying. Duh.
|
| I assume "-d" means directory and the "-e" (not sure).

iirc the -e means "exists and is a regular file"


- --
csm
Lunar Linux Project Lead
Disclaimer: "I am not a curmudgeon! No... really..."
Addendum: "Bwahahaha! Fire up the orbital mind-control lasers!"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAbKDAq3bny/5+GAcRAsXHAJ9OkbVGOeWDSE+OKqDX4cz6g/uhrwCfYVez
upcnRXCA33tws/aScljVcAE=
=YIv+
-----END PGP SIGNATURE-----


More information about the Lunar-dev mailing list