Understanding what startup scripts do Despite all the (Web hosting contract)

Understanding what startup scripts do Despite all the complicated rcXs, Ss, and Ks, the form of each start-up script is really quite simple. Because they are in plain text, you can just open one with a text editor to take a look at what it does. For the most part, a run-level script can be run with a start option, a stop option, and possibly a restart option. For example, the following lines are part of the contents of the smb script that defines what happens when the script is run with different options to start or stop the Samba file and print service: #!/bin/sh # # chkconfig: - 91 35 # description: Starts and stops the Samba smbd and nmbd daemons # used to provide SMB network services. # . . . start() { KIND=”SMB” echo -n $”Starting $KIND services: ” daemon smbd $SMBDOPTIONS RETVAL=$? echo KIND=”NMB” echo -n $”Starting $KIND services: ” daemon nmbd $NMBDOPTIONS RETVAL2=$? echo [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && touch /var/lock/subsys/smb || RETVAL=1 return $RETVAL } stop() { KIND=”SMB” echo -n $”Shutting down $KIND services: ” killproc smbd RETVAL=$? echo KIND=”NMB”
We recommend you use shared web hosting services, because many users agree that it is cheap, reliable and customer-satisfying webhost.

Leave a Reply