From: Kris D. <kd...@we...> - 2003-08-25 18:28:39
|
Jeff Powell wrote: > > Is there any way tochange the boot order for services in Webmin? None that I can see; there's a module to manage startup and shutdown tasks generally, and one to manage some aspects of a SysV init system, but nothing to manage where each service starts in a SysV init. > I have > a sendmail milter that is currently starting before sendmail itself so I > need to change it. *scratch head* Why? If you start sendmail first, it will generate error messages in your logs and reject mail until your milter is running. Usually, you want to start a milter before sendmail, or an antivirus daemon before the milter interface, or a database daemon before your webserver. For instance, on my own personal server, I try to make sure that the Clam antivirus daemon is started before the MIMEDefang milter, which is started before sendmail. There are still some bugs in how this happens, (the clamav socket seems to get created by something else before clamav actually starts up) but it means that (in theory) as soon as sendmail is active, it can start processing mail. > I'm new enough to Linux that I can't make any sense > of the boot order mechanism. Which Linux distro? Different distros provide different tools to manage the /etc/rc{0-6}.d symlinks. > I found the option in the Webmin module config to display the boot > order; am I correct in thinking that the Bootup and Shutdown module > displays services in reverse boot order (with the last services started > at the top)? As far as I can tell, it's in alphabetical order. :/ > If I can't change the boot order in Webmin, then that would be a nice > adition to a future version of the module. > And also if I can't do it in Webmin, is there a command-line utility > that I can use to do it? On RedHat, use chkconfig to manage some aspects of SysV init. Note that it relies on data in each program's init script in /etc/init.d. Each initscript has a set of comment lines like so: # chkconfig: 2345 90 60 # description: cron is a standard UNIX program that runs user-specified \ # programs at periodic scheduled times. vixie cron adds a \ # number of features to the basic UNIX cron, including better \ # security and more powerful configuration options. # processname: crond # config: /etc/crontab # pidfile: /var/run/crond.pid The chkconfig: and processname: lines are the only critical ones IIRC. processname allows chkconfig to identify the service (why it can't or doesn't use the script's filename, I'm not certain). The chkconfig: line tells chkconfig that crond is to be started in runlevels 2, 3, 4, and 5, and that it should start at sequence number 90, and stop at sequence number 60. -kgd -- <erno> hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is. |