Script under rc3.d not being executed on server bootup


 
Thread Tools Search this Thread
Operating Systems Linux Script under rc3.d not being executed on server bootup
# 1  
Old 08-12-2009
Error Script under rc3.d not being executed on server bootup

Hello all,

I have a script callled 'ABCstartup' setup under /etc/rc.d/init.d

Softlink 'S91ABCstartup' pointing to above script has been created under /etc/rc.d/rc3.d

The script is not being executed when the server restarts.

The script runs successfully via manual execution:
./S91ABCstartup start


any suggestions?
Thanks
# 2  
Old 08-12-2009
Saying it isn't being executed may not be accurate. Have you tried redirecting the output of your script so you can see what is happening?

Just because something works in your shell environment, doesn't mean that it will work in init's or any other environment. Your probably missing an environment variable or you are missing /sbin in the PATH, etc.
Padow
# 3  
Old 08-12-2009
Within the script, I'm starting up an application. The application startup process does log various info.
When the script is manually executed, I do see the log from application startup. But, no log file being created when the server starts.

Is there a way to know if that particular script got triggered during the init?

I know there are other scripts within rc3.d that execute fine.

Thanks
# 4  
Old 08-12-2009
Check your environmental variables. When you execute it via the startup or cron, it does not gain your environment. This is what is most likely tripping you up.
# 5  
Old 08-12-2009
yeah, just add

Code:
echo script ran at `date` > /tmp/script.out

to your script
Padow
# 6  
Old 08-12-2009
In "man rc" there should be reference to where "rc" puts its log (often /etc/rc.log).
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Solaris

When were all scripts on the Solaris server last executed?

Hi All, I am new to this forum and I am hoping someone will be able to help me:) I have inherited a very old Solaris server that has a number of scripts around 500 in total. I need to migrate the scripts to Linux but I would like to know which ones are currently being executed rather... (10 Replies)
Discussion started by: josamy
10 Replies

2. AIX

Automatic Server bootup after power outage?

Hi everyone, We had a power outage few days ago, and I got the servers up and running but I was informed to look into, if there is a way to bring up the servers automatically/defaultly. I was told the windows admin has their server set up where the servers are up automatically if there is a... (11 Replies)
Discussion started by: Adnans2k
11 Replies

3. UNIX for Dummies Questions & Answers

List commands executed on a server

Hi All, how to list all the commands executed by users on a linux server.... I dont have access to others .bash_history. and i am not root user.. Please help.. Thanks in advance.. (6 Replies)
Discussion started by: nanz143
6 Replies

4. AIX

Script not getting executed via cron but executes when executed manually.

Hi Script not getting executed via cron but executes successfully when executed manually. Please assist cbspsap01(appuser) /app/scripts > cat restart.sh #!/bin/ksh cd /app/bin date >>logfile.out echo "Restart has been started....." >>logfile.out date >>logfile.out initfnsw -y restart... (3 Replies)
Discussion started by: samsungsamsung
3 Replies

5. Linux

Script under rc3.d Vs rc.local

Which of the following gets executed first? script under rc3.d Vs script under rc.local I was under impression that rc3.d has higher precedence over rc.local. Somehow it looks like the script under rc.local got executed first than the one under rc3.d. I had to manually start them in order... (7 Replies)
Discussion started by: hemangjani
7 Replies

6. AIX

AIX server freezes on bootup

Issue: AIX server freezes on bootup. Server AIX ver 4.3.3.0 When the AIX server reboots it negotiates NIS. During startup of NFS, customer gets one or more of the following error messages: 0513-056 Timeout waiting for command response. If you specified a foreign host, see the /etc/inittab file... (1 Reply)
Discussion started by: srzaman1
1 Replies

7. UNIX for Advanced & Expert Users

bootup script

Hello there I need to run a script whenever i reboot or startup my HP-UX server. This script adds some routes to the route table, and it start third party aplications like "Star Manager". I thought i could do this simply putting the script in "/sbin/init.d, and a link to the script in... (7 Replies)
Discussion started by: vascobrito
7 Replies
Login or Register to Ask a Question