source: general/sysutils/fcron.xml@ d7f8f6d

11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since d7f8f6d was b59e5eb3, checked in by David Bryant <davidbryant@…>, 19 months ago

Fixed a common misspelling. "setup" is a noun. When "set up" is a
phrasal verb, it is spelled as two words. This commit fixes most of
the misspelled "set up" instances in the BLFS book.

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