1834163 Members
2869 Online
110064 Solutions
New Discussion

startup script

 
Patrick_129
Advisor

startup script

hi huys,

we wrote a startup sctipts and put in rc2.d but whenever the server reboot.... i will see message like "sleep command not found"... "su command not found" when the sctipt being excuted.

but if i run the script manually, it started fine with no error.

any idea y?

thannks for all help :)
10 REPLIES 10
John Carr_2
Honored Contributor

Re: startup script

please attach the script

:-) John.
Borislav Perkov
Respected Contributor

Re: startup script

Hi,

Maybe you not have whole path of the commands.
Try with that.

Regards
Naveej.K.A
Honored Contributor

Re: startup script

try mentioning the full path in the script

i.e. /usr/bin/sleep
or /usr/bin/su
and it should work

With best wishes
Naveej
practice makes a man perfect!!!
Mark Grant
Honored Contributor

Re: startup script

Is it possible that this script is being run before the filesystems containing "sleep" etc has been mounted?
Never preceed any demonstration with anything more predictive than "watch this"
Robert-Jan Goossens
Honored Contributor

Re: startup script

Hi,

Or replace sleep with /usr/bin/sleep.

Robert-Jan
Patrick_129
Advisor

Re: startup script

I put the script to run last... Eg, S998 startweblogic ... but still the same.

intially the script was written in full path
eg, /usr/bin/sleep i changed it into

eg,
PATH = /usr/bin

sleep 15 /xxx/xxxx/xx

but it still dont work and cause the server to crashed.



Robert-Jan Goossens
Honored Contributor

Re: startup script

Patrick,

Can you attach the script ?

Robert-Jan
Mark Grant
Honored Contributor

Re: startup script

I think it would be helpful if you got your script to do a "env > /tmp/script.log" so that we can see what the environment is when it starts up.

Also, posting the script might be useful to.
Never preceed any demonstration with anything more predictive than "watch this"
Patrick_129
Advisor

Re: startup script

i will post the scipt asap. it with my application team :) thanks guys
Sanjay Kumar Suri
Honored Contributor

Re: startup script

I have following inputs:

1. Give the full path in the script.
2. Check the control variable defined in rc.config.d which is controlling the script.
3. Start & Stop the script defined in init.d manually.
4. Use init command to change the init level to confirm whether the script starts or not.
5. Start sequence S900 and Kill sequence K100 is Ok.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.