mirror of
https://github.com/systemd/systemd.git
synced 2024-11-27 04:03:36 +08:00
meson: don't search PATH for telinit (#7770)
On a typical system running systemd, the telinit in PATH is very likely to be a symlink to systemctl. Setting TELINIT to this may result in an infinite recursion if telinit is called and sd_booted() == 0. This may commonly occur in a chroot environment. Bug: https://bugs.gentoo.org/642724 [zj: The path was originally hardcoded as "/lib/upstart/telinit", but was made configurable without changing the default in4ad61fd180
. Then the default was changed to `/lib/sysvinit/telinit` inabaaabf40a
. Then it started being autodetected when meson support was added in5c23128dab
. This patch restores the behaviour that was implemented in configure.ac at the time of its removal.]
This commit is contained in:
parent
3046b6db1d
commit
2fa645f1cc
@ -503,8 +503,7 @@ splash_bmp = files('test/splash.bmp')
|
||||
|
||||
# if -Dxxx-path option is found, use that. Otherwise, check in $PATH,
|
||||
# /usr/sbin, /sbin, and fall back to the default from middle column.
|
||||
progs = [['telinit', '/lib/sysvinit/telinit'],
|
||||
['quotaon', '/usr/sbin/quotaon' ],
|
||||
progs = [['quotaon', '/usr/sbin/quotaon' ],
|
||||
['quotacheck', '/usr/sbin/quotacheck' ],
|
||||
['kill', '/usr/bin/kill' ],
|
||||
['kmod', '/usr/bin/kmod' ],
|
||||
@ -531,6 +530,8 @@ foreach prog : progs
|
||||
substs.set(name, path)
|
||||
endforeach
|
||||
|
||||
conf.set_quoted('TELINIT', get_option('telinit-path'))
|
||||
|
||||
if run_command('ln', '--relative', '--help').returncode() != 0
|
||||
error('ln does not support --relative')
|
||||
endif
|
||||
|
@ -29,7 +29,8 @@ option('sysvinit-path', type : 'string', value : '/etc/init.d',
|
||||
description : 'the directory where the SysV init scripts are located')
|
||||
option('sysvrcnd-path', type : 'string', value : '/etc/rc.d',
|
||||
description : 'the base directory for SysV rcN.d directories')
|
||||
option('telinit-path', type : 'string', description : 'path to telinit')
|
||||
option('telinit-path', type : 'string', value : '/lib/sysvinit/telinit',
|
||||
description : 'path to telinit')
|
||||
option('rc-local', type : 'string',
|
||||
value : '/etc/rc.local')
|
||||
option('halt-local', type : 'string',
|
||||
|
Loading…
Reference in New Issue
Block a user