Преглед изворни кода

Swap detection order of sysv-redhat and sysv-lsb

/lib/lsb/init-functions exists on Redhat system, but
/etc/init.d/functions does not on Debian-based systems, so
this should work better out-of-the-box.

Fixes #7
tags/1.2
Timo Röhling пре 10 година
родитељ
комит
9cd1faabb3
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3
    3
      CMakeLists.txt

+ 3
- 3
CMakeLists.txt Прегледај датотеку

@@ -19,12 +19,12 @@ if(NOT DEFINED INIT_FLAVOR)
19 19
     if(IS_DIRECTORY "${SYSCONF_DIR}/init" AND EXISTS "/lib/init/upstart-job")
20 20
         message(STATUS "Detected init flavor: upstart")
21 21
         set(INIT_FLAVOR "upstart" CACHE STRING "Init daemon of this system")
22
-    elseif(IS_DIRECTORY "${SYSCONF_DIR}/init.d" AND EXISTS "/lib/lsb/init-functions")
23
-        message(STATUS "Detected init flavor: sysv-lsb")
24
-        set(INIT_FLAVOR "sysv-lsb" CACHE STRING "Init daemon of this system")
25 22
     elseif(IS_DIRECTORY "${SYSCONF_DIR}/init.d" AND EXISTS "${SYSCONF_DIR}/init.d/functions")
26 23
         message(STATUS "Detected init flavor: sysv-redhat")
27 24
         set(INIT_FLAVOR "sysv-redhat" CACHE STRING "Init daemon of this system")
25
+    elseif(IS_DIRECTORY "${SYSCONF_DIR}/init.d" AND EXISTS "/lib/lsb/init-functions")
26
+        message(STATUS "Detected init flavor: sysv-lsb")
27
+        set(INIT_FLAVOR "sysv-lsb" CACHE STRING "Init daemon of this system")
28 28
     else()
29 29
         message(STATUS "Detected init flavor: none")
30 30
         message(STATUS "System startup files will not be installed")

Loading…
Откажи
Сачувај