From aa67fa4329c6cf0853a8aa60f2bee30edf66f75c Mon Sep 17 00:00:00 2001 From: jilles Date: Sun, 9 Oct 2016 21:28:56 +0000 Subject: [PATCH] MFC r297314: rc.d: Make msgs a proper rc.d script. PR: 207149 Reported by: Jonathan de Boyne Pollard git-svn-id: svn://svn.freebsd.org/base/stable/10@306924 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- etc/rc.d/msgs | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/etc/rc.d/msgs b/etc/rc.d/msgs index 6031acc73..8bcc26c10 100755 --- a/etc/rc.d/msgs +++ b/etc/rc.d/msgs @@ -6,8 +6,20 @@ # PROVIDE: msgs # REQUIRE: LOGIN -# Make a bounds file for msgs(1) if there isn't one already -# -if [ -d /var/msgs -a ! -f /var/msgs/bounds -a ! -L /var/msgs/bounds ]; then - echo 0 > /var/msgs/bounds -fi +. /etc/rc.subr + +name="msgs" +start_cmd="msgs_start" +stop_cmd=":" + +msgs_start() +{ + # Make a bounds file for msgs(1) if there isn't one already + # + if [ -d /var/msgs -a ! -f /var/msgs/bounds -a ! -L /var/msgs/bounds ]; then + echo 0 > /var/msgs/bounds + fi +} + +load_rc_config $name +run_rc_command "$1" -- 2.42.0