mirror of
https://github.com/systemd/systemd.git
synced 2024-11-23 02:03:37 +08:00
sysusers: split up systemd.conf
This makes it easier have the respective users/groups only created when their respective packages are installed. Fixes #20044.
This commit is contained in:
parent
d6d1fd995f
commit
564761fcae
@ -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]
|
||||
|
8
sysusers.d/systemd-coredump.conf
Normal file
8
sysusers.d/systemd-coredump.conf
Normal file
@ -0,0 +1,8 @@
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
u systemd-coredump - "systemd Core Dumper"
|
8
sysusers.d/systemd-journal.conf.in
Normal file
8
sysusers.d/systemd-journal.conf.in
Normal file
@ -0,0 +1,8 @@
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
g systemd-journal {{SYSTEMD_JOURNAL_GID}} -
|
8
sysusers.d/systemd-network.conf.in
Normal file
8
sysusers.d/systemd-network.conf.in
Normal file
@ -0,0 +1,8 @@
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
u systemd-network {{SYSTEMD_NETWORK_UID}} "systemd Network Management"
|
8
sysusers.d/systemd-oom.conf
Normal file
8
sysusers.d/systemd-oom.conf
Normal file
@ -0,0 +1,8 @@
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
u systemd-oom - "systemd Userspace OOM Killer"
|
8
sysusers.d/systemd-resolve.conf.in
Normal file
8
sysusers.d/systemd-resolve.conf.in
Normal file
@ -0,0 +1,8 @@
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
u systemd-resolve {{SYSTEMD_RESOLVE_UID}} "systemd Resolver"
|
8
sysusers.d/systemd-timesync.conf.in
Normal file
8
sysusers.d/systemd-timesync.conf.in
Normal file
@ -0,0 +1,8 @@
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
u systemd-timesync {{SYSTEMD_TIMESYNC_UID}} "systemd Time Synchronization"
|
@ -1,23 +0,0 @@
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
g systemd-journal {{SYSTEMD_JOURNAL_GID}} -
|
||||
{% if ENABLE_NETWORKD %}
|
||||
u systemd-network {{SYSTEMD_NETWORK_UID}} "systemd Network Management"
|
||||
{% endif %}
|
||||
{% if ENABLE_OOMD %}
|
||||
u systemd-oom - "systemd Userspace OOM Killer"
|
||||
{% endif %}
|
||||
{% if ENABLE_RESOLVE %}
|
||||
u systemd-resolve {{SYSTEMD_RESOLVE_UID}} "systemd Resolver"
|
||||
{% endif %}
|
||||
{% if ENABLE_TIMESYNCD %}
|
||||
u systemd-timesync {{SYSTEMD_TIMESYNC_UID}} "systemd Time Synchronization"
|
||||
{% endif %}
|
||||
{% if ENABLE_COREDUMP %}
|
||||
u systemd-coredump - "systemd Core Dumper"
|
||||
{% endif %}
|
Loading…
Reference in New Issue
Block a user