On Sun, Sep 7, 2014 at 2:23 PM, Sergey Zhmylove k...@cs.ifmo.ru wrote:
Hello!
Please can you tell me, what should I do if I wanna propose a small patch
for dns/dnrd rc script?
I've read porters-handbook and there is recommendation to use this e-mail
list.
Smth like this:
--- dnrd2014-09-07 22:25:56.036338143 +0400
+++ dnrd.new2014-09-07 23:16:46.223328451 +0400
@@ -22,6 +22,8 @@
load_rc_config ${name}
+command_args=$dnrd_args
+
case $1 in
stop)
echo Stopping dnrd.
If you want the user to add additional args when starting the script,
they just need to use dnrd_flags.
command_args is used mostly for when you want the script to always use
these args when starting the service.
Also, the 'case $1 in .. esac' statement (shown above), shouldn't be
needed if you use stop_cmd:
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: dnrd
# REQUIRE: DAEMON NETWORKING SERVERS
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable dnrd:
#
# dnrd_enable=YES
# override these variables in /etc/rc.conf
dnrd_enable=${dnrd_enable-NO}
# you may also define dnrd_flags to specify additional args to start
dnrd with in /etc/rc.conf..
. /etc/rc.subr
name=dnrd
rcvar=dnrd_enable
stop_cmd=dnrd_stop
command=%%PREFIX%%/sbin/${name}
pidfile=/var/run/${name}.pid
dnrd_stop() {
${command} -k
}
load_rc_config ${name}
run_rc_command $1
The current script will try to stop dnrd, even when it is not running.
This has the benefit of not trying to stop dnrd when it is not
enabled.
--
DISCLAIMER:
No electrons were maimed while sending this message. Only slightly bruised.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org