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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.