Hi Chuck:
When creating the link into rc0.d and rc6.d did you use a name
starting with "K"? If my understanding is correct the "S"
scripts get executed while starting up and the "K" scripts get
executed when shutting down. Think S for start and K for kill.
This is my UNIX experience talking, I have not actually tried
it on Linux.
HTH
Regards, Hugh
--
Hugh E Cruickshank, Forward Software, www.forward-software.com
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Carson, Chuck
> Sent: Wednesday, November 01, 2000 08:44
> To: '[EMAIL PROTECTED]'
> Subject: Problem getting shutdown script to execute
>
>
>
> I have the following startup/shutdown script:
>
> /etc/init.d/init_oracle
>
> /*START SCRIPT*/
> LOG=/var/oracle/init_oracle.log
> DATE=`/bin/date`
> SU=/bin/su
> RETVAL=0
>
> case "$1" in
> start)
> echo -n "Starting Oracle Services..."
> echo "${DATE}:startup" >> ${LOG}
> ${SU} - oracle -c "/etc/init.d/oracle_start"
> echo -n
> ;;
> stop)
> echo -n "Stopping Oracle Services..."
> echo "${DATE}:shutdown" >> ${LOG}
> ${SU} - oracle -c "/etc/init.d/oracle_stop"
> echo -n
> ;;
> *)
> echo -n "Usage: $0 { start | stop }"
> exit 1
> ;;
> esac
>
> # Currently hardcoded pending more thorough error checking
> exit ${RETVAL}
> /*END SCRIPT*/
>
> This script works fine when starting up, that is, it gets
> started during the
> change into runlevel 5.
> /etc/rc5.d/S81init_oracle (sym link to /etc/init.d/init_oracle)
>
> However, it does not get called during reboot/shutdown. I
> have used reboot,
> init 0, and init 6 and none will cause this shutdown script
> to get executed.
> I have placed a symlink everywhere sendmail gets shutdown, I
> believe rc0.d,
> rc1.d, and rc6.d. The permissions on /etc/init.d/init_oracle are 755
> root:root, as is all other scripts in that directory. If I explicitly
> execute '/etc/init.d/init_oracle stop' in a shell it works fine.
>
> I log each time this script is run, either starting or
> stopping oracle, it
> starts fine but never get shutdown.
>
> BTW: These scripts, init_oracle, oracle_start, and
> oracle_stop, work fine on
> other linux boxes and solaris boxes so I know they work. (and
> also these
> scripts work when executed manually in a shell)
>
> Any ideas?
>
> Thanks grealty,
> Chuck
>
> Chuck Carson Sr. Systems Engineer
> 858.909.3505 Office eBuilt.com
> 760.212.5899 Mobile San Diego, CA
>
>
>
>
> _______________________________________________
> Redhat-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list
>
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list