Skip to content
This repository was archived by the owner on Nov 15, 2025. It is now read-only.

Commit 4450894

Browse files
mbieblkeszybz
authored andcommitted
Drop support for /usr/sbin/halt.local
/usr/sbin/halt.local is a Fedora/Red Hat anachronism from pre-systemd times.
1 parent ff807cb commit 4450894

File tree

6 files changed

+4
-21
lines changed

6 files changed

+4
-21
lines changed

docs/DISTRO_PORTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ distribution:
1515
* `-Dsysvinit-path=`
1616
* `-Dsysvrcnd-path=`
1717
* `-Drc-local=`
18-
* `-Dhalt-local=`
1918
* `-Dloadkeys-path=`
2019
* `-Dsetfont-path=`
2120
* `-Dtty-gid=`

man/systemd-rc-local-generator.xml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<refnamediv>
1919
<refname>systemd-rc-local-generator</refname>
20-
<refpurpose>Compatibility generator for starting <filename>/etc/rc.local</filename> and <filename>/usr/sbin/halt.local</filename> during boot and shutdown</refpurpose>
20+
<refpurpose>Compatibility generator for starting <filename>/etc/rc.local</filename> during boot</refpurpose>
2121
</refnamediv>
2222

2323
<refsynopsisdiv>
@@ -35,14 +35,10 @@
3535
script is run after <filename>network.target</filename>, but in parallel with most other regular system
3636
services.</para>
3737

38-
<para><filename>systemd-rc-local-generator</filename> also checks whether <filename>/usr/sbin/halt.local</filename>
39-
exists and is executable, and if it is pulls the <filename>halt-local.service</filename> unit into the shutdown
40-
process. This unit is responsible for running this script during later shutdown.</para>
41-
42-
<para>Support for both <filename>/etc/rc.local</filename> and <filename>/usr/sbin/halt.local</filename> is provided
38+
<para>Support for <filename>/etc/rc.local</filename> is provided
4339
for compatibility with specific System V systems only. However, it is strongly recommended to avoid making use of
44-
these scripts today, and instead provide proper unit files with appropriate dependencies for any scripts to run
45-
during the boot or shutdown processes.</para>
40+
this script today, and instead provide proper unit files with appropriate dependencies for any scripts to run
41+
during the boot process.</para>
4642

4743
<para><filename>systemd-rc-local-generator</filename> implements
4844
<citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>

meson.build

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ conf.set_quoted('SYSTEM_DATA_UNIT_PATH', systemunitdir)
193193
conf.set_quoted('SYSTEM_SYSVINIT_PATH', sysvinit_path)
194194
conf.set_quoted('SYSTEM_SYSVRCND_PATH', sysvrcnd_path)
195195
conf.set_quoted('RC_LOCAL_SCRIPT_PATH_START', get_option('rc-local'))
196-
conf.set_quoted('RC_LOCAL_SCRIPT_PATH_STOP', get_option('halt-local'))
197196

198197
conf.set('ANSI_OK_COLOR', 'ANSI_' + get_option('ok-color').underscorify().to_upper())
199198

@@ -280,7 +279,6 @@ substs.set('RANDOM_SEED', join_paths(randoms
280279
substs.set('SYSTEM_SYSVINIT_PATH', sysvinit_path)
281280
substs.set('SYSTEM_SYSVRCND_PATH', sysvrcnd_path)
282281
substs.set('RC_LOCAL_SCRIPT_PATH_START', get_option('rc-local'))
283-
substs.set('RC_LOCAL_SCRIPT_PATH_STOP', get_option('halt-local'))
284282
substs.set('MEMORY_ACCOUNTING_DEFAULT', memory_accounting_default ? 'yes' : 'no')
285283
substs.set('HIGH_RLIMIT_NOFILE', conf.get('HIGH_RLIMIT_NOFILE'))
286284
substs.set('BUILD_ROOT', meson.current_build_dir())
@@ -3058,7 +3056,6 @@ status = [
30583056
'bash completions directory: @0@'.format(bashcompletiondir),
30593057
'zsh completions directory: @0@'.format(zshcompletiondir),
30603058
'extra start script: @0@'.format(get_option('rc-local')),
3061-
'extra stop script: @0@'.format(get_option('halt-local')),
30623059
'debug shell: @0@ @ @1@'.format(get_option('debug-shell'),
30633060
get_option('debug-tty')),
30643061
'TTY GID: @0@'.format(tty_gid),

meson_options.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ option('telinit-path', type : 'string', value : '/lib/sysvinit/telinit',
3131
description : 'path to telinit')
3232
option('rc-local', type : 'string',
3333
value : '/etc/rc.local')
34-
option('halt-local', type : 'string',
35-
value : '/usr/sbin/halt.local')
3634

3735
option('quotaon-path', type : 'string', description : 'path to quotaon')
3836
option('quotacheck-path', type : 'string', description : 'path to quotacheck')

src/rc-local-generator/rc-local-generator.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,6 @@ static int run(const char *dest, const char *dest_early, const char *dest_late)
6565
r = add_symlink("rc-local.service", "multi-user.target");
6666
}
6767

68-
if (check_executable(RC_LOCAL_SCRIPT_PATH_STOP) >= 0) {
69-
log_debug("Automatically adding halt-local.service.");
70-
71-
k = add_symlink("halt-local.service", "final.target");
72-
}
73-
7468
return r < 0 ? r : k;
7569
}
7670

units/meson.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ units = [
118118
in_units = [
119119
['debug-shell.service', ''],
120120
['emergency.service', ''],
121-
['halt-local.service', 'HAVE_SYSV_COMPAT'],
122121
['initrd-cleanup.service', ''],
123122
['initrd-parse-etc.service', ''],
124123
['initrd-switch-root.service', ''],

0 commit comments

Comments
 (0)