The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > Linux
.
google unix.com



Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script errors out only when its executed via job mrx1350 Shell Programming and Scripting 6 03-26-2009 01:50 PM
How to know who executed a script? on9west Shell Programming and Scripting 2 07-28-2008 05:52 AM
AIX server freezes on bootup srzaman1 AIX 1 03-21-2007 10:42 PM
Unix shell script couldn't be executed. Pls help! duke0001 Shell Programming and Scripting 8 09-14-2006 11:15 PM
bootup script vascobrito UNIX for Advanced & Expert Users 7 01-09-2004 07:34 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-12-2009
hemangjani hemangjani is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 73
Exclamation 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 (permalink)  
Old 08-12-2009
Padow Padow is offline
Registered User
  
 

Join Date: Dec 2008
Location: Maryland
Posts: 178
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.
  #3 (permalink)  
Old 08-12-2009
hemangjani hemangjani is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 73
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 (permalink)  
Old 08-12-2009
mark54g mark54g is offline
Registered User
  
 

Join Date: May 2008
Posts: 363
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 (permalink)  
Old 08-12-2009
methyl methyl is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 1,163
In "man rc" there should be reference to where "rc" puts its log (often /etc/rc.log).
  #6 (permalink)  
Old 08-12-2009
Padow Padow is offline
Registered User
  
 

Join Date: Dec 2008
Location: Maryland
Posts: 178
yeah, just add

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

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:18 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0