Zhang Huangbin avatar Zhang Huangbin committed ff8a66f

Fixed: Incorrect return values of service status in rc scripts on Linux.
Thanks Marek Skubela <marek.skubela _at_ gmail> for the report.

Comments (0)

Files changed (5)

 iRedAPD-1.4.1:
     * Fixed:
+        + Incorrect return values of service status in rc scripts on Linux.
+          Thanks Marek Skubela <marek.skubela _at_ gmail> for the report.
         + Don't return DUNNO if sender address has less than 6 characters.
           Thanks warriornew for the report in our bbs.
         + Incorrect variable name in plugins/sql_alias_access_policy.py.

rc_scripts/iredapd.debian

 
         if [ X"$s" == X"running" ]; then
             echo "${PROG} is running."
+            exit 0
         else
             echo "${PROG} is stopped."
+            exit 1
         fi
     else
         echo "${PROG} is stopped."
+        exit 3
     fi
-    unset s
 }
 
 case "$1" in

rc_scripts/iredapd.freebsd

 
         if [ X"$s" == X"running" ]; then
             echo "${name} is running."
+            exit 0
         else
             echo "${name} is stopped."
+            exit 1
         fi
     else
         echo "${name} is stopped."
+        exit 3
     fi
-    unset s
 }
 
 empty(){

rc_scripts/iredapd.opensuse

 
         if [ X"$s" == X"running" ]; then
             echo "${PROG} is running."
+            exit 0
         else
             echo "${PROG} is stopped."
+            exit 1
         fi
     else
         echo "${PROG} is stopped."
+        exit 3
     fi
-    unset s
 }
 
 case "$1" in

rc_scripts/iredapd.rhel

 
         if [ X"$s" == X"running" ]; then
             echo "${PROG} is running."
+            exit 0
         else
             echo "${PROG} is stopped."
+            exit 1
         fi
     else
         echo "${PROG} is stopped."
+        exit 3
     fi
-    unset s
 }
 
 case "$1" in
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.