Chapter 9. The Operating System
71
in the script. If there are more than one daemon to start, the output should look like this:
echo  n "Starting remote file system services:"
echo  n " nfsd"; start stop daemon   start   quiet nfsd
echo  n " mountd"; start stop daemon   start   quiet mountd
echo  n " ugidd"; start stop daemon   start   quiet ugidd
echo "."
This makes it possible for the user to see what is happening and when the final daemon
has been started. Care should be taken in the placement of white spaces: in the example
above the system administrators can easily comment out a line if they don't want to start
a specific daemon, while the displayed message still looks good.
  When a system parameter is being set
If you have to set up different system parameters during the system boot, you should use
this format:
Setting
parameter
to "
value
".
You can use a statement such as the following to get the quotes right:
echo "Setting DNS domainname to \"$domainname\"."
Note that the same symbol (
) is used for the left and right quotation marks. A grave
accent (
`
) is not a quote character; neither is an apostrophe (
'
).
  When a daemon is stopped or restarted
When you stop or restart a daemon, you should issue a message identical to the startup
message, except that
Starting
is replaced with
Stopping
or
Restarting
respec 
tively.
For example, stopping the printer daemon will like like this:
Stopping printer spooler: lpd.
  When something is executed
There are several examples where you have to run a program at system startup or shut 
down to perform a specific task, for example, setting the system's clock using
netdate
or killing all processes when the system shuts down. Your message should look like this:
Doing something very useful...done.
You should print the
done.
immediately after the job has been completed, so that the
user is informed why they have to wait. You can get this behavior by saying
echo  n "Doing something very useful..."
do_something
echo "done."






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

gay web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved