fix issue #26161: on RedHat family systems touch /var/lock/subsys/$SERVICE to ensure the daemon will be stopped on shutdown.

This commit is contained in:
Bastiaan Bakker 2015-08-17 11:11:12 +02:00
parent bcca1b4c5a
commit a83a5de41e
4 changed files with 30 additions and 2 deletions

View File

@ -73,7 +73,10 @@ start() {
RETVAL=1
else
daemon --pidfile=$PID_FILE --check $SERVICE $SALTAPI $CONFIG_ARGS
RETVAL=0
RETVAL=$?
[ $RETVAL = 0 ] && touch /var/lock/subsys/$SERVICE
echo
return $RETVAL
fi
fi
RETVAL=$?
@ -97,6 +100,10 @@ stop() {
fi
else
killproc $PROCESS
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/$SERVICE
return $RETVAL
fi
RETVAL=$?
echo

View File

@ -64,6 +64,10 @@ start() {
fi
else
daemon --check $SERVICE $SALTMASTER -d $MASTER_ARGS
RETVAL=$?
[ $RETVAL = 0 ] && touch /var/lock/subsys/$SERVICE
echo
return $RETVAL
fi
RETVAL=$?
echo
@ -86,6 +90,10 @@ stop() {
fi
else
killproc $PROCESS
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/$SERVICE
return $RETVAL
fi
RETVAL=$?
echo

View File

@ -69,6 +69,10 @@ start() {
echo -n "already running"
else
daemon --check $SERVICE $SALTMINION -d $MINION_ARGS
RETVAL=$?
[ $RETVAL = 0 ] && touch /var/lock/subsys/$SERVICE
echo
return $RETVAL
fi
fi
RETVAL=$?
@ -94,6 +98,7 @@ stop() {
else
killproc $PROCESS
RETVAL=$?
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/$SERVICE
# tidy up any rogue processes:
PROCS=`ps -ef | grep "$SALTMINION" | grep -v grep | awk '{print $2}'`
if [ -n "$PROCS" ]; then

View File

@ -65,6 +65,10 @@ start() {
fi
else
daemon --check $SERVICE $SALTSYNDIC -d $SYNDIC_ARGS
RETVAL=$?
[ $RETVAL = 0 ] && touch /var/lock/subsys/$SERVICE
echo
return $RETVAL
fi
RETVAL=$?
echo
@ -87,6 +91,10 @@ stop() {
fi
else
killproc $PROCESS
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/$SERVICE
return $RETVAL
fi
RETVAL=$?
echo