| Author |
HPUX 11.11 doesn't call stop /sbin/rc3.d???
|
|
| Robert M. Gary 2006-12-15, 7:25 pm |
| 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
| |
| Michael Tosch 2006-12-16, 7:26 am |
| 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
| |
| Robert M. Gary 2006-12-16, 1:20 pm |
|
Michael Tosch wrote:
> Robert M. Gary wrote:
>
> 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!
|
|
|
|