]>
Commit | Line | Data |
---|---|---|
c2ee27a5 | 1 | <?xml version='1.0'?> |
3a54a157 | 2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
eea10b26 | 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ |
c2ee27a5 ZJS |
4 | <!ENTITY % entities SYSTEM "custom-entities.ent" > |
5 | %entities; | |
6 | ]> | |
db9ecf05 | 7 | <!-- SPDX-License-Identifier: LGPL-2.1-or-later --> |
c2ee27a5 | 8 | |
bb5a34fb | 9 | <refentry id="systemd-rc-local-generator" conditional='HAVE_SYSV_COMPAT'> |
245992a0 LP |
10 | <refentryinfo> |
11 | <title>systemd-rc-local-generator</title> | |
12 | <productname>systemd</productname> | |
245992a0 LP |
13 | </refentryinfo> |
14 | ||
15 | <refmeta> | |
16 | <refentrytitle>systemd-rc-local-generator</refentrytitle> | |
17 | <manvolnum>8</manvolnum> | |
18 | </refmeta> | |
19 | ||
20 | <refnamediv> | |
21 | <refname>systemd-rc-local-generator</refname> | |
45b218b0 ZJS |
22 | <refname>rc-local.service</refname> |
23 | <refpurpose>Compatibility generator and service to start <filename>&RC_LOCAL_PATH;</filename> during boot</refpurpose> | |
245992a0 LP |
24 | </refnamediv> |
25 | ||
26 | <refsynopsisdiv> | |
27 | <para><filename>/usr/lib/systemd/system-generators/systemd-rc-local-generator</filename></para> | |
45b218b0 | 28 | <para><filename>rc-local.service</filename></para> |
245992a0 LP |
29 | </refsynopsisdiv> |
30 | ||
31 | <refsect1> | |
32 | <title>Description</title> | |
33 | ||
eb0845df ZJS |
34 | <para><command>systemd-rc-local-generator</command> is a generator that checks whether |
35 | <filename>&RC_LOCAL_PATH;</filename> exists and is executable, and if it is, pulls the | |
c2ee27a5 | 36 | <filename>rc-local.service</filename> unit into the boot process. This unit is responsible for running |
eb0845df ZJS |
37 | this script during late boot. The script is run after <filename>network.target</filename>, but in |
38 | parallel with most other regular system services.</para> | |
39 | ||
40 | <para>Note that <filename>rc-local.service</filename> runs with slightly different semantics than the | |
41 | original System V version, which was executed "last" in the boot process, which is a concept that does | |
42 | not translate to systemd.</para> | |
43 | ||
44 | <para>Also note that <filename>rc-local.service</filename> is ordered after | |
45 | <filename>network.target</filename>, which does not mean that the network is functional, see | |
46 | <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>. | |
47 | If the script requires a configured network connection, it may be desirable to pull in and order it after | |
48 | <filename>network-online.target</filename> with a drop-in:</para> | |
49 | ||
50 | <programlisting># /etc/systemd/system/rc-local.service.d/network.conf | |
51 | [Unit] | |
52 | Wants=network-online.target | |
53 | After=network-online.target | |
54 | </programlisting> | |
c2ee27a5 | 55 | |
759e8fe7 ZJS |
56 | <para>Support for <filename>&RC_LOCAL_PATH;</filename> is provided for compatibility with specific |
57 | System V systems only. However, it is strongly recommended to avoid using this script today, and instead | |
c2ee27a5 | 58 | provide proper unit files with appropriate dependencies for any scripts to run during the boot process. |
eb0845df | 59 | Note that the path to the script is set at compile time and varies between distributions.</para> |
245992a0 LP |
60 | |
61 | <para><filename>systemd-rc-local-generator</filename> implements | |
62 | <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para> | |
63 | </refsect1> | |
64 | ||
759e8fe7 ZJS |
65 | <refsect1> |
66 | <title>Notes</title> | |
67 | ||
68 | <para>On systems with SELinux, when creating the file, make sure to set the appropriate context, e.g. | |
69 | with "<command>sudo restorecon -v &RC_LOCAL_PATH;</command>". | |
70 | </para> | |
71 | </refsect1> | |
72 | ||
245992a0 LP |
73 | <refsect1> |
74 | <title>See Also</title> | |
13a69c12 DT |
75 | <para><simplelist type="inline"> |
76 | <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> | |
77 | <member><citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> | |
78 | </simplelist></para> | |
245992a0 | 79 | </refsect1> |
245992a0 | 80 | </refentry> |