From 7ff965d82842b02cc5e1b7ddaddea558c6cd28fc Mon Sep 17 00:00:00 2001 From: jilles Date: Sun, 27 Mar 2016 16:27:49 +0000 Subject: [PATCH] rc.d: Make msgs a proper rc.d script. PR: 207149 Reported by: Jonathan de Boyne Pollard --- 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 6031acc7337d..8bcc26c10729 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"