From 75a4a592e5ccda30715f93563d741b83e0dcf39e Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Mon, 25 Apr 2011 13:37:00 +0000 Subject: Slackware 13.37 Mon Apr 25 13:37:00 UTC 2011 Slackware 13.37 x86_64 stable is released! Thanks to everyone who pitched in on this release: the Slackware team, the folks producing upstream code, and linuxquestions.org for providing a great forum for collaboration and testing. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. As always, thanks to the Slackware community for testing, suggestions, and feedback. :-) Have fun! --- source/n/bind/rc.bind | 54 +++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'source/n/bind/rc.bind') diff --git a/source/n/bind/rc.bind b/source/n/bind/rc.bind index 966670e3b..6d77d73d9 100644 --- a/source/n/bind/rc.bind +++ b/source/n/bind/rc.bind @@ -1,35 +1,35 @@ #!/bin/sh # Start/stop/restart the BIND name server daemon (named). -# Start bind. In the past it was more secure to run BIND -# as a non-root user (for example, with '-u daemon'), but -# the modern version of BIND knows how to use the kernel's -# capability mechanism to drop all root privileges except -# the ability to bind() to a privileged port and set process -# resource limits, so -u should not be needed. If you wish -# to use it anyway, chown the /var/run/named directory to -# the non-root user. -# + +# Start bind. In the past it was more secure to run BIND as a non-root +# user (for example, with '-u daemon'), but the modern version of BIND +# knows how to use the kernel's capability mechanism to drop all root +# privileges except the ability to bind() to a privileged port and set +# process resource limits, so -u should not be needed. If you wish to +# use it anyway, chown the /var/run/named and /var/named directories to +# the non-root user. The command options can be set like this in +# /etc/default/named : +# NAMED_OPTIONS="-u daemon" +# So you will not have to edit this script. # You might also consider running BIND in a "chroot jail", # a discussion of which may be found in # /usr/doc/Linux-HOWTOs/Chroot-BIND-HOWTO. -# One last note: rndc has a lot of other nice features that -# it is not within the scope of this start/stop/restart script -# to support. For more details, see "man rndc" or just type -# "rndc" to see the options. +# One last note: rndc has a lot of other nice features that it is not +# within the scope of this start/stop/restart script to support. +# For more details, see "man rndc" or just type "rndc" to see the options. +# Load command defaults: +if [ -f /etc/default/named ] ; then . /etc/default/named ; fi +if [ -f /etc/default/rndc ] ; then . /etc/default/rndc ; fi -# Sanity check. If either /usr/sbin/named or /etc/named.conf -# aren't ready, it doesn't make much sense to try to run this -# script: +# Sanity check. If /usr/sbin/named is missing then it +# doesn't make much sense to try to run this script: if [ ! -x /usr/sbin/named ]; then echo "/etc/rc.d/rc.bind: no /usr/sbin/named found (or not executable); cannot start." exit 1 -elif [ ! -f /etc/named.conf ]; then - echo "/etc/rc.d/rc.bind: no /etc/named.conf found; cannot start /usr/sbin/named." - exit 1 fi # Start BIND. As many times as you like. ;-) @@ -37,14 +37,14 @@ fi # running or you'll get more than one copy running. bind_start() { if [ -x /usr/sbin/named ]; then - echo "Starting BIND: /usr/sbin/named" - /usr/sbin/named + echo "Starting BIND: /usr/sbin/named $NAMED_OPTIONS" + /usr/sbin/named $NAMED_OPTIONS sleep 1 fi if ! ps axc | grep -q named ; then echo "WARNING: named did not start." - echo "Attempting to start named again: /usr/sbin/named" - /usr/sbin/named + echo "Attempting to start named again: /usr/sbin/named $NAMED_OPTIONS" + /usr/sbin/named $NAMED_OPTIONS sleep 1 if ps axc | grep -q named ; then echo "SUCCESS: named started." @@ -57,8 +57,8 @@ bind_start() { # Stop all running copies of BIND (/usr/sbin/named): bind_stop() { - echo "Stopping BIND: /usr/sbin/rndc stop" - /usr/sbin/rndc stop + echo "Stopping BIND: /usr/sbin/rndc $RDNC_OPTIONS stop" + /usr/sbin/rndc $RDNC_OPTIONS stop # A problem with using "/usr/sbin/rndc stop" is that if you # managed to get multiple copies of named running it will # only stop one of them and then can't stop the others even @@ -76,7 +76,7 @@ bind_stop() { # Reload BIND: bind_reload() { - /usr/sbin/rndc reload + /usr/sbin/rndc $RDNC_OPTIONS reload } # Restart BIND: @@ -87,7 +87,7 @@ bind_restart() { # Get BIND status: bind_status() { - /usr/sbin/rndc status + /usr/sbin/rndc $RDNC_OPTIONS status } case "$1" in -- cgit v1.2.3