initialization script
Posted in 2000
Topics: Server Administration, Internationalization & Character Sets
I'm having problems configuring the initialization script which starts
informix server on boot.
What I have is this:
#!/sbin/sh
#
# Copyright (c) 1993, 1997 by Sun Microsystems, Inc.
# All rights reserved.
#
#ident "@(#)autofs 1.5 97/12/08 SMI"
#su - informix
case "$1" in
'start')
su - informix
# INFORMIXSERVER=ultra208
# INFORMIXDIR=/space/informix
# DB_LOCALE=en_us.8859-1
# CLIENT_LOCALE=en_us.8859-1
PATH=$INFORMIXDIR:$PATH
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/space/informix/lib/:/space/informix/lib/esql:
export INFORMIXDIR INFORMIXSERVER LD_LIBRARY_PATH PATH DB_LOCALE CLIENT_LOCALE
/space/informix/bin/oninit >/dev/console 2>&1 && echo 'starting Informix ser
ver.'
;;
'stop')
su - informix
/space/informix/bin/onmode -ky
;;
*)
echo "Usage: $0 { start | stop }"
exit 1
;;
esac
exit 0
every time I try to start or stop the server I get this:
GLS initialization failed, error -23101
Somthing I should look for?
--
"And I'm happy, because you make me feel good, about me." - Melvin Udall
-----------------------------------------------------------------
Mart'n Marqu's email: martin@math.unl.edu.ar
Santa Fe - Argentina http://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-----------------------------------------------------------------
"Martin A. Marques" wrote:
>
> I'm having problems configuring the initialization script which starts
> informix server on boot.
> What I have is this:
>
> #!/sbin/sh
> #
> # Copyright (c) 1993, 1997 by Sun Microsystems, Inc.
> # All rights reserved.
> #
> #ident "@(#)autofs 1.5 97/12/08 SMI"
> #su - informix
>
> case "$1" in
> 'start')
> su - informix
> # INFORMIXSERVER=ultra208
> # INFORMIXDIR=/space/informix
> # DB_LOCALE=en_us.8859-1
> # CLIENT_LOCALE=en_us.8859-1
> PATH=$INFORMIXDIR:$PATH
> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/space/informix/lib/:/space/informix/lib/es> ql:
> export INFORMIXDIR INFORMIXSERVER LD_LIBRARY_PATH PATH DB_LOCALE CLIENT_LOCA> LE
> /space/informix/bin/oninit >/dev/console 2>&1 && echo 'starting Informix ser
> ver.'
> ;;
>
> 'stop')
> su - informix
> /space/informix/bin/onmode -ky
> ;;
>
> *)
> echo "Usage: $0 { start | stop }"
> exit 1
> ;;
> esac
>
> exit 0
>
> every time I try to start or stop the server I get this:
>
> GLS initialization failed, error -23101
>
> Somthing I should look for?
There are a couple of things that worry me. One is those 'su'
commands. That
starts a sub-shell as informix, probably gets no input from /dev/null
and stops.
The startup script then continues as root. The other is those commented
out lines setting key little things like INFORMIXDIR and
INFORMIXSERVER. Since the 'su - informix' command is not setting the
environment usefully, these values are not set, leading to the error
message you are getting.
I'd remove the su commands and explicitly set the environment variables
in the script. That should fix it.
--
Yours,
Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h>
Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN
"I don't suffer from insanity; I enjoy every minute of it!"