summaryrefslogtreecommitdiffstats
path: root/etc/rc.subr
diff options
context:
space:
mode:
Diffstat (limited to 'etc/rc.subr')
-rw-r--r--etc/rc.subr7
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/rc.subr b/etc/rc.subr
index 2d879e6..349daee 100644
--- a/etc/rc.subr
+++ b/etc/rc.subr
@@ -492,8 +492,8 @@ run_rc_command()
_pidcmd=
_procname=${procname:-${command}}
- # setup pid check command if not fast
- if [ -z "$rc_fast" -a -n "$_procname" ]; then
+ # setup pid check command
+ if [ -n "$_procname" ]; then
if [ -n "$pidfile" ]; then
_pidcmd='rc_pid=$(check_pidfile '"$pidfile $_procname $command_interpreter"')'
else
@@ -586,7 +586,7 @@ run_rc_command()
;;
start)
- if [ -n "$rc_pid" ]; then
+ if [ -z "$rc_fast" -a -n "$rc_pid" ]; then
echo "${name} already running? (pid=$rc_pid)."
exit 1
fi
@@ -671,6 +671,7 @@ $command $rc_flags $command_args"
stop)
if [ -z "$rc_pid" ]; then
+ [ -n "$rc_fast" ] && exit 0
if [ -n "$pidfile" ]; then
echo \
"${name} not running? (check $pidfile)."
OpenPOWER on IntegriCloud