Using the Run Control Scripts to Stop or Start Services

The advantage of having individual scripts for each run level is that you can run these scripts individually to turn off processes in Solaris without rebooting or changing init states.

For example, you can turn off NFS server functionality by typing /etc/ init.d/nfs.server stop and pressing Enter. After you have changed the system configuration, you can restart the functionality by typing /etc/init.d/ nfs.server start and pressing Enter.

Use the pgrep command to verify whether the service has been stopped or started:

pgrep -f <service> 

The pgrep utility examines the active processes on the system and reports the process IDs of the processes. See Chapter 15, “Managing Processes,” ...

Get Inside Solaris™ 9 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.