HPUX 11.11 doesn't call stop /sbin/rc3.d???

  • Follow


I have a stop/start script that lives in /sbin/rc3.d. The start gets
called but I don't see the stop ever called.

case "$1" in
....
'stop')
    echo "Im SHUTTING DOWN1" > /tmp/out.txt 1>&2
    /usr/bin/nohup <Do something> >/dev/null 2>&1 &
    /usr/bin/sleep 20 #give some time to shutdown
    echo "Im SHUTTING DOWN2" > /tmp/out.txt 1>&2
    ;;
....

I never get anything to /tmp/out.txt. Is there something special that
needs to happen to allow for the stop other than just adding a 'stop'
parameter?

-Robert

0
Reply N7093v (29) 12/15/2006 7:59:11 PM

Robert M. Gary wrote:
> I have a stop/start script that lives in /sbin/rc3.d. The start gets
> called but I don't see the stop ever called.
> 
> case "$1" in
> ...
> 'stop')
>     echo "Im SHUTTING DOWN1" > /tmp/out.txt 1>&2
>     /usr/bin/nohup <Do something> >/dev/null 2>&1 &
>     /usr/bin/sleep 20 #give some time to shutdown
>     echo "Im SHUTTING DOWN2" > /tmp/out.txt 1>&2
>     ;;
> ...
> 
> I never get anything to /tmp/out.txt. Is there something special that
> needs to happen to allow for the stop other than just adding a 'stop'
> parameter?
> 
> -Robert
> 

in /sbin/rc3.d all scripts are named S* so are called with "start"

Put a symbolic link /sbin/rc0.d/K...
that points to your start script.
Then it is called with "stop" when run-level 0 is entered.


-- 
Michael Tosch @ hp : com
0
Reply Michael 12/16/2006 1:04:26 PM


Michael Tosch wrote:
> Robert M. Gary wrote:
> > I have a stop/start script that lives in /sbin/rc3.d. The start gets
> > called but I don't see the stop ever called.
> >
> > case "$1" in
> > ...
> > 'stop')
> >     echo "Im SHUTTING DOWN1" > /tmp/out.txt 1>&2
> >     /usr/bin/nohup <Do something> >/dev/null 2>&1 &
> >     /usr/bin/sleep 20 #give some time to shutdown
> >     echo "Im SHUTTING DOWN2" > /tmp/out.txt 1>&2
> >     ;;
> > ...
> >
> > I never get anything to /tmp/out.txt. Is there something special that
> > needs to happen to allow for the stop other than just adding a 'stop'
> > parameter?
> >
> > -Robert
> >
>
> in /sbin/rc3.d all scripts are named S* so are called with "start"
>
> Put a symbolic link /sbin/rc0.d/K...
> that points to your start script.
> Then it is called with "stop" when run-level 0 is entered.

Awesome! Thanks!

0
Reply Robert 12/16/2006 5:10:21 PM

2 Replies
167 Views

(page loaded in 0.081 seconds)

Similiar Articles:







7/14/2012 12:39:24 AM


Reply: