Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem getting programs to start on boot

Status
Not open for further replies.

paladin256

Technical User
Apr 16, 2002
189
0
0
US
I am running Solaris 9 Sparc and am having problems getting programs to start on boot. I have created the proper files in rc3.d with symlink to init.d and without the symlink. I can run the file in rc3.d manually and the program will start but if I reboot the server it does not start. Any insight into this would be welcome.

TIA
 
Hello,

if I understood allrigth or you create the script on /etc/init.d and create a link on /etc/rc3.d (which means that the it only start on runlevel 3) or you just create the program on rc3.d;

Try to see if the program you're starting isn't prompting for nothing.

Also try to check permissions and owners

Its a shoot

Best Regards
 
I'm not a Solaris expert, but isn't the default runlevel rc2.d? Isn't that where you should have your S# file?

Also, the simlink must start with a capital "S" else it won't start. IBM Certified Confused - MQSeries
IBM Certified Flabbergasted - AIX 5 pSeries System Administration
 
Run level 3 is the default, and rc3.d is where local applications should really be started. Annihilannic.
 
Any ideas on why they wont auto start but will manualy?
 
It may be due to the different path or other environment settings used at boot time. I believe all of the scripts are run using sh so any ksh or other shell specific scripting might break.

If you could post a sample of the scripts' content it might help. Annihilannic.
 
Here is a sample of the script for apache:

# more S98httpd
#!/bin/sh
# apache start script

case "$1" in
'start')
/usr/local/apache2/bin/apachectl start
;;
'stop')
/usr/local/apache2/bin/apachectl stop
;;
*)
echo "Usage: $0 { start | stop }"
;;
esac
exit 0
 
I can't see anything obviously wrong. Try changing the first line to #!/bin/sh -x and watch the messages on boot.

A colleague of mine always adds the following line to /sbin/rc2 script so you can see exactly when it's running which startup scripts, which may help (line numbers on the left):

[tt]
46 if [ -s ${f} ]
47 then
48 echo "Running ${f} ..."
49 case ${f} in
[/tt] Annihilannic.
 
if it runs manually AND not in boot-procedure
look at the environment
the boot-proc is missing something. -----------
when they don't ask you anymore, where they are come from, and they don't tell you anymore, where they go ... you'r getting older !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top