source: general/sysutils/fcron.xml@ 5ff8c3a

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 xry111/llvm18 xry111/soup3 xry111/xf86-video-removal
Last change on this file since 5ff8c3a was 9b8ff698, checked in by Douglas R. Reno <renodr@…>, 21 months ago

Fix building hdparm-9.64 with glibc-2.36
Tags up to that point

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