From 011360eed3afcdd489c0b45cfaa9298e133bee0c Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 2 Apr 2025 22:10:29 +0900 Subject: [PATCH] meson: rename RC_LOCAL_PATH -> SYSTEM_SYSVRCLOCAL_PATH No functional change, but just for emphasizing that this is for SysV compatibility. --- man/custom-entities.ent.in | 2 +- man/systemd-rc-local-generator.xml | 8 ++++---- meson.build | 4 ++-- src/rc-local-generator/rc-local-generator.c | 2 +- units/rc-local.service.in | 8 ++++---- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/man/custom-entities.ent.in b/man/custom-entities.ent.in index b1f401bc900..3e39542bbc4 100644 --- a/man/custom-entities.ent.in +++ b/man/custom-entities.ent.in @@ -11,7 +11,7 @@ - + diff --git a/man/systemd-rc-local-generator.xml b/man/systemd-rc-local-generator.xml index 882c5d6e7d1..ff384d1b273 100644 --- a/man/systemd-rc-local-generator.xml +++ b/man/systemd-rc-local-generator.xml @@ -20,7 +20,7 @@ systemd-rc-local-generator rc-local.service - Compatibility generator and service to start &RC_LOCAL_PATH; during boot + Compatibility generator and service to start &SYSTEM_SYSVRCLOCAL_PATH; during boot @@ -32,7 +32,7 @@ Description systemd-rc-local-generator is a generator that checks whether - &RC_LOCAL_PATH; exists and is executable, and if it is, pulls the + &SYSTEM_SYSVRCLOCAL_PATH; exists and is executable, and if it is, pulls the rc-local.service unit into the boot process. This unit is responsible for running this script during late boot. The script is run after network.target, but in parallel with most other regular system services. @@ -53,7 +53,7 @@ Wants=network-online.target After=network-online.target - Support for &RC_LOCAL_PATH; is provided for compatibility with specific + Support for &SYSTEM_SYSVRCLOCAL_PATH; 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. @@ -66,7 +66,7 @@ After=network-online.target Notes On systems with SELinux, when creating the file, make sure to set the appropriate context, e.g. - with "sudo restorecon -v &RC_LOCAL_PATH;". + with "sudo restorecon -v &SYSTEM_SYSVRCLOCAL_PATH;". diff --git a/meson.build b/meson.build index 3357df3d319..f25ad1a27ef 100644 --- a/meson.build +++ b/meson.build @@ -262,7 +262,6 @@ conf.set_quoted('PREFIX', prefixdir) conf.set_quoted('PREFIX_NOSLASH', prefixdir_noslash) conf.set_quoted('RANDOM_SEED', randomseeddir / 'random-seed') conf.set_quoted('RANDOM_SEED_DIR', randomseeddir) -conf.set_quoted('RC_LOCAL_PATH', get_option('rc-local')) conf.set_quoted('SSHCONFDIR', sshconfdir) conf.set_quoted('SSHDCONFDIR', sshdconfdir) conf.set_quoted('SHELLPROFILEDIR', shellprofiledir) @@ -303,6 +302,7 @@ conf.set_quoted('SYSTEM_SHUTDOWN_PATH', systemshutdowndir) conf.set_quoted('SYSTEM_SLEEP_PATH', systemsleepdir) conf.set_quoted('SYSTEM_SYSVINIT_PATH', sysvinit_path) conf.set_quoted('SYSTEM_SYSVRCND_PATH', sysvrcnd_path) +conf.set_quoted('SYSTEM_SYSVRCLOCAL_PATH', sysvrclocal_path) conf.set_quoted('SYSUSERS_DIR', sysusersdir) conf.set_quoted('TMPFILES_DIR', tmpfilesdir) conf.set_quoted('USER_TMPFILES_DIR', usertmpfilesdir) @@ -2930,6 +2930,7 @@ summary({ 'lib directory' : libdir, 'SysV init scripts' : sysvinit_path, 'SysV rc?.d directories' : sysvrcnd_path, + 'SysV rc.local script' : sysvrclocal_path, 'PAM modules directory' : pamlibdir, 'PAM configuration directory' : pamconfdir, 'ssh server configuration directory' : sshdconfdir, @@ -2946,7 +2947,6 @@ summary({ 'bash completions directory' : bashcompletiondir, 'zsh completions directory' : zshcompletiondir, 'private shared lib version tag' : shared_lib_tag, - 'extra start script' : get_option('rc-local'), 'debug shell' : '@0@ @ @1@'.format(get_option('debug-shell'), get_option('debug-tty')), 'system UIDs' : '<=@0@ (alloc >=@1@)'.format(conf.get('SYSTEM_UID_MAX'), diff --git a/src/rc-local-generator/rc-local-generator.c b/src/rc-local-generator/rc-local-generator.c index 89cc5fadb6a..53ea23215ed 100644 --- a/src/rc-local-generator/rc-local-generator.c +++ b/src/rc-local-generator/rc-local-generator.c @@ -64,7 +64,7 @@ static int run(const char *dest, const char *dest_early, const char *dest_late) return EXIT_SUCCESS; } - if (check_executable(RC_LOCAL_PATH) >= 0) { + if (check_executable(SYSTEM_SYSVRCLOCAL_PATH) >= 0) { log_debug("Automatically adding rc-local.service."); r = add_symlink("rc-local.service", "multi-user.target"); diff --git a/units/rc-local.service.in b/units/rc-local.service.in index 6fb0838cdb4..b135f3894de 100644 --- a/units/rc-local.service.in +++ b/units/rc-local.service.in @@ -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_PATH}} is executable. +# systemd-rc-local-generator if {{SYSTEM_SYSVRCLOCAL_PATH}} is executable. [Unit] -Description={{RC_LOCAL_PATH}} Compatibility +Description={{SYSTEM_SYSVRCLOCAL_PATH}} Compatibility Documentation=man:systemd-rc-local-generator(8) -ConditionFileIsExecutable={{RC_LOCAL_PATH}} +ConditionFileIsExecutable={{SYSTEM_SYSVRCLOCAL_PATH}} After=network.target [Service] Type=forking -ExecStart={{RC_LOCAL_PATH}} start +ExecStart={{SYSTEM_SYSVRCLOCAL_PATH}} start TimeoutSec=infinity RemainAfterExit=yes GuessMainPID=no -- 2.47.3