Copyright 2010 Lennart Poettering
systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
<listitem><para>Instead of using the
<function>syslog()</function> call to log directly to the
- system logger, a new-style daemon may
+ system syslog service, a new-style daemon may
choose to simply log to STDERR via
<function>fprintf()</function>, which is then forwarded to
syslog by the init system. If log
url="http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html">LSB
Linux Standard Base Core
Specification</ulink>. This method of
- activation is supported ubiquitiously on Linux
+ activation is supported ubiquitously on Linux
init systems, both old-style and new-style
systems. Among other issues SysV init scripts
have the disadvantage of involving shell
operating
system-independent.</para></listitem>
- <listitem><para>Since not all syslog
- implementations are socket-activatable
- yet, it is recommended to place an
- <varname>After=syslog.target</varname>
- dependency in service files for
- daemons that can log to
- syslog. <filename>syslog.target</filename>
- then either pulls in the syslog daemon
- itself or simply the activation
- socket. A <varname>Wants=</varname> or
- even <varname>Requires=</varname>
- dependency should generally not be
- added, since it should be up to the
- administrator whether he wants to
- enable logging or not, and most syslog
- clients work fine if no log daemon is
- running.</para></listitem>
-
<listitem><para>Make sure to include
an <literal>[Install]</literal>
section including installation
machines, and optionally allows their
installation even on machines lacking
systemd. (Modification of this snippet for the
- user unit directory is left as excercise to the
+ user unit directory is left as an exercise for the
reader.)</para>
<para>Additionally, to ensure that
a fragment like the following:</para>
<programlisting>%triggerun -- foobar < 0.47.11-1
-if /sbin/chkconfig foobar ; then
+if /sbin/chkconfig --level 5 foobar ; then
/bin/systemctl --no-reload enable foobar.service foobar.socket >/dev/null 2>&1 || :
fi</programlisting>