|
From: Donatas C. <don...@ma...> - 2005-12-14 07:13:56
|
Hi Leif,
Well I have not tested it but I'm sure start() function in your script will
not create lock file :) This is why:
...
if [ "X$IGNORE_SIGNALS" = "X" ]
then
exec $CMDNICE $WRAPPER_CMD $WRAPPER_CONF
wrapper.pidfile=$PIDFILE wrapper.daemonize=TRUE
else
exec $CMDNICE $WRAPPER_CMD $WRAPPER_CONF
wrapper.pidfile=$PIDFILE wrapper.anchorfile=$ANCHORFILE
wrapper.ignore_signals=TRUE wrapper.daemonize=TRUE
fi
touch /var/lock/subsys/$APP_NAME
...
It is too late to "touch" because "exec" will never return back to your
script (I tested it by putting echo command after exec). This is from "bash"
man pages:
--------------------
exec [-cl] [-a name] [command [arguments]]
If command is specified, it replaces the shell. No new
process
is created...
--------------------
So, no other statements after exec will be executed in your script, sorry :)
Donatas
-----Original Message-----
From: wra...@li...
[mailto:wra...@li...] On Behalf Of Leif
Mortenson
Sent: Wednesday, December 14, 2005 8:27 AM
To: wra...@li...
Subject: Re: [Wrapper-user] Wrapper doesn't call stop() during machine
restart on Fedora
Donatas,
Thanks for all the info. I made some changes to the script so it
should now work for
you. Could you please give it a try and confirm that this new script
works on your
system without any problems?
Cheers,
Leif
Donatas Ciuksys wrote:
> Leif,
>
> These are some scripts that I found on my Fedora Core 4 machine. All of
them
> do create lock files in /var/lock/subsys/.
>
> Greetings,
> Donatas
>
|