From dfba72ced54b802091de19bf9e41309cf1c05da8 Mon Sep 17 00:00:00 2001 From: Zach Crownover Date: Thu, 17 Jul 2014 04:26:11 -0700 Subject: [PATCH] Added support for rcreload Updated the man page date and links to account for the new symlink to rcrun as well as add it in to the rcrun.sh based on the restart entry. --- sbin/rcrun/Makefile | 4 ++-- sbin/rcrun/rcrun.8 | 7 ++++++- sbin/rcrun/rcrun.sh | 18 ++++++++++++++++-- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/sbin/rcrun/Makefile b/sbin/rcrun/Makefile index a2e7f3d..020bce8 100644 --- a/sbin/rcrun/Makefile +++ b/sbin/rcrun/Makefile @@ -1,10 +1,9 @@ -# $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 \ @@ -21,6 +20,7 @@ MLINKS= rcrun.8 rcdisable.8 \ 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 diff --git a/sbin/rcrun/rcrun.8 b/sbin/rcrun/rcrun.8 index 49b579a..89dd088 100644 --- a/sbin/rcrun/rcrun.8 +++ b/sbin/rcrun/rcrun.8 @@ -28,7 +28,7 @@ .\" 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 @@ -39,6 +39,7 @@ .Nm rcone , .Nm rcstop , .Nm rcrestart , +.Nm rcreload , .Nm rcvar , .Nm rcdisable , .Nm rcenable , @@ -59,6 +60,8 @@ .Ar script ... .Nm rcrestart .Ar script ... +.Nm rcreload +.Ar script ... .Nm rcvar .Ar script ... .Nm rcdisable @@ -81,6 +84,7 @@ The .Cm onestart , .Cm stop , .Cm restart , +.Cm reload , and .Cm rcvar commands are just passed to the scripts. @@ -121,6 +125,7 @@ If no argument is specified, the status of all scripts is shown. .Nm rcone , .Nm rcstop , .Nm rcrestart , +.Nm rcreload , .Nm rcvar , .Nm rcdisable , .Nm rcenable diff --git a/sbin/rcrun/rcrun.sh b/sbin/rcrun/rcrun.sh index 485f4bf..903ece1 100644 --- a/sbin/rcrun/rcrun.sh +++ b/sbin/rcrun/rcrun.sh @@ -128,6 +128,9 @@ rcstop) rcrestart) arg=restart ;; +rcreload) + arg=reload + ;; rcvar) arg=rcvar ;; @@ -193,6 +196,17 @@ restart) 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 @@ -249,7 +263,7 @@ list) *) 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 -- 2.0.0