summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNorbert Lange <nolange79@gmail.com>2020-04-28 23:11:55 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-05-26 15:04:36 +0200
commit6589a56972d9afe9d860889f11cb9c8e6cb8a60c (patch)
tree617065f38a70bcf4333e95caa1f807a05adc4f97
parentMerge pull request #15914 from poettering/ubsan-float-check (diff)
downloadsystemd-6589a56972d9afe9d860889f11cb9c8e6cb8a60c.tar.xz
systemd-6589a56972d9afe9d860889f11cb9c8e6cb8a60c.zip
dont install systemd-initctl, runlevel, telinit if no SYSV compat
systemd-initctl executable is still built.
-rw-r--r--meson.build5
-rw-r--r--units/meson.build14
2 files changed, 11 insertions, 8 deletions
diff --git a/meson.build b/meson.build
index b87d5c63a3..53c450eb01 100644
--- a/meson.build
+++ b/meson.build
@@ -2189,7 +2189,8 @@ if conf.get('ENABLE_HOMED') == 1
endif
endif
-foreach alias : ['halt', 'poweroff', 'reboot', 'runlevel', 'shutdown', 'telinit']
+foreach alias : (['halt', 'poweroff', 'reboot', 'shutdown'] +
+ (conf.get('HAVE_SYSV_COMPAT') == 1 ? ['runlevel', 'telinit'] : []))
meson.add_install_script(meson_make_symlink,
join_paths(rootbindir, 'systemctl'),
join_paths(rootsbindir, alias))
@@ -2851,7 +2852,7 @@ executable(
include_directories : includes,
link_with : [libshared],
install_rpath : rootlibexecdir,
- install : true,
+ install : (conf.get('HAVE_SYSV_COMPAT') == 1),
install_dir : rootlibexecdir)
public_programs += executable(
diff --git a/units/meson.build b/units/meson.build
index a0677196de..c641900c66 100644
--- a/units/meson.build
+++ b/units/meson.build
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: LGPL-2.1+
+with_runlevels = conf.get('HAVE_SYSV_COMPAT') == 1
+
units = [
['basic.target', ''],
['blockdev@.target', ''],
@@ -19,7 +21,7 @@ units = [
'multi-user.target.wants/'],
['getty-pre.target', ''],
['graphical.target', '',
- 'runlevel5.target default.target'],
+ (with_runlevels ? 'runlevel5.target default.target' : 'default.target')],
['halt.target', ''],
['hibernate.target', 'ENABLE_HIBERNATE'],
['hybrid-sleep.target', 'ENABLE_HIBERNATE'],
@@ -42,7 +44,7 @@ units = [
['machines.target', 'ENABLE_MACHINED'],
['modprobe@.service', ''],
['multi-user.target', '',
- 'runlevel2.target runlevel3.target runlevel4.target'],
+ (with_runlevels ? 'runlevel2.target runlevel3.target runlevel4.target' : '')],
['network-online.target', ''],
['network-pre.target', ''],
['network.target', ''],
@@ -50,18 +52,18 @@ units = [
['nss-user-lookup.target', ''],
['paths.target', ''],
['poweroff.target', '',
- 'runlevel0.target'],
+ (with_runlevels ? 'runlevel0.target' : '')],
['printer.target', ''],
['proc-sys-fs-binfmt_misc.automount', 'ENABLE_BINFMT',
'sysinit.target.wants/'],
['proc-sys-fs-binfmt_misc.mount', 'ENABLE_BINFMT'],
['reboot.target', '',
- 'runlevel6.target ctrl-alt-del.target'],
+ (with_runlevels ? 'runlevel6.target ctrl-alt-del.target' : 'ctrl-alt-del.target')],
['remote-cryptsetup.target', 'HAVE_LIBCRYPTSETUP'],
['remote-fs-pre.target', ''],
['remote-fs.target', ''],
['rescue.target', '',
- 'runlevel1.target'],
+ (with_runlevels ? 'runlevel1.target' : '')],
['rpcbind.target', ''],
['shutdown.target', ''],
['sigpwr.target', ''],
@@ -100,7 +102,7 @@ units = [
['systemd-firstboot.service', 'ENABLE_FIRSTBOOT',
'sysinit.target.wants/'],
['systemd-halt.service', ''],
- ['systemd-initctl.socket', '',
+ ['systemd-initctl.socket', 'HAVE_SYSV_COMPAT',
'sockets.target.wants/'],
['systemd-journal-catalog-update.service', '',
'sysinit.target.wants/'],