1834339 Members
2245 Online
110066 Solutions
New Discussion

Bypass startup script

 
Lee Huei
Regular Advisor

Bypass startup script

Hi,

Anyone knows any workaround to bypass an application start-up script stored in level 4 ? example i have 5 start-up scripts, script 1 and 2 executed fine but script 3 was not and this failure prevent script 4 and 5 from starting, anyway we can timeout the script 3 failure ?

Please help. Thanks:)
8 REPLIES 8
Lee Huei
Regular Advisor

Re: Bypass startup script

Hi,

This is on hp-ux machine ( hp-ux 11.00). Thanks.
D Block 2
Respected Contributor

Re: Bypass startup script

one method would be to edit the scripts.

one trick is to create a temp file (lock) file in /tmp when the script started sucessful.

change application start-up script (level 3) to create:
/tmp/application.lev3

change application script that starts in the next level, say (level 5). have this script check on if file /tmp/applicaiton.lev3 is present. if present, then continue with script, if NOT-present, exit.

sounds like some coding work..

another method, is to combine all your scripts into one large script.. this might be real easy to maintain.. maybe put all your scripting in a file in Leve6 (user defined services).
Golf is a Good Walk Spoiled, Mark Twain.
Muthukumar_5
Honored Contributor

Re: Bypass startup script

If hp-ux means,

what is the message's get you on /etc/rc.log file. It contains all informations and failures of startup script's

I am not sure that, lower conventional scripts make the next coming scripts not to execute there. Try to check permission ( execution ) of script3 and try to run it as,

set -x ( debugging mode ) on the start of script there.

Before testing it on startup, try to test on shell itself one time with debugging there.

And more, if you are creating startup script, try to put one variable that control's the script to start or not execute on /etc/rc.config.d/scriptname

See other script's contents there.
Easy to suggest when don't know about the problem!
Lee Huei
Regular Advisor

Re: Bypass startup script

Hi,

Thanks for replying. The scripts are application scripts. Is there anything like time-out the failed script so that the subsequent startup script wont be affected?

Thanks:)
KCS_1
Respected Contributor

Re: Bypass startup script

Hi,Mico

for cutting the starting scripts is used to press CTRL+ |(pipe)keys simultaneously.
During a script is waiting for a long time,
I use the keys in my case.




Thanks
Easy going at all.
KCS_1
Respected Contributor

Re: Bypass startup script

Oh..sorry,,

I meant NOT bypass,,just cutting the scripts. ;(
Easy going at all.
Lee Huei
Regular Advisor

Re: Bypass startup script

Thanks. Yeap, i need to know how to bypass.

I know i can terminate the script hung during startup with the ctl+pipe+shift. But this means to terminate the startup.

Muthukumar_5
Honored Contributor

Re: Bypass startup script

To make the timeout on not-running startup scripts, we are not having any specification's there.

But we may manage as,

Make a script which will execute all the correspoding service startup scripts in that.
So that the script has the control to make the startup timeout on ir-responding scripts there.


As like,

/etc/rc4.d/
script4

which will execute the the scripts on that particular level of startup. But IT is good to keep the standard there. It will be executed based on the fileextenstion so that, in the script also maintain the same ordering there.

Check weather the script is made startup, else timeout. This can be done by executing that script in background and collect the pid of that one, and check ps and make not to start after that.

AND MORE, I did not try this. I suggest you to try with a simple script which start's 3 service at first and ... go on.


Easy to suggest when don't know about the problem!