[vhostmd] configure: fix logic in init script check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
---
 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

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux