LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 06-13-2008, 06:06 AM   #1
vikramtheking
LQ Newbie
 
Registered: Jun 2008
Posts: 2

Rep: Reputation: 0
Startup scripts not working


I have a tomcat startup script registered as a softlink /etc/rc3.d. It links to a script in /etc/init.d . The format of the script is,

case $1 in
'start')
/bin/su uqq12254 -c "/search/apps/jakarta-tomcat-5.0.25-tng/bin/startup.sh"
;;
'stop')
/bin/su uqq12254 -c "/search/apps/jakarta-tomcat-5.0.25-tng/bin/shutdown.sh"
;;
esac

The user uqq12254 is definitely existing in the system. A point is, when I run the script manually, it prompts for the password ( this is because of SU I think.. but what I felt it SU shouldnt prompt when the system reboots as root ). Once I give the password, everything works alright. The trouble now is during reboots nothing seems to have started up. There is no indication in the tomcat logs to even say there was a request to start up. So, I feel my startup scripts are not working. Please help me find out where I went wrong.
 
Old 06-13-2008, 06:21 AM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 68
You could add
Code:
 
set >> /var/log/tomcat-startup.log
echo "$*" >> /var/log/tomcat-startup.log
in the beginning of the script to see if it is run at all. Also, are booting into initlevel 3 or 5?
 
Old 06-13-2008, 06:28 AM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint, Tribblix
Posts: 9,754

Rep: Reputation: 457Reputation: 457Reputation: 457Reputation: 457Reputation: 457
Init level 5 is shutdown under Solaris.

What is the Solaris release you are running ?

What is the link name in /etc/rc3.d ?
 
Old 06-13-2008, 06:41 AM   #4
vikramtheking
LQ Newbie
 
Registered: Jun 2008
Posts: 2

Original Poster
Rep: Reputation: 0
The reboot I m talking about is a hard reboot... The scripts are called,

"S90esearch_tng_tomcat" linking to -> /etc/init.d/esearch_tng_tomcat*

uname gives,
ussunk3:/etc/rc3.d> uname -a
SunOS ussunk3 5.8 Generic_117350-54 sun4u sparc SUNW,Ultra-4
 
Old 06-13-2008, 09:02 AM   #5
rajwinder
LQ Newbie
 
Registered: Jun 2008
Posts: 21

Rep: Reputation: 15
one thing .. as per the script it will be "Expecting" some arguments when u will start it ( start or stop ) . are u passing that in the startup ?
 
Old 06-14-2008, 06:04 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint, Tribblix
Posts: 9,754

Rep: Reputation: 457Reputation: 457Reputation: 457Reputation: 457Reputation: 457
There is no need to pass one. Init scripts are getting an argument, "start" if the filename first letter is "S" and "stop" if it is "K".

Did you add the logging lines as raskin suggested ? Any result ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Startup Scripts metallica1973 Linux - Software 2 04-21-2008 11:40 PM
Startup - own scripts Filipe Linux - Newbie 7 07-11-2006 12:56 PM
Mandriva startup scripts (need to add something to startup before X starts) thunderweasel Mandriva 3 01-01-2006 01:55 AM
Startup Scripts?? jimbo-62 Debian 5 07-10-2005 11:23 AM
Startup scripts MadnessASAP Linux - Software 2 12-15-2004 08:09 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 07:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration