37c7a4c
From: Peter Lemenkov <lemenkov@gmail.com>
37c7a4c
Date: Sun, 13 Feb 2011 14:21:20 +0300
a81d5c8
Subject: [PATCH] More directories to search for place for init-script
37c7a4c
37c7a4c
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
37c7a4c
37c7a4c
diff --git a/configure.ac b/configure.ac
a75f831
index 103f029..0c36065 100644
37c7a4c
--- a/configure.ac
37c7a4c
+++ b/configure.ac
a75f831
@@ -528,17 +528,23 @@ launchd_enabled=false
37c7a4c
 
37c7a4c
 if test "$use_init" = "yes"; then
37c7a4c
    AC_MSG_CHECKING(location of init directory)
37c7a4c
-   if test -d /etc/rc.d; then
37c7a4c
+   if test -d /etc/rc.d/init.d; then
37c7a4c
        init_enabled=true
37c7a4c
-       AC_SUBST([initdir], ['${sysconfdir}/rc.d'])
37c7a4c
+       AC_SUBST([initdir], ['${sysconfdir}/rc.d/init.d'])
37c7a4c
        AC_MSG_RESULT(${initdir})
37c7a4c
    else
37c7a4c
-       if test -d /etc/init.d; then
37c7a4c
+       if test -d /etc/rc.d; then
37c7a4c
            init_enabled=true
37c7a4c
-           AC_SUBST([initdir], ['${sysconfdir}/init.d'])
37c7a4c
+           AC_SUBST([initdir], ['${sysconfdir}/rc.d'])
37c7a4c
            AC_MSG_RESULT(${initdir})
37c7a4c
        else
37c7a4c
-           AC_MSG_RESULT(not found)
37c7a4c
+           if test -d /etc/init.d; then
37c7a4c
+              init_enabled=true
37c7a4c
+              AC_SUBST([initdir], ['${sysconfdir}/init.d'])
37c7a4c
+              AC_MSG_RESULT(${initdir})
37c7a4c
+           else
37c7a4c
+              AC_MSG_RESULT(not found)
37c7a4c
+           fi
37c7a4c
        fi
37c7a4c
     fi
37c7a4c
 fi