source: general/sysutils/fcron.xml@ 93caa46

10.0 10.1 11.0 9.0 9.1 ken/refactor-virt lazarus qt5new trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 93caa46 was 93caa46, checked in by Douglas R. Reno <renodr@…>, 2 years ago

Typo fix in aspell
giflib: Fix the build by removing a duplicate instruction pertaining to static library removal,

which is now handled by the Makefile

fcron (systemd): Fix the systemd unit to silence warnings about the incorrect PID file being used.
systemd: Adapt to libseccomp-2.4.1, disable GnuTLS support and prefer OpenSSL due to API breakage,

and fix the systemd-networkd problem with Linux 5.2+ as well as with RDRAND on AMD CPUs.

KF5: external dependency URL fix.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@21912 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 14.8 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY fcron-download-http "http://fcron.free.fr/archives/fcron-&fcron-version;.src.tar.gz">
8 <!ENTITY fcron-download-ftp " ">
9<!-- <!ENTITY fcron-download-ftp "ftp://ftp.seul.org/pub/fcron/fcron-&fcron-version;.src.tar.gz">-->
10 <!ENTITY fcron-md5sum "bd4996e941a40327d11efc5e3fd1f839">
11 <!ENTITY fcron-size "587 KB">
12 <!ENTITY fcron-buildsize "5.1 MB">
13 <!ENTITY fcron-time "0.1 SBU">
14]>
15
16<sect1 id="fcron" xreflabel="Fcron-&fcron-version;">
17 <?dbhtml filename="fcron.html"?>
18
19 <sect1info>
20 <othername>$LastChangedBy$</othername>
21 <date>$Date$</date>
22 </sect1info>
23
24 <title>Fcron-&fcron-version;</title>
25
26 <indexterm zone="fcron">
27 <primary sortas="a-Fcron">Fcron</primary>
28 </indexterm>
29
30 <sect2 role="package">
31 <title>Introduction to Fcron</title>
32
33 <para>The <application>Fcron</application> package contains a periodical
34 command scheduler which aims at replacing <application>Vixie
35 Cron</application>.</para>
36
37 &lfs84_checked;
38
39 <bridgehead renderas="sect3">Package Information</bridgehead>
40 <itemizedlist spacing="compact">
41 <listitem>
42 <para>Download (HTTP): <ulink url="&fcron-download-http;"/></para>
43 </listitem>
44 <listitem>
45 <para>Download (FTP): <ulink url="&fcron-download-ftp;"/></para>
46 </listitem>
47 <listitem>
48 <para>Download MD5 sum: &fcron-md5sum;</para>
49 </listitem>
50 <listitem>
51 <para>Download size: &fcron-size;</para>
52 </listitem>
53 <listitem>
54 <para>Estimated disk space required: &fcron-buildsize;</para>
55 </listitem>
56 <listitem>
57 <para>Estimated build time: &fcron-time;</para>
58 </listitem>
59 </itemizedlist>
60<!--
61 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
62 <itemizedlist spacing="compact">
63 <listitem>
64 <para>
65 Required patch:
66 <ulink url="&patch-root;/fcron-&fcron-version;-sendmail_upstream-1.patch"/>
67 </para>
68 </listitem>
69 </itemizedlist>
70-->
71 <bridgehead renderas="sect3">Fcron Dependencies</bridgehead>
72
73 <bridgehead renderas="sect4">Optional</bridgehead>
74 <para role="optional">An <xref linkend="server-mail"/>,
75 <ulink url="../postlfs/editors.html">text editor</ulink> (default is
76 <command>vi</command> from the <xref linkend="vim"/> package),
77 <xref linkend="linux-pam"/>, and
78 <xref linkend="docbook-utils"/>
79 </para>
80
81 <para condition="html" role="usernotes">User Notes:
82 <ulink url="&blfs-wiki;/fcron"/></para>
83
84 </sect2>
85
86 <sect2 role="installation">
87 <title>Installation of Fcron</title>
88
89 <para id="fcron-syslog" revision="sysv"><application>Fcron</application>
90 uses the cron facility of <command>syslog</command> to log all messages.
91 Since LFS does not set up this facility in
92 <filename>/etc/syslog.conf</filename>, it needs to be done prior to
93 installing <application>Fcron</application>. This command will append the
94 necessary line to the current <filename>/etc/syslog.conf</filename>
95 (perform as the <systemitem class='username'>root</systemitem> user):</para>
96
97 <indexterm zone="fcron fcron-syslog" revision="sysv">
98 <primary sortas="e-etc-syslog.conf">/etc/syslog.conf</primary>
99 </indexterm>
100
101<screen role="root" revision="sysv"><userinput>cat &gt;&gt; /etc/syslog.conf &lt;&lt; "EOF"
102<literal># Begin fcron addition to /etc/syslog.conf
103
104cron.* -/var/log/cron.log
105
106# End fcron addition</literal>
107EOF</userinput></screen>
108
109 <para revision="sysv">The configuration file has been modified, so reloading
110 the <command>sysklogd</command> daemon will activate the changes (again as
111 the <systemitem class='username'>root</systemitem> user).</para>
112
113<screen role="root" revision="sysv"><userinput>/etc/rc.d/init.d/sysklogd reload</userinput></screen>
114
115 <para>For security reasons, an unprivileged user and group for
116 <application>Fcron</application> should be created (perform as the
117 <systemitem class='username'>root</systemitem> user):</para>
118
119<screen role="root"><userinput>groupadd -g 22 fcron &amp;&amp;
120useradd -d /dev/null -c "Fcron User" -g fcron -s /bin/false -u 22 fcron</userinput></screen>
121
122 <para>Install <application>Fcron</application> by running the following
123 commands:</para>
124
125<screen revision="sysv"><userinput>./configure --prefix=/usr \
126 --sysconfdir=/etc \
127 --localstatedir=/var \
128 --without-sendmail \
129 --with-boot-install=no \
130 --with-systemdsystemunitdir=no &amp;&amp;
131make</userinput></screen>
132
133<screen revision="systemd"><userinput>./configure --prefix=/usr \
134 --sysconfdir=/etc \
135 --localstatedir=/var \
136 --without-sendmail \
137 --with-boot-install=no &amp;&amp;
138make</userinput></screen>
139
140 <para>This package does not come with a test suite.</para>
141
142 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
143
144<screen role="root"><userinput>make install</userinput></screen>
145
146 <para revision="systemd">Finally, fix a big in the systemd unit:</para>
147
148<screen revision="systemd" role="root"><userinput>sed -i 's:/var/run/fcron.pid:/run/fcron.pid:' \
149 /lib/systemd/system/fcron.service</userinput></screen>
150
151 <para>DESTDIR install must be done as <systemitem class="username">root</systemitem> user.</para>
152
153 </sect2>
154
155 <sect2 role="commands">
156 <title>Command Explanations</title>
157<!--
158 <para><command>autoconf</command>: This command is required to rebuild
159 <filename>configure</filename> using the fixed input file.</para>-->
160
161 <para><parameter>--without-sendmail</parameter>: By default,
162 <application>Fcron</application> will attempt to use the
163 <command>sendmail</command> command from an <xref linkend="server-mail"/>
164 package to email you the results of the <command>fcron</command> script.
165 This switch is used to disable default email notification. Omit the switch
166 to enable the default. Alternatively, you can use the
167 <option>--with-sendmail=<replaceable>&lt;/path/to/MTA
168 command&gt;</replaceable></option> to use a different mailer command.</para>
169
170 <para><parameter>--with-boot-install=no</parameter>: This prevents
171 installation of the bootscript included with the package.</para>
172
173 <para revision="sysv"><parameter>--with-systemdsystemunitdir=no</parameter>:
174 This prevents building the <application>systemd</application> units, which
175 are not needed for a <application>SYS V</application> system.</para>
176
177 <para><option>--with-editor=<replaceable>&lt;/path/to/editor&gt;</replaceable></option>:
178 This switch allows you to set the default text editor.</para>
179
180 <para><option>--with-dsssl-dir=<replaceable>&lt;/path/to/dsssl-stylesheets&gt;</replaceable></option>:
181 May be used if you have <xref linkend="docbook-utils"/> installed.
182 Currently, the dsssl stylesheets are located at
183 <filename class="directory">/usr/share/sgml/docbook/dsssl-stylesheets-1.79</filename>.</para>
184
185 </sect2>
186
187 <sect2 role="configuration">
188 <title>Configuring Fcron</title>
189
190 <sect3 id="fcron-config">
191 <title>Config Files</title>
192
193 <para><filename>/etc/fcron.conf</filename>,
194 <filename>/etc/fcron.allow</filename>, and
195 <filename>/etc/fcron.deny</filename></para>
196
197 <indexterm zone="fcron fcron-config">
198 <primary sortas="e-etc-fcron.conf">/etc/fcron.conf</primary>
199 </indexterm>
200
201 <indexterm zone="fcron fcron-config">
202 <primary sortas="e-etc-fcron.allow">/etc/fcron.allow</primary>
203 </indexterm>
204
205 <indexterm zone="fcron fcron-config">
206 <primary sortas="e-etc-fcron.deny">/etc/fcron.deny</primary>
207 </indexterm>
208
209 </sect3>
210
211 <sect3>
212 <title>Configuration Information</title>
213
214 <para>There are no required changes in any of the config files.
215 Configuration information can be found in the man page for
216 <filename>fcron.conf</filename>.</para>
217
218 <para><command>fcron</command> scripts are written using
219 <command>fcrontab</command>. Refer to the <command>fcrontab</command> man
220 page for proper parameters to address your situation.</para>
221
222 <para id="fcron-pam">If <application>Linux-PAM</application>
223 is installed, two PAM configuration files are installed in
224 <filename class='directory'>/etc/pam.d</filename>. Alternatively if
225 <filename class='directory'>/etc/pam.d</filename> is not used, the
226 installation will append two configuration sections to the existing
227 <filename>/etc/pam.conf</filename> file. You should ensure the files match
228 your preferences. Modify them as required to suit your needs.</para>
229
230 <indexterm zone="fcron fcron-pam">
231 <primary sortas="e-etc-pam.d">/etc/pam.d/*</primary>
232 </indexterm>
233
234 <indexterm zone="fcron fcron-pam">
235 <primary sortas="e-etc-pam.conf">/etc/pam.conf</primary>
236 </indexterm>
237
238 <bridgehead renderas="sect4">Periodic Jobs</bridgehead>
239
240 <para>
241 If you would like to setup a periodic hierarchy for the root user,
242 first issue the following commands (as the
243 <systemitem class="username">root</systemitem> user to create the
244 <filename>/usr/bin/run-parts</filename> script:
245 </para>
246
247<screen role="root"><userinput>cat &gt; /usr/bin/run-parts &lt;&lt; "EOF" &amp;&amp;
248<literal>#!/bin/sh
249# run-parts: Runs all the scripts found in a directory.
250# from Slackware, by Patrick J. Volkerding with ideas borrowed
251# from the Red Hat and Debian versions of this utility.
252
253# keep going when something fails
254set +e
255
256if [ $# -lt 1 ]; then
257 echo "Usage: run-parts &lt;directory&gt;"
258 exit 1
259fi
260
261if [ ! -d $1 ]; then
262 echo "Not a directory: $1"
263 echo "Usage: run-parts &lt;directory&gt;"
264 exit 1
265fi
266
267# There are several types of files that we would like to
268# ignore automatically, as they are likely to be backups
269# of other scripts:
270IGNORE_SUFFIXES="~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp"
271
272# Main loop:
273for SCRIPT in $1/* ; do
274 # If this is not a regular file, skip it:
275 if [ ! -f $SCRIPT ]; then
276 continue
277 fi
278 # Determine if this file should be skipped by suffix:
279 SKIP=false
280 for SUFFIX in $IGNORE_SUFFIXES ; do
281 if [ ! "$(basename $SCRIPT $SUFFIX)" = "$(basename $SCRIPT)" ]; then
282 SKIP=true
283 break
284 fi
285 done
286 if [ "$SKIP" = "true" ]; then
287 continue
288 fi
289 # If we've made it this far, then run the script if it's executable:
290 if [ -x $SCRIPT ]; then
291 $SCRIPT || echo "$SCRIPT failed."
292 fi
293done
294
295exit 0</literal>
296EOF
297chmod -v 755 /usr/bin/run-parts</userinput></screen>
298
299 <para>
300 Next, create the directory layout for the periodic jobs (again as the
301 <systemitem class="username">root</systemitem> user):
302 </para>
303
304<screen role="root"><userinput>install -vdm754 /etc/cron.{hourly,daily,weekly,monthly}</userinput></screen>
305
306 <para>
307 Finally, add the <command>run-parts</command> to the system fcrontab
308 (while still the <systemitem class="username">root</systemitem> user):
309 </para>
310
311<screen role="root"><userinput>cat &gt; /var/spool/fcron/systab.orig &lt;&lt; "EOF"
312<literal>&amp;bootrun 01 * * * * root run-parts /etc/cron.hourly
313&amp;bootrun 02 4 * * * root run-parts /etc/cron.daily
314&amp;bootrun 22 4 * * 0 root run-parts /etc/cron.weekly
315&amp;bootrun 42 4 1 * * root run-parts /etc/cron.monthly</literal>
316EOF</userinput></screen>
317
318 </sect3>
319
320 <sect3 id="fcron-init">
321 <title><phrase revision="sysv">Boot Script</phrase>
322 <phrase revision="systemd">Systemd Unit</phrase></title>
323
324 <para revision="sysv">Install the
325 <filename>/etc/rc.d/init.d/fcron</filename> init script from the
326 <xref linkend="bootscripts"/> package.</para>
327
328 <para revision="systemd">Enable <application>fcron</application> to start
329 at boot using the previously installed systemd unit.</para>
330
331 <indexterm zone="fcron fcron-init">
332 <primary sortas="f-fcron">fcron</primary>
333 </indexterm>
334
335<screen role="root" revision="sysv"><userinput>make install-fcron</userinput></screen>
336
337<screen role="root" revision="systemd"><userinput>systemctl enable fcron</userinput></screen>
338
339 <para>Finally, again as the <systemitem class="username">root</systemitem>
340 user, start fcron and generate the
341 <filename>/var/spool/fcron/systab</filename> file:</para>
342
343<screen role="root" revision="sysv"><userinput>/etc/rc.d/init.d/fcron start &amp;&amp;
344fcrontab -z -u systab</userinput></screen>
345
346<screen role="root" revision="systemd"><userinput>systemctl start fcron &amp;&amp;
347fcrontab -z -u systab</userinput></screen>
348 </sect3>
349
350 </sect2>
351
352 <sect2 role="content">
353 <title>Contents</title>
354
355 <segmentedlist>
356 <segtitle>Installed Programs</segtitle>
357 <segtitle>Installed Libraries</segtitle>
358 <segtitle>Installed Directories</segtitle>
359
360 <seglistitem>
361 <seg>fcron, fcrondyn, fcronsighup, and fcrontab</seg>
362 <seg>None</seg>
363 <seg>/usr/share/doc/fcron-&fcron-version; and /var/spool/fcron</seg>
364 </seglistitem>
365 </segmentedlist>
366
367 <variablelist>
368 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
369 <?dbfo list-presentation="list"?>
370 <?dbhtml list-presentation="table"?>
371
372 <varlistentry id="fcron-prog">
373 <term><command>fcron</command></term>
374 <listitem>
375 <para>is the scheduling daemon.</para>
376 <indexterm zone="fcron fcron-prog">
377 <primary sortas="b-fcron">fcron</primary>
378 </indexterm>
379 </listitem>
380 </varlistentry>
381
382 <varlistentry id="fcrondyn">
383 <term><command>fcrondyn</command></term>
384 <listitem>
385 <para>is a user tool intended to interact with a running
386 <command>fcron</command> daemon.</para>
387 <indexterm zone="fcron fcrondyn">
388 <primary sortas="b-fcrondyn">fcrondyn</primary>
389 </indexterm>
390 </listitem>
391 </varlistentry>
392
393 <varlistentry id="fcronsighup">
394 <term><command>fcronsighup</command></term>
395 <listitem>
396 <para>instructs <command>fcron</command> to reread the
397 <application>Fcron</application> tables.</para>
398 <indexterm zone="fcron fcronsighup">
399 <primary sortas="b-fcronsighup">fcronsighup</primary>
400 </indexterm>
401 </listitem>
402 </varlistentry>
403
404 <varlistentry id="fcrontab">
405 <term><command>fcrontab</command></term>
406 <listitem>
407 <para>is a program used to install, edit, list and remove the
408 tables used by <command>fcron</command>.</para>
409 <indexterm zone="fcron fcrontab">
410 <primary sortas="b-fcrontab">fcrontab</primary>
411 </indexterm>
412 </listitem>
413 </varlistentry>
414
415 </variablelist>
416
417 </sect2>
418
419</sect1>
Note: See TracBrowser for help on using the repository browser.