Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Mar 2014 17:25:17 +0000 (UTC)
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r349162 - in head/dns: bind98 bind98/files bind99 bind99/files
Message-ID:  <201403251725.s2PHPHlq002031@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mat
Date: Tue Mar 25 17:25:17 2014
New Revision: 349162
URL: http://svnweb.freebsd.org/changeset/ports/349162
QAT: https://qat.redports.org/buildarchive/r349162/

Log:
  Finaly pet rclint.
  
  With help from:	crees
  Sponsored by:	Absolight

Modified:
  head/dns/bind98/Makefile
  head/dns/bind98/files/named.in
  head/dns/bind99/Makefile
  head/dns/bind99/files/named.in

Modified: head/dns/bind98/Makefile
==============================================================================
--- head/dns/bind98/Makefile	Tue Mar 25 17:17:22 2014	(r349161)
+++ head/dns/bind98/Makefile	Tue Mar 25 17:25:17 2014	(r349162)
@@ -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}

Modified: head/dns/bind98/files/named.in
==============================================================================
--- head/dns/bind98/files/named.in	Tue Mar 25 17:17:22 2014	(r349161)
+++ head/dns/bind98/files/named.in	Tue Mar 25 17:25:17 2014	(r349162)
@@ -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 
 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"

Modified: head/dns/bind99/Makefile
==============================================================================
--- head/dns/bind99/Makefile	Tue Mar 25 17:17:22 2014	(r349161)
+++ head/dns/bind99/Makefile	Tue Mar 25 17:25:17 2014	(r349162)
@@ -2,7 +2,7 @@
 
 PORTNAME=	bind
 PORTVERSION=	9.9.5
-PORTREVISION=	6
+PORTREVISION=	7
 CATEGORIES=	dns net ipv6
 MASTER_SITES=	${MASTER_SITE_ISC}
 MASTER_SITE_SUBDIR=	bind9/${ISCVERSION}

Modified: head/dns/bind99/files/named.in
==============================================================================
--- head/dns/bind99/files/named.in	Tue Mar 25 17:17:22 2014	(r349161)
+++ head/dns/bind99/files/named.in	Tue Mar 25 17:25:17 2014	(r349162)
@@ -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 
 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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403251725.s2PHPHlq002031>