You are not logged in  

init scripts on Xen virtual machine

Some services are configured to start in your Xen virtual machine out of the box. The scripts that run on start up are stored in the /etc/init.d/ directory. You can start/stop/restart services with out rebooting your Xen virtual machine by running the script with the argument of start, stop, or restart. For example:

/etc/init.d/scriptname restart
/etc/init.d/scriptname start
/etc/init.d/scriptname stop

Adding a script to run at startup

To make a script run at startup of your Xen virtual machine you need to put the script in /etc/init.d and make sure it will take the start and stop arguements. Once the script is in /etc/init.d you need to tell the system when to run the script. You can use the following command:

chkconfig --level 345 scriptname on

The above command tells the system what runlevel the script needs to be run at. For most scipts the you will want the runlevels of 3, 4, and 5.

for more info on runlevels check out http://en.wikipedia.org/wiki/Runlevel. The runlevel for a script is not something to play with, please know what you are doing before changing the runlevel for scripts.

Stopping a script from running at startup

If you wish to stop a script in the /etc/init.d directory from running on startup you can use the following command:

chkconfig --del scriptname

or

chkconfig --level 0123456 scriptname off

The latter tells the system that for runlevels 0, 1, 2, 3, 4, 5, and 6 (all runlevels possible) the script should be set to off, or to not start. Modified: 2007-07-10 01:36:11





  User login:
  username:
 
  password:
 

 

http://suso.org/docs_parsing.php
© 1997-2008 Suso Technology Services Inc.
101 W. Kirkwood Ave., Bloomington, Indiana
(812) 336-7876(SUSO)