Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reboot without running startup script 1

Status
Not open for further replies.

hok1man

Technical User
Feb 16, 2008
102
Hi guys,

just wondering which files do we need to be commented out so once we reboot, the startup script is not running?

Thanks guys,
 
I presume you mean one specific startup script? If so, go to the relevant runlevel directory, say /etc/rc3.d, and rename the script from SNNxxxxx[b/] to sNNxxxxx (i.e. change the S to lowercase). That will prevent it from being run.

If you disable all startup scripts you probably will not end up with a usable system.

Annihilannic.
 
Which *nix? Anni's solution will be fine except that some varieties (AIX for example) use things like /etc/inittab to read on startup - commenting the entry out of that file will stop the script from running in that event. I believe the variations of Linux also have differing ways of specifying startup scripts.

I want to be good, is that not enough?
 
My personal answer is to edit the startup script to look for a 'no_run' flag. e.g.
Code:
#!/bin/ksh
#Abort if no run flag set
[[ -f /tmp/no_run ]] && exit
We have a system which under normal circumstances starts ~50 Oracle databases plus lots of other things. When we're doing maintenance on it we may need a quick reboot and this saves lots of trouble

On the internet no one knows you're a dog

Columb Healy
 
init s

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks guys,

I believe there's some one configuration files/way that we can commented out...
like in windows there is like msconfig.sys

what about in linux/unix solaris 10?
do they just dump reading the list of files in directory?
 
Yes, that's basically what they do. During the startup phase the scripts that match S* are executed in the same order as they would appear in ls.

Also, since you are using Solaris 10, many services are controlled by the SMF ("Service Management Framework" I think). You would turn those on and off using the svcadm enable and svcadm disable commands.

Annihilannic.
 
does the svcadm work if we want to disable some scripts only?

can you pls show me the sample of this?

Thanks man,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top