~tormodvolden/ubuntu/karmic/laptop-mode-tools/dupl-hook

« back to all changes in this revision

Viewing changes to man/daemons.conf.8

  • Committer: Bazaar Package Importer
  • Author(s): Tollef Fog Heen
  • Date: 2006-07-10 13:42:58 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060710134258-p25bl1rnxv021vz0
Tags: 1.31-1ubuntu1
Sync with Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH "DAEMONS.CONF" "8" 
2
 
.SH "NAME" 
3
 
daemons.conf \- Configuration file for the laptop-mode-tools and the  
4
 
\fBlaptop_mode\fR control script. 
5
 
.SH "DESCRIPTION" 
6
 
.PP 
7
 
This manual page documents the options that can be set in the daemons.conf configuration file. 
8
 
For a description of what laptop mode does, see the laptop_mode(8) manpage.
9
 
 
10
 
.SH "SETTINGS" 
11
 
.PP 
12
 
The syntax is very easy. It is one option per line. Lines can be commented as is normal in shell scripts,
13
 
so everything after "#" is ignored to end of line.
14
 
 
15
 
.PP
16
 
The following two types of settings are available in daemons.conf: 
17
 
 
18
 
.B "<initscriptname>"
19
 
It's simply name of initscript from /etc/init.d directory.
20
 
All initscripts in daemons.conf will be stoped if laptop is supplied from battery and started
21
 
if laptop is supplied from AC.
22
 
 
23
 
.B "<SIG[signal] processname>"
24
 
Sometimes init scripts for daemons don't work well, or daemons are in state, where is not
25
 
possible kill them correctly. This option gives you possibility send SIGNAL to process of some
26
 
certain name. Common commands as kill and killall for killing processes send signal TERM as default.
27
 
It is recommended kill daemons by this signal (e.g. "SIGTERM exim" will send signal TERM to all processes named exim) 
28
 
and use other signals only if there's no way to kill daemon by TERM signal. You can set signal in text form (SIGTERM) 
29
 
or as number (SIG15). Read man kill if you want know more about signals.
30
 
 
31
 
.SH "KEEP ON MIND THIS TWO RULES:"
32
 
1) If you need kill some daemon by sending specifig signal, make sure that <initscriptname> is in config too.
33
 
Stoping daemon goes in two steps. At first are daemons quited by initscript. After init scripts are finished,
34
 
for all SIG* lines is done control if process <processname> exists. If process exists, signal [signal] is
35
 
send for all processes of name <processname>. I wrote it, because I know, that there are daemons, what can be quited
36
 
correctly by initscript in normal conditions, but in some conditions not. As example I can use exim. This program
37
 
have correct init script and in normal conditions quit correctly. But there is problem if network is unreachable.
38
 
Exim is waiting for hostname resolution (or it looks so) and in this state is frozen, but because there's no 
39
 
network, there's nobody, who gives him answer. 
40
 
So exim is waiting forever and in this moment is not possible tell him "exit", process is 
41
 
completely blocked. Unfortunately situation, that you turn on laptop and network is unreachable is very often 
42
 
(it's every time, when you go by bus, or are somewhere in "wild world"). But this is not reason to delete normal
43
 
<initscriptname> line. Is better have both lines and if init script work correctly, SIGline is not used.
44
 
.SH ""
45
 
2) As I wrote higher, situation, when network is unreachable is on laptop often. If you have problem
46
 
with quiting some daemon, is better don't run daemon default and run only if you realy need it.
47
 
For example if you are developer of some web applications, is common, that you are testing your work.
48
 
And is possible, that you need runing mysql for testing. But do you need run mysql all the time?
49
 
I know, that there are daemons where living without them is hard (I wrote about exim, which I use as normal
50
 
MTA on my laptop), unfortunately exim makes most of disk accesses on my laptop. So exim is example of daemon,
51
 
what I surely want to run from start of my laptop, but it is daemon, where is quite save kill him by TERM signal.
52
 
Partialy it is because when network is unreachable, exim can't get data, what can be corrupted. But mysql is example
53
 
of other extreme. If you don't finish this daemon correctly, is more as possible, that some tables will be corrupted.
54
 
So
55
 
.B KEEP ON MIND, THAT KILLING DAEMONS BY SENDING SIGNAL IS NOT NORMAL AND IT'S NOT SAVE FROM PRINCIPLE!!!
56
 
Use it only if you are sure, that you can't lost or brake your data. Normaly is save send TERM signal to some process. 
57
 
Some daemons can be buggy, or are simply crap what
58
 
need for stop sending of some special command trough socket and who knows what happen if they are killed like this?
59
 
 
60
 
.SH "SEE ALSO" 
61
 
.PP 
62
 
laptop_mode(8) lm-profiler(8) laptop-mode.conf(8) kill(1).
63
 
.SH "AUTHOR" 
64
 
.PP 
65
 
This manual page was written by Jan Polacek (jerome@ucw.cz).  Permission is 
66
 
granted to copy, distribute and/or modify this document under 
67
 
the terms of the GNU General Public License, Version 2 any  
68
 
later version published by the Free Software Foundation. 
69
 
 
70
 
.\" created by my own hands Sat, 17 Sep 2005 22:21:12 +0200