[virt-tools-list] [vhostmd] configure: fix logic in init script check
Jim Fehlig
jfehlig at suse.com
Tue Jun 12 02:48:24 UTC 2018
The logic introduced in commit d1276646to check for init script type is
a bit flawed. If the init script type is specified, init_systemv is
always set to 'yes', even when '--with-init-script=systemd'. Split the
logic to only check for init script type when '--with-init-script=check'.
Signed-off-by: Jim Fehlig <jfehlig at suse.com>
---
configure.ac | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index c6b660e..9414440 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,10 +59,12 @@ AC_ARG_WITH([init_script],
[with_init_script=check])
init_systemv=no
init_systemd=no
-if test "$with_init_script" = check && type systemctl >/dev/null 2>&1; then
- init_systemd=yes
-else
- init_systemv=yes
+if test "$with_init_script" = check; then
+ if type systemctl >/dev/null 2>&1; then
+ init_systemd=yes
+ else
+ init_systemv=yes
+ fi
fi
case "${with_init_script}" in
systemv) init_systemv=yes;;
--
2.16.3
More information about the virt-tools-list
mailing list