Drop support for /usr/sbin/halt.local

/usr/sbin/halt.local is a Fedora/Red Hat anachronism from pre-systemd
times.
This commit is contained in:
Michael Biebl 2019-05-14 17:40:45 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent ff807cbb29
commit 4450894653
6 changed files with 4 additions and 21 deletions

View File

@ -15,7 +15,6 @@ distribution:
* `-Dsysvinit-path=` * `-Dsysvinit-path=`
* `-Dsysvrcnd-path=` * `-Dsysvrcnd-path=`
* `-Drc-local=` * `-Drc-local=`
* `-Dhalt-local=`
* `-Dloadkeys-path=` * `-Dloadkeys-path=`
* `-Dsetfont-path=` * `-Dsetfont-path=`
* `-Dtty-gid=` * `-Dtty-gid=`

View File

@ -17,7 +17,7 @@
<refnamediv> <refnamediv>
<refname>systemd-rc-local-generator</refname> <refname>systemd-rc-local-generator</refname>
<refpurpose>Compatibility generator for starting <filename>/etc/rc.local</filename> and <filename>/usr/sbin/halt.local</filename> during boot and shutdown</refpurpose> <refpurpose>Compatibility generator for starting <filename>/etc/rc.local</filename> during boot</refpurpose>
</refnamediv> </refnamediv>
<refsynopsisdiv> <refsynopsisdiv>
@ -35,14 +35,10 @@
script is run after <filename>network.target</filename>, but in parallel with most other regular system script is run after <filename>network.target</filename>, but in parallel with most other regular system
services.</para> services.</para>
<para><filename>systemd-rc-local-generator</filename> also checks whether <filename>/usr/sbin/halt.local</filename> <para>Support for <filename>/etc/rc.local</filename> is provided
exists and is executable, and if it is pulls the <filename>halt-local.service</filename> unit into the shutdown
process. This unit is responsible for running this script during later shutdown.</para>
<para>Support for both <filename>/etc/rc.local</filename> and <filename>/usr/sbin/halt.local</filename> is provided
for compatibility with specific System V systems only. However, it is strongly recommended to avoid making use of for compatibility with specific System V systems only. However, it is strongly recommended to avoid making use of
these scripts today, and instead provide proper unit files with appropriate dependencies for any scripts to run this script today, and instead provide proper unit files with appropriate dependencies for any scripts to run
during the boot or shutdown processes.</para> during the boot process.</para>
<para><filename>systemd-rc-local-generator</filename> implements <para><filename>systemd-rc-local-generator</filename> implements
<citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para> <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>

View File

@ -193,7 +193,6 @@ conf.set_quoted('SYSTEM_DATA_UNIT_PATH', systemunitdir)
conf.set_quoted('SYSTEM_SYSVINIT_PATH', sysvinit_path) conf.set_quoted('SYSTEM_SYSVINIT_PATH', sysvinit_path)
conf.set_quoted('SYSTEM_SYSVRCND_PATH', sysvrcnd_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_SCRIPT_PATH_START', get_option('rc-local'))
conf.set_quoted('RC_LOCAL_SCRIPT_PATH_STOP', get_option('halt-local'))
conf.set('ANSI_OK_COLOR', 'ANSI_' + get_option('ok-color').underscorify().to_upper()) conf.set('ANSI_OK_COLOR', 'ANSI_' + get_option('ok-color').underscorify().to_upper())
@ -280,7 +279,6 @@ substs.set('RANDOM_SEED', join_paths(randoms
substs.set('SYSTEM_SYSVINIT_PATH', sysvinit_path) substs.set('SYSTEM_SYSVINIT_PATH', sysvinit_path)
substs.set('SYSTEM_SYSVRCND_PATH', sysvrcnd_path) substs.set('SYSTEM_SYSVRCND_PATH', sysvrcnd_path)
substs.set('RC_LOCAL_SCRIPT_PATH_START', get_option('rc-local')) substs.set('RC_LOCAL_SCRIPT_PATH_START', get_option('rc-local'))
substs.set('RC_LOCAL_SCRIPT_PATH_STOP', get_option('halt-local'))
substs.set('MEMORY_ACCOUNTING_DEFAULT', memory_accounting_default ? 'yes' : 'no') substs.set('MEMORY_ACCOUNTING_DEFAULT', memory_accounting_default ? 'yes' : 'no')
substs.set('HIGH_RLIMIT_NOFILE', conf.get('HIGH_RLIMIT_NOFILE')) substs.set('HIGH_RLIMIT_NOFILE', conf.get('HIGH_RLIMIT_NOFILE'))
substs.set('BUILD_ROOT', meson.current_build_dir()) substs.set('BUILD_ROOT', meson.current_build_dir())
@ -3058,7 +3056,6 @@ status = [
'bash completions directory: @0@'.format(bashcompletiondir), 'bash completions directory: @0@'.format(bashcompletiondir),
'zsh completions directory: @0@'.format(zshcompletiondir), 'zsh completions directory: @0@'.format(zshcompletiondir),
'extra start script: @0@'.format(get_option('rc-local')), 'extra start script: @0@'.format(get_option('rc-local')),
'extra stop script: @0@'.format(get_option('halt-local')),
'debug shell: @0@ @ @1@'.format(get_option('debug-shell'), 'debug shell: @0@ @ @1@'.format(get_option('debug-shell'),
get_option('debug-tty')), get_option('debug-tty')),
'TTY GID: @0@'.format(tty_gid), 'TTY GID: @0@'.format(tty_gid),

View File

@ -31,8 +31,6 @@ option('telinit-path', type : 'string', value : '/lib/sysvinit/telinit',
description : 'path to telinit') description : 'path to telinit')
option('rc-local', type : 'string', option('rc-local', type : 'string',
value : '/etc/rc.local') value : '/etc/rc.local')
option('halt-local', type : 'string',
value : '/usr/sbin/halt.local')
option('quotaon-path', type : 'string', description : 'path to quotaon') option('quotaon-path', type : 'string', description : 'path to quotaon')
option('quotacheck-path', type : 'string', description : 'path to quotacheck') option('quotacheck-path', type : 'string', description : 'path to quotacheck')

View File

@ -65,12 +65,6 @@ static int run(const char *dest, const char *dest_early, const char *dest_late)
r = add_symlink("rc-local.service", "multi-user.target"); r = add_symlink("rc-local.service", "multi-user.target");
} }
if (check_executable(RC_LOCAL_SCRIPT_PATH_STOP) >= 0) {
log_debug("Automatically adding halt-local.service.");
k = add_symlink("halt-local.service", "final.target");
}
return r < 0 ? r : k; return r < 0 ? r : k;
} }

View File

@ -118,7 +118,6 @@ units = [
in_units = [ in_units = [
['debug-shell.service', ''], ['debug-shell.service', ''],
['emergency.service', ''], ['emergency.service', ''],
['halt-local.service', 'HAVE_SYSV_COMPAT'],
['initrd-cleanup.service', ''], ['initrd-cleanup.service', ''],
['initrd-parse-etc.service', ''], ['initrd-parse-etc.service', ''],
['initrd-switch-root.service', ''], ['initrd-switch-root.service', ''],