Project

General

Profile

Submit #2700 ยป 0001-Added-support-for-rcreload.patch

git patch - zcrownover, 07/17/2014 05:14 AM

View differences:

sbin/rcrun/Makefile
# $DragonFly: src/sbin/rcrun/Makefile,v 1.3 2007/10/13 23:51:32 swildner Exp $
SCRIPTS=rcrun.sh
SYMLINKS= \
rcrun ${BINDIR}/rcstart \
rcrun ${BINDIR}/rcstop \
rcrun ${BINDIR}/rcrestart \
rcrun ${BINDIR}/rcreload \
rcrun ${BINDIR}/rcvar \
rcrun ${BINDIR}/rclist \
rcrun ${BINDIR}/rcforce \
......
rcrun.8 rcone.8 \
rcrun.8 rclist.8 \
rcrun.8 rcrestart.8 \
rcrun.8 rcreload.8 \
rcrun.8 rcstart.8 \
rcrun.8 rcstop.8 \
rcrun.8 rcvar.8
sbin/rcrun/rcrun.8
.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd October 13, 2007
.Dd July 16, 2014
.Dt RCRUN 8
.Os
.Sh NAME
......
.Nm rcone ,
.Nm rcstop ,
.Nm rcrestart ,
.Nm rcreload ,
.Nm rcvar ,
.Nm rcdisable ,
.Nm rcenable ,
......
.Ar script ...
.Nm rcrestart
.Ar script ...
.Nm rcreload
.Ar script ...
.Nm rcvar
.Ar script ...
.Nm rcdisable
......
.Cm onestart ,
.Cm stop ,
.Cm restart ,
.Cm reload ,
and
.Cm rcvar
commands are just passed to the scripts.
......
.Nm rcone ,
.Nm rcstop ,
.Nm rcrestart ,
.Nm rcreload ,
.Nm rcvar ,
.Nm rcdisable ,
.Nm rcenable
sbin/rcrun/rcrun.sh
rcrestart)
arg=restart
;;
rcreload)
arg=reload
;;
rcvar)
arg=rcvar
;;
......
fi
done
;;
reload)
for tgt in $@; do
buildrclist $tgt
dep=`echo "$rclist" | tail -1`
if [ X$dep = X ]; then
echo "Unable to find keyword $tgt"
else
(sh $dep reload)
fi
done
;;
disable|enable)
if [ "$arg" = "enable" ]; then
mode=YES
......
*)
echo "usage: rcrun action rcscript1 ..."
echo " where 'action' is one of:"
echo " start|stop|restart|rcvar|list|forcestart|faststart|onestart"
echo " disable|enable"
echo " start|stop|restart|reload|rcvar|list|forcestart|faststart"
echo " onestart|disable|enable"
;;
esac
    (1-1/1)