| 1 |
'\" t |
| 2 |
.TH "SYSTEMD\-RC\-LOCAL\-GENERATOR" "8" "" "systemd 257.13" "systemd-rc-local-generator" |
| 3 |
.\" ----------------------------------------------------------------- |
| 4 |
.\" * Define some portability stuff |
| 5 |
.\" ----------------------------------------------------------------- |
| 6 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 7 |
.\" http://bugs.debian.org/507673 |
| 8 |
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 9 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 10 |
.ie \n(.g .ds Aq \(aq |
| 11 |
.el .ds Aq ' |
| 12 |
.\" ----------------------------------------------------------------- |
| 13 |
.\" * set default formatting |
| 14 |
.\" ----------------------------------------------------------------- |
| 15 |
.\" disable hyphenation |
| 16 |
.nh |
| 17 |
.\" disable justification (adjust text to left margin only) |
| 18 |
.ad l |
| 19 |
.\" ----------------------------------------------------------------- |
| 20 |
.\" * MAIN CONTENT STARTS HERE * |
| 21 |
.\" ----------------------------------------------------------------- |
| 22 |
.SH "NAME" |
| 23 |
systemd-rc-local-generator, rc-local.service \- Compatibility generator and service to start /etc/rc\&.local during boot |
| 24 |
.SH "SYNOPSIS" |
| 25 |
.PP |
| 26 |
/usr/lib/systemd/system\-generators/systemd\-rc\-local\-generator |
| 27 |
.PP |
| 28 |
rc\-local\&.service |
| 29 |
.SH "DESCRIPTION" |
| 30 |
.PP |
| 31 |
\fBsystemd\-rc\-local\-generator\fR |
| 32 |
is a generator that checks whether |
| 33 |
/etc/rc\&.local |
| 34 |
exists and is executable, and if it is, pulls the |
| 35 |
rc\-local\&.service |
| 36 |
unit into the boot process\&. This unit is responsible for running this script during late boot\&. The script is run after |
| 37 |
network\&.target, but in parallel with most other regular system services\&. |
| 38 |
.PP |
| 39 |
Note that |
| 40 |
rc\-local\&.service |
| 41 |
runs with slightly different semantics than the original System V version, which was executed "last" in the boot process, which is a concept that does not translate to systemd\&. |
| 42 |
.PP |
| 43 |
Also note that |
| 44 |
rc\-local\&.service |
| 45 |
is ordered after |
| 46 |
network\&.target, which does not mean that the network is functional, see |
| 47 |
\fBsystemd.special\fR(7)\&. If the script requires a configured network connection, it may be desirable to pull in and order it after |
| 48 |
network\-online\&.target |
| 49 |
with a drop\-in: |
| 50 |
.sp |
| 51 |
.if n \{\ |
| 52 |
.RS 4 |
| 53 |
.\} |
| 54 |
.nf |
| 55 |
# /etc/systemd/system/rc\-local\&.service\&.d/network\&.conf |
| 56 |
[Unit] |
| 57 |
Wants=network\-online\&.target |
| 58 |
After=network\-online\&.target |
| 59 |
.fi |
| 60 |
.if n \{\ |
| 61 |
.RE |
| 62 |
.\} |
| 63 |
.PP |
| 64 |
Support for |
| 65 |
/etc/rc\&.local |
| 66 |
is provided for compatibility with specific System\ \&V systems only\&. However, it is strongly recommended to avoid using this script today, and instead provide proper unit files with appropriate dependencies for any scripts to run during the boot process\&. Note that the path to the script is set at compile time and varies between distributions\&. |
| 67 |
.PP |
| 68 |
systemd\-rc\-local\-generator |
| 69 |
implements |
| 70 |
\fBsystemd.generator\fR(7)\&. |
| 71 |
.SH "NOTES" |
| 72 |
.PP |
| 73 |
On systems with SELinux, when creating the file, make sure to set the appropriate context, e\&.g\&. with "\fBsudo restorecon \-v /etc/rc\&.local\fR"\&. |
| 74 |
.SH "SEE ALSO" |
| 75 |
.PP |
| 76 |
\fBsystemd\fR(1), \fBsystemctl\fR(1) |