mirror of
https://github.com/systemd/systemd.git
synced 2024-12-26 03:22:00 +03:00
Merge pull request #17067 from keszybz/rc-local-path
Expose the path to rc.local in the man page
This commit is contained in:
commit
a7ddeea15d
@ -10,3 +10,4 @@
|
||||
<!ENTITY MEMORY_ACCOUNTING_DEFAULT @MEMORY_ACCOUNTING_DEFAULT_YES_NO@>
|
||||
<!ENTITY KILL_USER_PROCESSES @KILL_USER_PROCESSES_YES_NO@>
|
||||
<!ENTITY DEBUGTTY @DEBUGTTY@>
|
||||
<!ENTITY RC_LOCAL_PATH @RC_LOCAL_PATH@>
|
||||
|
@ -1,8 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--*-nxml-*-->
|
||||
<?xml version='1.0'?>
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
|
||||
<!ENTITY % entities SYSTEM "custom-entities.ent" >
|
||||
%entities;
|
||||
]>
|
||||
<!-- SPDX-License-Identifier: LGPL-2.1+ -->
|
||||
|
||||
<refentry id="systemd-rc-local-generator" conditional='HAVE_SYSV_COMPAT'>
|
||||
<refentryinfo>
|
||||
<title>systemd-rc-local-generator</title>
|
||||
@ -16,7 +19,7 @@
|
||||
|
||||
<refnamediv>
|
||||
<refname>systemd-rc-local-generator</refname>
|
||||
<refpurpose>Compatibility generator for starting <filename>/etc/rc.local</filename> during boot</refpurpose>
|
||||
<refpurpose>Compatibility generator for starting <filename>&RC_LOCAL_PATH;</filename> during boot</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
@ -27,17 +30,17 @@
|
||||
<title>Description</title>
|
||||
|
||||
<para><filename>systemd-rc-local-generator</filename> is a generator that checks whether
|
||||
<filename>/etc/rc.local</filename> exists and is executable, and if it is pulls the
|
||||
<filename>rc-local.service</filename> unit into the boot process. This unit is responsible for running this script
|
||||
during late boot. Note that the script will be run with slightly different semantics than the original System V
|
||||
version, which was run "last" in the boot process, which is a concept that does not translate to systemd. The
|
||||
script is run after <filename>network.target</filename>, but in parallel with most other regular system
|
||||
services.</para>
|
||||
<filename>&RC_LOCAL_PATH;</filename> exists and is executable, and if it is pulls the
|
||||
<filename>rc-local.service</filename> unit into the boot process. This unit is responsible for running
|
||||
this script during late boot. Note that the script will be run with slightly different semantics than the
|
||||
original System V version, which was run "last" in the boot process, which is a concept that does not
|
||||
translate to systemd. The script is run after <filename>network.target</filename>, but in parallel with
|
||||
most other regular system services.</para>
|
||||
|
||||
<para>Support for <filename>/etc/rc.local</filename> is provided
|
||||
for compatibility with specific System V systems only. However, it is strongly recommended to avoid making use of
|
||||
this script today, and instead provide proper unit files with appropriate dependencies for any scripts to run
|
||||
during the boot process.</para>
|
||||
<para>Support for <filename>&RC_LOCAL_PATH;</filename> is provided for compatibility with specific System
|
||||
V systems only. However, it is strongly recommended to avoid making use of 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 a compile time and varies between distributions.</para>
|
||||
|
||||
<para><filename>systemd-rc-local-generator</filename> implements
|
||||
<citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
|
||||
|
@ -212,7 +212,7 @@ conf.set_quoted('SYSTEM_CONFIG_UNIT_DIR', join_paths(pkgsysc
|
||||
conf.set_quoted('SYSTEM_DATA_UNIT_PATH', systemunitdir)
|
||||
conf.set_quoted('SYSTEM_SYSVINIT_PATH', sysvinit_path)
|
||||
conf.set_quoted('SYSTEM_SYSVRCND_PATH', sysvrcnd_path)
|
||||
conf.set_quoted('RC_LOCAL_SCRIPT_PATH_START', get_option('rc-local'))
|
||||
conf.set_quoted('RC_LOCAL_PATH', get_option('rc-local'))
|
||||
|
||||
conf.set('ANSI_OK_COLOR', 'ANSI_' + get_option('ok-color').underscorify().to_upper())
|
||||
|
||||
@ -299,7 +299,7 @@ substs.set('CERTIFICATEROOT', get_option('certif
|
||||
substs.set('RANDOM_SEED', join_paths(randomseeddir, 'random-seed'))
|
||||
substs.set('SYSTEM_SYSVINIT_PATH', sysvinit_path)
|
||||
substs.set('SYSTEM_SYSVRCND_PATH', sysvrcnd_path)
|
||||
substs.set('RC_LOCAL_SCRIPT_PATH_START', get_option('rc-local'))
|
||||
substs.set('RC_LOCAL_PATH', get_option('rc-local'))
|
||||
substs.set('MEMORY_ACCOUNTING_DEFAULT', memory_accounting_default ? 'yes' : 'no')
|
||||
substs.set('STATUS_UNIT_FORMAT_DEFAULT', status_unit_format_default)
|
||||
substs.set('HIGH_RLIMIT_NOFILE', conf.get('HIGH_RLIMIT_NOFILE'))
|
||||
|
@ -59,7 +59,7 @@ static int run(const char *dest, const char *dest_early, const char *dest_late)
|
||||
|
||||
assert_se(arg_dest = dest);
|
||||
|
||||
if (check_executable(RC_LOCAL_SCRIPT_PATH_START) >= 0) {
|
||||
if (check_executable(RC_LOCAL_PATH) >= 0) {
|
||||
log_debug("Automatically adding rc-local.service.");
|
||||
|
||||
r = add_symlink("rc-local.service", "multi-user.target");
|
||||
|
@ -8,16 +8,16 @@
|
||||
# (at your option) any later version.
|
||||
|
||||
# This unit gets pulled automatically into multi-user.target by
|
||||
# systemd-rc-local-generator if @RC_LOCAL_SCRIPT_PATH_START@ is executable.
|
||||
# systemd-rc-local-generator if @RC_LOCAL_PATH@ is executable.
|
||||
[Unit]
|
||||
Description=@RC_LOCAL_SCRIPT_PATH_START@ Compatibility
|
||||
Description=@RC_LOCAL_PATH@ Compatibility
|
||||
Documentation=man:systemd-rc-local-generator(8)
|
||||
ConditionFileIsExecutable=@RC_LOCAL_SCRIPT_PATH_START@
|
||||
ConditionFileIsExecutable=@RC_LOCAL_PATH@
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=@RC_LOCAL_SCRIPT_PATH_START@ start
|
||||
ExecStart=@RC_LOCAL_PATH@ start
|
||||
TimeoutSec=0
|
||||
RemainAfterExit=yes
|
||||
GuessMainPID=no
|
||||
|
Loading…
Reference in New Issue
Block a user