changing user within a post install.

Steven Michalske hardkrash at lunar-linux.org
Thu Apr 1 15:46:09 GMT 2004


For verification please read the abs-guide (advanced bash scripting 
guide)

-e just is for if the file exists
-f is regular file
-d is a directory

see section 7.2 of the abs guide for the rest :-P

lin abs-guide and you get your local copy!

hardkrash

On Apr 1, 2004, at 3:07 PM, Chuck Mead wrote:

> -----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-----
> _______________________________________________
> Lunar-dev mailing list
> Lunar-dev at lunar-linux.org
> http://dbguin.lunar-linux.org/mailman/listinfo/lunar-dev



More information about the Lunar-dev mailing list