mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
configure: Remove nested conditionals in LIBVIRT_CHECK_INIT_SCRIPT
We don't need them any longer; moreover, the previous structure made it very easy for bugs to slip in, by having the result of one check influence the following one. By placing the check for "$with_init_script" = check front and center, hopefully this won't happen (as easily) again.
This commit is contained in:
parent
8a38f96487
commit
801a0a57ba
@ -30,20 +30,14 @@ AC_DEFUN([LIBVIRT_CHECK_INIT_SCRIPT],[
|
|||||||
init_systemd=no
|
init_systemd=no
|
||||||
init_upstart=no
|
init_upstart=no
|
||||||
|
|
||||||
if test "$with_init_script" = check; then
|
if test "$with_init_script" = check && test "$cross_compiling" = yes; then
|
||||||
if test "$cross_compiling" = yes; then
|
with_init_script=none
|
||||||
with_init_script=none
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
if type systemctl >/dev/null 2>&1; then
|
if test "$with_init_script" = check && type systemctl >/dev/null 2>&1; then
|
||||||
if test "$with_init_script" = check; then
|
with_init_script=systemd
|
||||||
with_init_script=systemd
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
if test -f /etc/redhat-release; then
|
if test "$with_init_script" = check && test -f /etc/redhat-release; then
|
||||||
if test "$with_init_script" = check; then
|
with_init_script=redhat
|
||||||
with_init_script=redhat
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
if test "$with_init_script" = check; then
|
if test "$with_init_script" = check; then
|
||||||
with_init_script=none
|
with_init_script=none
|
||||||
|
Loading…
Reference in New Issue
Block a user