mirror of
https://github.com/systemd/systemd
synced 2024-09-29 21:04:12 +00:00
meson: don't put a symlink pointing to '20-systemd-userdb.conf' in /etc in all cases
It's only needed on distros where sshd doesn't support drop-ins in /usr, which is not the case on SUSE.
This commit is contained in:
parent
de0f11d790
commit
50d80ec5ac
|
@ -210,6 +210,7 @@ sshdconfdir = get_option('sshdconfdir')
|
||||||
if sshdconfdir == ''
|
if sshdconfdir == ''
|
||||||
sshdconfdir = sysconfdir / 'ssh/sshd_config.d'
|
sshdconfdir = sysconfdir / 'ssh/sshd_config.d'
|
||||||
endif
|
endif
|
||||||
|
conf.set10('LINK_SSHD_USERDB_DROPIN', sshdconfdir != 'no' and not sshdconfdir.startswith('/usr/'))
|
||||||
|
|
||||||
sshdprivsepdir = get_option('sshdprivsepdir')
|
sshdprivsepdir = get_option('sshdprivsepdir')
|
||||||
conf.set10('CREATE_SSHDPRIVSEPDIR', sshdprivsepdir != 'no' and not sshdprivsepdir.startswith('/usr/'))
|
conf.set10('CREATE_SSHDPRIVSEPDIR', sshdprivsepdir != 'no' and not sshdprivsepdir.startswith('/usr/'))
|
||||||
|
|
|
@ -31,10 +31,12 @@ if conf.get('ENABLE_SSH_USERDB_CONFIG') == 1
|
||||||
output : '20-systemd-userdb.conf',
|
output : '20-systemd-userdb.conf',
|
||||||
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : libexecdir / 'sshd_config.d')
|
install_dir : sshdconfdir.startswith('/usr/') ? sshdconfdir : libexecdir / 'sshd_config.d')
|
||||||
|
|
||||||
install_emptydir(sshdconfdir)
|
if not sshdconfdir.startswith('/usr/')
|
||||||
|
install_emptydir(sshdconfdir)
|
||||||
|
|
||||||
meson.add_install_script(sh, '-c',
|
meson.add_install_script(sh, '-c',
|
||||||
ln_s.format(libexecdir / 'sshd_config.d' / '20-systemd-userdb.conf', sshdconfdir / '20-systemd-userdb.conf'))
|
ln_s.format(libexecdir / 'sshd_config.d' / '20-systemd-userdb.conf', sshdconfdir / '20-systemd-userdb.conf'))
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -7,4 +7,6 @@
|
||||||
|
|
||||||
# See tmpfiles.d(5) for details
|
# See tmpfiles.d(5) for details
|
||||||
|
|
||||||
|
{% if LINK_SSHD_USERDB_DROPIN %}
|
||||||
L {{SSHDCONFDIR}}/20-systemd-userdb.conf - - - - {{LIBEXECDIR}}/sshd_config.d/20-systemd-userdb.conf
|
L {{SSHDCONFDIR}}/20-systemd-userdb.conf - - - - {{LIBEXECDIR}}/sshd_config.d/20-systemd-userdb.conf
|
||||||
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue