Fix #4410, make sure that "ssh root@host -C service salt-minio restart" will return.

This commit is contained in:
C. R. Oldham 2013-10-25 17:20:10 -06:00
parent ee5ddb4972
commit 5c58d4f245

View File

@ -65,11 +65,22 @@ start() {
fi
else
if [ $(pidofproc $PROCESS) ]; then
RETVAL=$?
echo -n "already running"
RETVAL=$?
echo -n "already running"
else
daemon --check $SERVICE $SALTMINION -d $MINION_ARGS
RETVAL=$?
# The RHEL 'daemon' function doesn't redirect stdout/err
# quite right, executing 'service salt-minion start' as a one-off
# over ssh like 'ssh root@ip -C service salt-minion start'
# will not return.
# daemon --check $SERVICE $SALTMINION -d $MINION_ARGS
# RETVAL=$?
if $PYTHON $SALTMINION -d $MINION_ARGS >& /dev/null; then
echo_success
RETVAL=0
else
RETVAL=$?
fi
fi
fi
echo