diff options
author | Christoph Anton Mitterer <mail@christoph.anton.mitterer.name> | 2021-06-28 19:24:37 +0200 |
---|---|---|
committer | Christoph Anton Mitterer <mail@christoph.anton.mitterer.name> | 2021-07-11 18:00:25 +0200 |
commit | 564761fcaeda8c013210f7c6934847a6d0228ec9 (patch) | |
tree | 199b8395ba093ac21cfa4d7c87d3234ee513a3e8 /sysusers.d/meson.build | |
parent | d6d1fd995f9a4789a26e7156254b981e507fa14c (diff) | |
download | systemd-564761fcaeda8c013210f7c6934847a6d0228ec9.tar.gz |
sysusers: split up systemd.conf
This makes it easier have the respective users/groups only created when their
respective packages are installed.
Fixes #20044.
Diffstat (limited to 'sysusers.d/meson.build')
-rw-r--r-- | sysusers.d/meson.build | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/sysusers.d/meson.build b/sysusers.d/meson.build index 894d1840bc..132d8a187a 100644 --- a/sysusers.d/meson.build +++ b/sysusers.d/meson.build @@ -1,13 +1,31 @@ # SPDX-License-Identifier: LGPL-2.1-or-later -if enable_sysusers - install_data('README', install_dir : sysusersdir) +files = [['README', ''], + ['systemd-coredump.conf', 'ENABLE_COREDUMP'], + ['systemd-oom.conf', 'ENABLE_OOMD']] + +foreach pair : files + if not enable_sysusers + # do nothing + elif pair[1] == '' or conf.get(pair[1]) == 1 + install_data(pair[0], install_dir : sysusersdir) + else + message('Not installing sysusers.d/@0@ because @1@ is @2@' + .format(pair[0], pair[1], conf.get(pair[1], 0))) + endif +endforeach + + +if enable_sysusers and conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1 + install_data('systemd-remote.conf', install_dir : sysusersdir) endif -in_files = [['basic.conf', enable_sysusers], - ['systemd.conf', enable_sysusers], - ['systemd-remote.conf', enable_sysusers and - conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1]] + +in_files = [['basic.conf', enable_sysusers], + ['systemd-journal.conf', enable_sysusers], + ['systemd-network.conf', enable_sysusers and conf.get('ENABLE_NETWORKD') == 1], + ['systemd-resolve.conf', enable_sysusers and conf.get('ENABLE_RESOLVE') == 1], + ['systemd-timesync.conf', enable_sysusers and conf.get('ENABLE_TIMESYNCD') == 1]] foreach tuple : in_files file = tuple[0] |