mirror of https://gitee.com/openkylin/libvirt.git
configure: Add systemd detection to --with-init-script=check
Most distributions, including RHEL, have switched to systemd, so we should detect it and act accordingly. This also means that 'systemd+redhat' should be preferred to legacy 'redhat'. Our witness for the check is the availability of the systemctl command on the host.
This commit is contained in:
parent
6f91606777
commit
cf72255ede
|
@ -634,7 +634,15 @@ if test "$with_init_script" = check; then
|
|||
if test "$cross_compiling" = yes; then
|
||||
with_init_script=none
|
||||
fi
|
||||
if type systemctl >/dev/null 2>&1; then
|
||||
if test "$with_init_script" = check; then
|
||||
with_init_script=systemd
|
||||
fi
|
||||
fi
|
||||
if test -f /etc/redhat-release; then
|
||||
if test "$with_init_script" = systemd; then
|
||||
with_init_script=systemd+redhat
|
||||
fi
|
||||
if test "$with_init_script" = check; then
|
||||
with_init_script=redhat
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue