source: general/sysutils/fcron.xml@ 427b46a

11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 427b46a was 66d551c, checked in by Bruce Dubbs <bdubbs@…>, 3 years ago

Tag a lot of utilities and libraries

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

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