[SunHELP] Solaris 8 init.d startup scripts

DAUBIGNE Sebastien - BOR SDaubigne@bordeaux-bersol.sema.slb.com sunhelp at sunhelp.org
Thu Dec 27 08:18:36 CST 2001


Can you post us the command you typed to make the link, or just send us the
output of "ls -l /etc/rc3.d/S97oracle".
Maybe the link is broken ?

Also you don't have to set the ORACLE_HOME var in the stratup script. Just
leave it alone in the oracle's .profile,
and protect the variable when you call su :

	/usr/bin/su - oracle -c ' $ORACLE_HOME/bin/dbstart '

Hence the ORACLE_HOME var will be interpreted after su and .profile, just
before calling dbstart.

---
Sebastien DAUBIGNE
sebastien.daubigne at sema.fr <mailto:sebastien.daubigne at sema.fr>  - (+33)
(0)5.57.26.56.36
Sema Global Services - AFM/DW/Pessac

	-----Message d'origine-----
	De:	Scott Jonathan [SMTP:jonokun at hotmail.com]
	Date:	jeudi 27 dicembre 2001 01:19
	@:	sunhelp at sunhelp.org
	Objet:	RE: [SunHELP] Solaris 8 init.d startup scripts

	Yes, I verified it ran correctly, given the right parameter, and
all. It
	seems to just not get called. Below is the script

	#!/bin/sh
	#Match ORACLE_HOME with whatever is in ~oracle/.profile!!!
	ORACLE_HOME=/opt/oracle/OraHome1

	case "$1" in
	'start')
	       /usr/bin/su - oracle -c $ORACLE_HOME/bin/dbstart
	       /usr/bin/su - oracle -c "$ORACLE_HOME/bin/lsnrctl start"
	       echo "blah!\n"

	       exit 0
	;;

	'stop')
	       /usr/bin/su - oracle -c "$ORACLE_HOME/bin/lsnrctl stop"
	       /usr/bin/su - oracle -c $ORACLE_HOME/bin/dbshut
	       echo "blah blah!\n"

	       exit 0
	;;

	*)
	       echo " Usage : `basename $0`"
	       exit 0
	;;
	esac

	exit 0

	Thanks!
	JS


	>From: "Khuong, Lee T" <Lee.Khuong at stratech.com>
	>Reply-To: sunhelp at sunhelp.org
	>To: 'Scott Jonathan ' <jonokun at hotmail.com>
	>Subject: RE: [SunHELP] Solaris 8 init.d startup scripts
	>Date: Wed, 26 Dec 2001 18:36:18 -0500
	>
	>Scott,
	>
	>Send me your oracle startup and shutdown scripts.  btw, I forgot to
tell
	you
	>to go ahead and copy your startup S97oracle in /etc/rc3.d.
	>
	>Have you tried just to run the script by itself for testing?  Login
as
	root
	>and run that script to see if it can stop and restart your
databases.
	>
	>Lee
	>
	>-----Original Message-----
	>From: Scott Jonathan
	>To: sunhelp at sunhelp.org
	>Sent: 12/26/2001 1:35 AM
	>Subject: RE: [SunHELP] Solaris 8 init.d startup scripts
	>
	>Yes, if I run it as root, it starts up just fine, setuid'ing to
user
	>"oracle" correctly. But it just doesnt seem to get called at boot
time.
	>I
	>made a link "S97oracle" in /etc/rc*.d/ but still it wont get
called. I
	>took
	>out the part of the script that shuts down oracle, thinking there
may be
	>a
	>problem somewhere that it isnt getting called with the parameter
	>"start".
	>
	>I've check the permissions, and it is working. Still, nothing
works.:(
	>
	>Thanks for the help. Anymore you might have in mind? hehe Im fresh
out
	>of
	>ideas!:(
	>
	>JS
	>
	>P.S. This is Solaris 8 on a UE 450. Was there a change in init
scripts
	>for
	>Solaris 8?
	>
	>
	> >From: "Khuong, Lee T" <Lee.Khuong at stratech.com>
	> >Reply-To: sunhelp at sunhelp.org
	> >To: 'Scott Jonathan ' <jonokun at hotmail.com>
	> >Subject: RE: [SunHELP] Solaris 8 init.d startup scripts
	> >Date: Tue, 25 Dec 2001 15:02:58 -0500
	> >
	> >Scott,
	> >
	> >Did you have oracle environment initialize in your script and su
-
	>oracle
	>in
	> >the startup, shutdown script also?  You'll need that.
	> >
	> >Lee
	> >
	> >-----Original Message-----
	> >From: Scott Jonathan
	> >To: sunhelp at sunhelp.org
	> >Sent: 12/25/2001 3:07 AM
	> >Subject: [SunHELP] Solaris 8 init.d startup scripts
	> >
	> >Hello!
	> >
	> >I am having trouble getting an init.d startup script I made to
get
	> >called.
	> >The script works with the command "oracle start" and shutdowns
properly
	> >with "oracle stop". I have placed it inside /etc/init.d and given
it
	> >proper
	> >run permissions. I also made sure it was chown'ed root:sys.
	> >
	> >I made a link "S97oracle" pointing to the file in /etc/rc3.d.
Then I
	> >made a
	> >link to it again as "K15oracle" in /etc/rc0.d.
	> >
	> >When I reboot the machine, there is no reference to the script in
the
	> >messages file or syslog, and the program is not running. What
gives? I
	> >cant
	> >figure out why I cannot get it to start Oracle for me!
	> >
	> >Hopefully someone can help!
	> >
	> >JS
	> >
	> >_________________________________________________________________
	> >??????????? No.1 ? MSN Hotmail ?!http://www.hotmail.com/JA/
	> >_______________________________________________
	> >SunHELP maillist  -  SunHELP at sunhelp.org
	> >http://www.sunhelp.org/mailman/listinfo/sunhelp
	>
	>
	>
	>
	>_________________________________________________________________
	>?????????????????? MSN Hotmail ?????
	>http://www.hotmail.com/JA/
	>_______________________________________________
	>SunHELP maillist  -  SunHELP at sunhelp.org
	>http://www.sunhelp.org/mailman/listinfo/sunhelp




	_________________________________________________________________
	??????????? No.1 ? MSN Hotmail ??http://www.hotmail.com/JA/
	_______________________________________________
	SunHELP maillist  -  SunHELP at sunhelp.org
	http://www.sunhelp.org/mailman/listinfo/sunhelp



More information about the SunHELP mailing list