Exit with the status of FreeRADIUS for debugging
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 24 Jan 2015 08:44:24 +0000 (15:44 +0700)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 24 Jan 2015 08:47:59 +0000 (15:47 +0700)
debian/freeradius.init
redhat/freeradius-radiusd-init
suse/rcradiusd

index 73c742f..91ec2f1 100755 (executable)
@@ -90,7 +90,7 @@ case "$1" in
             echo "$PROGRAM already running; for live debugging see raddebug(8)"
             exit 151
         fi
-        $PROGRAM -X $FREERADIUS_OPTIONS
+        $PROGRAM -X $FREERADIUS_OPTIONS || exit $?
         ;;
 
     debug-threaded)
@@ -99,7 +99,7 @@ case "$1" in
             echo "$PROGRAM already running; for live debugging see raddebug(8)"
             exit 151
         fi
-        $PROGRAM -f -xx -l stdout $FREERADIUS_OPTIONS
+        $PROGRAM -f -xx -l stdout $FREERADIUS_OPTIONS || exit $?
         ;;
 
     status)
index f8f35ce..2919372 100755 (executable)
@@ -166,7 +166,7 @@ case "$1" in
         else
             log_success_msg
         fi
-        $exec -X -d $config_dir
+        $exec -X -d $config_dir || exit $?
         ;;
 
     debug-threaded)
@@ -177,7 +177,7 @@ case "$1" in
         else
             log_success_msg
         fi
-        $exec -f -xx -l stdout -d $config_dir
+        $exec -f -xx -l stdout -d $config_dir || exit $?
         ;;
 
     status)
index 8e52ff7..cb73614 100644 (file)
@@ -114,22 +114,20 @@ case "$1" in
         $0 status
         if [ $? -eq 0 ]; then
             echo -n "$prog already running; for live debugging see raddebug(8)"
-            rc_failed 151
-            rc_exit
+            exit 151
         fi
-        $exec -X -d "$config_dir"
-        rc_status -v
+        $exec -X -d "$config_dir" || exit $?
+        exit 0
         ;;
 
     debug-threaded)
         $0 status
         if [ $? -eq 0 ]; then
             echo -n "$prog already running; for live debugging see raddebug(8)"
-            rc_failed 151
-            rc_exit
+            exit 151
         fi
-        $exec -f -xx -l stdout -d "$config_dir"
-        rc_status -v
+        $exec -f -xx -l stdout -d "$config_dir" || exit $?
+        exit 0
         ;;
 
     *)