Solved

Deamons, Looking for which script or what files starts the deamons?

Posted on 2004-09-27
5
365 Views
Last Modified: 2013-12-27
Solaris 5.7, I have Check Point FW1 on this server and I would like to prevent it from starting automatically when the server is rebooted?  I'm looking for the file or script that starts the deamons at boot time.
0
Comment
Question by:mobot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
5 Comments
 
LVL 34

Expert Comment

by:PsiCop
ID: 12164120
Most daemon start/stop scripts are found in /etc/init.d
0
 
LVL 34

Expert Comment

by:PsiCop
ID: 12164208
However, boot-time control is handled in the /etc/rcX.d directory structures. As Solaris moves between Run Levels (0 to 6, plus S), it looks in those various subdirs (/etc/rc0.d, /etc/rc1.d, and so forth) for scripts to execute.

Scripts with the first letter "S" at executed on startup (as the system is coming up to a higher Run Level), scripts with the first letter "K" are executed on shutdown (as the system goes to a lower Run Level). The 2 digits give a rough order in which they are executed, but there is no way to absolutely guarantee that S40something will definitely be executed and completed prior to S80somethingelse.

And actually, for the most part, the contents of /etc/rcX.d are just hard links to the corresponding files in /etc/init.d. So /etc/rc2.d/S40sendmail (or whatever it is) is just a hard link to /etc/init.d/sendmail, which is the actual script. Solaris, when it is coming up, finds that script and calls it with the parameter "start". If it is going down, and it finds a "K40sendmail", then it calls that script with a parameter "stop".

Note that the "S" and "K" are case-sensitive. "s40sendmail" will be ignored.

S80-S99 (and K80-K99) are generally reserved for 3rd party and user apps. So, most likely, there is in CheckPoint script in /etc/init.d, and links to it in either /etc/rc2.d or /etc/rc3.d, probably looking something like "S99checkpoint" or whatever the install names it. Probably in /etc/rc1.d or /etc/rc2.d there is a similar file (e.g. "K99checkpoint).
0
 
LVL 34

Expert Comment

by:PsiCop
ID: 12164269
Solaris Run Levels determine, generally, the services available on the machine.

The "normal" Run Level is 3. At this Run Level, all services should be started. Run Level S is the single-user state, also called the Adminstrative State. 0 is power-off. And so on. You can see more in the Sun online docs for Solaris 7, specifically the Administration Guide's section on Run Levels, at http://docs.sun.com/db/doc/805-3727/6j3ht4dfs?a=view
0
 
LVL 3

Accepted Solution

by:
cagri earned 125 total points
ID: 12166867
Ok here is some preliminary information, and the CP specific info;

The best practice for running daemons is to create a script (preferably one who accepts start/stop keywords as parameter and do the required action) and to put this scripts under /etc/init.d . If you would like to see a simple example, /etc/init.d/cron would be a nice one, this one start/stops unix cron daemon. Also you may keep in mind that most of the daemons can be started/stopped manually using this scripts, like

/etc/init.d/cron stop
/etc/init.d/cron start

Ok, to properly start/stop these daemons during boot or shutdown processes, those scripts are softlinked under the directory sturcute, as noted by other friends, like /etc/rcX.d where X stands for the run level. Although this is the best practice, some vendors (and some system admins) put those scripts directly under /etc/rcX.d structure which must be avoided.

As I am usign CP FW1 FP1, the file in my case is /etc/init.d/Scpboot and it is link is /etc/rc3.d/S99cpboot
Yes, you are right, the both files have different names, bad practice, anyhow...

to temporarily prevent CP from booting when systems comes up, simply rename the "link" (not the script itself) to a version of it that is starting with lower case (again a best practice, otherwise you may move the file etc, not special meaning with lower case, it simply does not recognized)

mv /etc/rc3.d/S99cpboot /etc/rc3.d/s99cpboot

Done !
0
 
LVL 34

Expert Comment

by:PsiCop
ID: 12227259
Hmmm....I thot I'd said all that.

mobot, I'd appreciate knowing what was deficient about my answer.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question