Operating System - Linux
1827708 Members
2551 Online
109967 Solutions
New Discussion

Re: Can't get rc scripts to start process automatically

 
Jackie Baron
Frequent Advisor

Can't get rc scripts to start process automatically

I have recently built a Debian 3.1 box and after much pain I managed to get the OVO agent installed on it. I needed to tweak a lot of stuff for dce/rpc etc. Now, when I execute the script to start rpcd (/opt/dce/etc/rc.dcerpcd start) the processes come up perfectly and then I can start the OVO agent (opdagt -start). What I can't seem to get working is getting this to start up automatically at boot time. I have this rc.dcerpcd set up as S60dcerpcd (a sym link to /etc/init/rc.dcerpcd) in the rc3.d directory but it just doesn't work. It works, no problem from the command line once the box is up. I can execute /opt/dce/etc/rc.dceprcd start, or /etc/init.d/rc.dcerpcd start or even /etc/rc3.d/S60dcerpcd start and it come up perfect. Just not at startup.

Thanks!~
If you think you're too small to make a difference you've never been to bed with a mosquito!
6 REPLIES 6
Stuart Browne
Honored Contributor

Re: Can't get rc scripts to start process automatically

What shell is the start-up script written to use? (i.e. what's the #! point to?).

It's sounding like it's not '/bin/sh'.

When the system starts, 'rc' uses 'sh' (directly) to execute each of the start-up routines, this means that if the startup script is *not* written to use '#!/bin/sh', then you'll get precisely what you're seeing.

If it must be written in that shell language, then write a small wrapper for your S60 that simply "/opt/dce/etc/rc.dceprcd $@".

If it *is* written to use '/bin/sh', then attach a copy of that routine here and we'll have a look over it.
One long-haired git at your service...
Gopi Sekar
Honored Contributor

Re: Can't get rc scripts to start process automatically


few more reasons for why it could fail:

which init level are you in? If you are in level 5 then the level 3 script will not get executed, you have to do linking of this in rc5.d also

at system startup there will not be any PATH variable mentioned. So if your script is calling the binary just like opdagt-start (without explicitly stating the path) then it will not run.

Attach your script and let us take a look at it and we may come up with a solution to ur problem.

Regards,
Gopi
Never Never Never Giveup

Re: Can't get rc scripts to start process automatically

Hi!
This is the first I've seen about anyone being able to install an agent on a Debian 3.1 system. I've been spending a lot of sweat and tears on that, without any success.

Jackie: Are you willing to share your expertise in making an agent work with me? Have you succeded in making an https agent work as well?

I haven't even installed without major error messages.

/flix
Bill Thorsteinson
Honored Contributor

Re: Can't get rc scripts to start process automatically

try using update-rc.d to link your
script into the rc*.d directories. It
will link it in all the standard directories.

Try running your script using
/bin/sh -x scriptname
to verifiy that it runs corrrectly under sh.
debian111
Regular Advisor

Re: Can't get rc scripts to start process automatically

try update-rc.d script_name defaults..but you have to copy it in /etc/rc.d/init.d/


but be very carefuly because if your script do firewaling then you may experinece some problems during boot process.

Regards
debian111
Regular Advisor

Re: Can't get rc scripts to start process automatically

copy in /etc/init.d/......Debian system?? not RH.

Regards