aboutsummaryrefslogtreecommitdiffstats
path: root/dns/bind98
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2014-03-26 01:25:17 +0800
committermat <mat@FreeBSD.org>2014-03-26 01:25:17 +0800
commit058a57a97dd87f3b531ed9bbe523a1486aa14dce (patch)
tree7408e6d728237b9a38e3ce654647228283ddd051 /dns/bind98
parent69323e35371ecf071ce3e7e0e373a9e25da3523f (diff)
downloadfreebsd-ports-graphics-058a57a97dd87f3b531ed9bbe523a1486aa14dce.tar.gz
freebsd-ports-graphics-058a57a97dd87f3b531ed9bbe523a1486aa14dce.tar.zst
freebsd-ports-graphics-058a57a97dd87f3b531ed9bbe523a1486aa14dce.zip
Finaly pet rclint.
With help from: crees Sponsored by: Absolight
Diffstat (limited to 'dns/bind98')
-rw-r--r--dns/bind98/Makefile2
-rw-r--r--dns/bind98/files/named.in37
2 files changed, 16 insertions, 23 deletions
diff --git a/dns/bind98/Makefile b/dns/bind98/Makefile
index 0118ffa9175..d657a877d51 100644
--- a/dns/bind98/Makefile
+++ b/dns/bind98/Makefile
@@ -2,7 +2,7 @@
PORTNAME= bind
PORTVERSION= 9.8.7
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= dns net ipv6
MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= bind9/${ISCVERSION}
diff --git a/dns/bind98/files/named.in b/dns/bind98/files/named.in
index 3488f2d2af1..a96865fa04f 100644
--- a/dns/bind98/files/named.in
+++ b/dns/bind98/files/named.in
@@ -10,15 +10,17 @@
. /etc/rc.subr
-name="named"
+name=named
rcvar=named_enable
-extra_commands="reload"
+load_rc_config $name
+
+extra_commands=reload
-start_precmd="named_prestart"
-start_postcmd="named_poststart"
-reload_cmd="named_reload"
-stop_cmd="named_stop"
+start_precmd=named_prestart
+start_postcmd=named_poststart
+reload_cmd="${command%/named}/rndc reload"
+stop_cmd=named_stop
named_enable=${named_enable:-"NO"} # Run named, the DNS server (or NO).
named_program=${named_program:-"%%PREFIX%%/sbin/named"} # Path to named, if you want a different one.
@@ -29,8 +31,10 @@ named_wait=${named_wait:-"NO"} # Wait for working name service before exiting
named_wait_host=${named_wait_host:-"localhost"} # Hostname to check if named_wait is enabled
named_auto_forward=${named_auto_forward:-"NO"} # Set up forwarders from /etc/resolv.conf
named_auto_forward_only=${named_auto_forward_only:-"NO"} # Do "forward only" instead of "forward first"
+named_confdir="${named_conf%/*}" # Not a configuration directive but makes rclint happy.
-named_poststart() {
+named_poststart()
+{
if checkyesno named_wait; then
until ${command%/sbin/named}/bin/host $named_wait_host >/dev/null 2>&1; do
echo " Waiting for nameserver to resolve $named_wait_host"
@@ -39,11 +43,6 @@ named_poststart() {
fi
}
-named_reload()
-{
- ${command%/named}/rndc reload
-}
-
find_pidfile()
{
if get_pidfile_from_conf pid-file $named_conf; then
@@ -76,13 +75,12 @@ named_stop()
fi
}
-create_file() {
+create_file()
+{
if [ -e "$1" ]; then
unlink $1
fi
- > $1
- chown root:wheel $1
- chmod 644 $1
+ install -u root -g wheel -m 0644 /dev/null $1
}
named_prestart()
@@ -95,8 +93,7 @@ named_prestart()
echo ${pidfile%/pid}
if [ ! -d ${pidfile%/pid} ]; then
- mkdir -p ${pidfile%/pid}
- chown ${named_uid}:${named_uid} ${pidfile%/pid}
+ install -d -u ${named_uid} -g ${named_uid} ${pidfile%/pid}
fi
command_args="-u ${named_uid:=root} -c $named_conf $command_args"
@@ -197,8 +194,4 @@ named_prestart()
$checkconf $named_conf || err 3 'named-checkconf for $named_conf failed'
}
-load_rc_config $name
-
-named_confdir="${named_conf%/*}"
-
run_rc_command "$1"