aboutsummaryrefslogtreecommitdiff
path: root/dns
diff options
context:
space:
mode:
authorErwin Lansing <erwin@FreeBSD.org>2013-11-22 13:41:34 +0000
committerErwin Lansing <erwin@FreeBSD.org>2013-11-22 13:41:34 +0000
commit5340a9fcadf1794e2755248273b88a7a851f7094 (patch)
tree42027387c228c14f984d16a3fcb63e93f5969166 /dns
parent4230709751cd92db90ef5adb7e94cf3744cd756f (diff)
Fix startup script.
PR: 184159 [1] Submitted by: Pawel Biernacki <pawel.biernacki@gmail.com> [1], Trond Endrestoel <Trond.Endrestol@ximalas.info> (private email)
Notes
Notes: svn path=/head/; revision=334593
Diffstat (limited to 'dns')
-rw-r--r--dns/bind96/Makefile1
-rw-r--r--dns/bind96/files/named18
-rw-r--r--dns/bind98/Makefile1
-rw-r--r--dns/bind98/files/named18
-rw-r--r--dns/bind99/Makefile2
-rw-r--r--dns/bind99/files/named24
6 files changed, 36 insertions, 28 deletions
diff --git a/dns/bind96/Makefile b/dns/bind96/Makefile
index e2c6368174ad..9838947ff644 100644
--- a/dns/bind96/Makefile
+++ b/dns/bind96/Makefile
@@ -2,6 +2,7 @@
PORTNAME= bind96
PORTVERSION= 9.6.3.2.ESV.R10
+PORTREVISION= 1
CATEGORIES= dns net ipv6
MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= bind9/${ISCVERSION}
diff --git a/dns/bind96/files/named b/dns/bind96/files/named
index 337fdcca1ef8..777ec1688572 100644
--- a/dns/bind96/files/named
+++ b/dns/bind96/files/named
@@ -19,15 +19,15 @@ start_postcmd="named_poststart"
reload_cmd="named_reload"
stop_cmd="named_stop"
-named_enable="NO" # Run named, the DNS server (or NO).
-named_program="/usr/local/sbin/named" # Path to named, if you want a different one.
-named_conf="/usr/local/etc/namedb/named.conf" # Path to the configuration file
-#named_flags="" # Use this for flags OTHER than -u and -c
-named_uid="bind" # User to run named as
-named_wait="NO" # Wait for working name service before exiting
-named_wait_host="localhost" # Hostname to check if named_wait is enabled
-named_auto_forward="NO" # Set up forwarders from /etc/resolv.conf
-named_auto_forward_only="NO" # Do "forward only" instead of "forward first"
+named_enable=${named_enable:-"NO"} # Run named, the DNS server (or NO).
+named_program=${named_program:-"/usr/local/sbin/named"} # Path to named, if you want a different one.
+named_conf=${named_conf:-"/usr/local/etc/namedb/named.conf"} # Path to the configuration file
+named_flags=${named_flags:-""} # Use this for flags OTHER than -u and -c
+named_uid=${named_uid:-"bind"} # User to run named as
+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_poststart() {
if checkyesno named_wait; then
diff --git a/dns/bind98/Makefile b/dns/bind98/Makefile
index 27983c7b405e..f786679feb72 100644
--- a/dns/bind98/Makefile
+++ b/dns/bind98/Makefile
@@ -2,6 +2,7 @@
PORTNAME= bind98
PORTVERSION= 9.8.6
+PORTREVISION= 1
CATEGORIES= dns net ipv6
MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= bind9/${ISCVERSION}
diff --git a/dns/bind98/files/named b/dns/bind98/files/named
index 20e94d021a1d..777ec1688572 100644
--- a/dns/bind98/files/named
+++ b/dns/bind98/files/named
@@ -19,15 +19,15 @@ start_postcmd="named_poststart"
reload_cmd="named_reload"
stop_cmd="named_stop"
-named_enable="NO" # Run named, the DNS server (or NO).
-named_program="%%PREFIX%%/sbin/named" # Path to named, if you want a different one.
-named_conf="%%BIND_DESTETC%%/named.conf" # Path to the configuration file
-#named_flags="" # Use this for flags OTHER than -u and -c
-named_uid="bind" # User to run named as
-named_wait="NO" # Wait for working name service before exiting
-named_wait_host="localhost" # Hostname to check if named_wait is enabled
-named_auto_forward="NO" # Set up forwarders from /etc/resolv.conf
-named_auto_forward_only="NO" # Do "forward only" instead of "forward first"
+named_enable=${named_enable:-"NO"} # Run named, the DNS server (or NO).
+named_program=${named_program:-"/usr/local/sbin/named"} # Path to named, if you want a different one.
+named_conf=${named_conf:-"/usr/local/etc/namedb/named.conf"} # Path to the configuration file
+named_flags=${named_flags:-""} # Use this for flags OTHER than -u and -c
+named_uid=${named_uid:-"bind"} # User to run named as
+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_poststart() {
if checkyesno named_wait; then
diff --git a/dns/bind99/Makefile b/dns/bind99/Makefile
index f8d216a08d0f..8aba221a0d85 100644
--- a/dns/bind99/Makefile
+++ b/dns/bind99/Makefile
@@ -2,7 +2,7 @@
PORTNAME?= bind99
PORTVERSION= 9.9.4
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES= dns net ipv6
MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= bind9/${ISCVERSION}
diff --git a/dns/bind99/files/named b/dns/bind99/files/named
index bda049462f92..777ec1688572 100644
--- a/dns/bind99/files/named
+++ b/dns/bind99/files/named
@@ -19,15 +19,15 @@ start_postcmd="named_poststart"
reload_cmd="named_reload"
stop_cmd="named_stop"
-named_enable="NO" # Run named, the DNS server (or NO).
-named_program="%%PREFIX%%/sbin/named" # Path to named, if you want a different one.
-named_conf="%%BIND_DESTETC%%/named.conf" # Path to the configuration file
-#named_flags="" # Use this for flags OTHER than -u and -c
-named_uid="bind" # User to run named as
-named_wait="NO" # Wait for working name service before exiting
-named_wait_host="localhost" # Hostname to check if named_wait is enabled
-named_auto_forward="NO" # Set up forwarders from /etc/resolv.conf
-named_auto_forward_only="NO" # Do "forward only" instead of "forward first"
+named_enable=${named_enable:-"NO"} # Run named, the DNS server (or NO).
+named_program=${named_program:-"/usr/local/sbin/named"} # Path to named, if you want a different one.
+named_conf=${named_conf:-"/usr/local/etc/namedb/named.conf"} # Path to the configuration file
+named_flags=${named_flags:-""} # Use this for flags OTHER than -u and -c
+named_uid=${named_uid:-"bind"} # User to run named as
+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_poststart() {
if checkyesno named_wait; then
@@ -92,6 +92,12 @@ named_prestart()
warn 'named_pidfile: now determined from the conf file'
fi
+ echo ${pidfile%/pid}
+ if [ ! -d ${pidfile%/pid} ]; then
+ mkdir -p ${pidfile%/pid}
+ chown ${named_uid}:${named_uid} ${pidfile%/pid}
+ fi
+
command_args="-u ${named_uid:=root}"
if [ ! "$named_conf" = '/etc/namedb/named.conf' ]; then