cancel
Showing results for 
Search instead for 
Did you mean: 

rc3.d shell

 
Highlighted
New Member

rc3.d shell

Hello
I have created startup shell (S99Start) in /sbin/rc3.d.
This shell simply calls another shell like below.
sh -c "$AGENTWORKS_DIR/CACustomise/uni_start.sh $1" > /dev/null 2>&1

exit 0

The called shell (uni_start.sh) is always terminated whenever rc3.d shell is finished.

Is this working as design?
And how can I avoid it?
(I can only think of nohup currently)

Thanks
3 REPLIES 3
Highlighted
Acclaimed Contributor

Re: rc3.d shell

sh -c "$AGENTWORKS_DIR/CACustomise/uni_start.sh $1" > /dev/null 2>&1

Why are you doing "sh -c"? Why not just invoke the command:
$AGENTWORKS_DIR/CACustomise/uni_start.sh $1 ...

>The called shell (uni_start.sh) is always terminated whenever rc3.d shell is finished.

I assume you put uni_start.sh in the background?

>(I can only think of nohup currently)

There is that or you can demonize your process.
http://www.ddj.com/architect/184404033
Highlighted
Exalted Contributor

Re: rc3.d shell

Shalom,

Suggest:
$AGENTWORKS_DIR/CACustomise/uni_start.sh $1"

Become

${AGENTWORKS_DIR}/CACustomise/uni_start.sh ${1}"

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Highlighted
Honored Contributor

Re: rc3.d shell

Actually, if coded as above (not nohup, no &), the calling shell (S99....) is waiting for the called shell (uni_start.sh) to finish before it procedes.

my guess is its working as you want to, even tho the "sh -c" is superfluous.

You would need to examine uni_start.sh to see what it starts and if it/they are all running.

fwiw: start / stop scripts should be S(or K) followed by 3 digits, with the numbers adding to 1000 so the correct start / stop order is preserved