Provided by: laptop-mode-tools_1.11-1ubuntu3_all bug


       daemons.conf  -  Configuration  file  for the laptop-mode-tools and the
       laptop_mode control script.


       This manual  page  documents  the  options  that  can  be  set  in  the
       daemons.conf configuration file.  For a description of what laptop mode
       does, see the laptop_mode(8) manpage.


       The syntax is very easy. It is  one  option  per  line.  Lines  can  be
       commented  as  is  normal  in shell scripts, so everything after "#" is
       ignored to end of line.

       The following two types of settings are available in daemons.conf:

       <initscriptname>  It’s  simply  name  of  initscript  from  /etc/init.d
       directory.  All initscripts in daemons.conf will be stoped if laptop is
       supplied from battery and started if laptop is supplied from AC.

       <SIG[signal] processname> Sometimes init scripts for daemons don’t work
       well,  or  daemons  are  in  state,  where  is  not  possible kill them
       correctly. This option gives you possibility send SIGNAL to process  of
       some  certain  name.  Common  commands  as kill and killall for killing
       processes send signal TERM as default.  It is recommended kill  daemons
       by  this  signal  (e.g.  "SIGTERM  exim"  will  send signal TERM to all
       processes named exim) and use other signals only if there’s no  way  to
       kill  daemon  by TERM signal. You can set signal in text form (SIGTERM)
       or as number (SIG15). Read  man  kill  if  you  want  know  more  about


       1)  If  you need kill some daemon by sending specifig signal, make sure
       that <initscriptname> is in config too.  Stoping  daemon  goes  in  two
       steps.  At  first  are daemons quited by initscript. After init scripts
       are  finished,  for  all  SIG*  lines  is  done  control   if   process
       <processname>  exists.  If  process exists, signal [signal] is send for
       all processes of name <processname>. I wrote it, because I  know,  that
       there are daemons, what can be quited correctly by initscript in normal
       conditions, but in some conditions not. As example I can use exim. This
       program  have  correct  init  script  and  in  normal  conditions  quit
       correctly. But there is problem if network  is  unreachable.   Exim  is
       waiting  for  hostname resolution (or it looks so) and in this state is
       frozen, but because there’s no network, there’s nobody, who  gives  him
       answer.   So exim is waiting forever and in this moment is not possible
       tell  him  "exit",  process  is   completely   blocked.   Unfortunately
       situation,  that  you turn on laptop and network is unreachable is very
       often (it’s every time, when you go by bus, or are somewhere  in  "wild
       world"). But this is not reason to delete normal <initscriptname> line.
       Is better have both lines and if init script work correctly, SIGline is
       not used.

       2)  As  I  wrote  higher,  situation, when network is unreachable is on
       laptop often. If you have problem with quiting some daemon,  is  better
       don’t  run  daemon  default  and  run  only  if you realy need it.  For
       example if you are developer of some web applications, is common,  that
       you are testing your work.  And is possible, that you need runing mysql
       for testing. But do you need run mysql all  the  time?   I  know,  that
       there  are  daemons  where  living  without them is hard (I wrote about
       exim, which I use as normal MTA on my laptop), unfortunately exim makes
       most  of disk accesses on my laptop. So exim is example of daemon, what
       I surely want to run from start of my laptop, but it is  daemon,  where
       is  quite  save  kill  him by TERM signal.  Partialy it is because when
       network is unreachable, exim can’t get data, what can be corrupted. But
       mysql  is  example  of  other  extreme. If you don’t finish this daemon
       correctly, is more as possible, that some tables will be corrupted.  So
       ITS NOT SAVE FROM PRINCIPLE!!!  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.  Some daemons can be buggy, or are simply crap what  need  for
       stop  sending  of some special command trough socket and who knows what
       happen if they are killed like this?


       laptop_mode(8) lm-profiler(8) laptop-mode.conf(8) kill(1).


       This  manual  page  was  written  by   Jan   Polacek   (
       Permission  is  granted to copy, distribute and/or modify this document
       under the terms of the GNU General Public License, Version 2 any  later
       version published by the Free Software Foundation.