Kbase 18751: How Manage /etc/rc in Unix to Start/Stop Applications.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  05/06/2001 |
|
SUMMARY:
This Knowledge Base entry gives a brief explanation of how to stop and start one application under UNIX without need to stop the computer.
SOLUTION:
The examples that follow are valid on SCO platforms. Other platforms
may have different structures but the same concept applies.
-- The /etc/inittab is the table used for UNIX to boot the system.
If you display this file, you can see:
r0:056:wait:/etc/rc0 1> /dev/console 2>&1 </dev/console
r1:1:wait:/etc/rc1 1> /dev/console 2>&1 </dev/console
r2:2:wait:/etc/rc2 1> /dev/console 2>&1 </dev/console
r3:3:wait:/etc/rc3 1> /dev/console 2>&1 </dev/console
sd:0:wait:/etc/uadmin 2 0 >/dev/console 2>&1 </dev/console
fw:5:wait:/etc/uadmin 2 2 >/dev/console 2>&1 </dev/console
rb:6:wait:/etc/uadmin 2 1 >/dev/console 2>&1 </dev/console
-- If you want to stop/start one application, for example lp, tcp, nfs, oracle, X25, etc, you can follow this procedure:
Example:
Stop lp services:
login root
cd etc/rc2.d
ls -lp
/Unix/5.0.0Cl/etc/rc2.d/S00VDISK
lrwxrwxrwx 1 root root 43 Oct 29 1996 S25pm
-rw-r--r-- 1 root sys 15 Apr 10 1996 S35dlpi
lrwxrwxrwx 1 root root 45 Oct 29 1996 S60sync
lrwxrwxrwx 1 root root 43 Oct 29 1996 S80lp
lrwxrwxrwx 1 root root 34 Oct 29 1996 S85nis
lrwxrwxrwx 1 root root 34 Oct 29 1996 S85tcp
lrWxrwxrwx 1 root root 53 Oct 29 1996 S90ora
-- To stop the service, execute:
# sh S80lp stop
Print services stopped.
-- To re-start the service:
# sh S80lp start
Print services started.