diff options
author | mtm <mtm@FreeBSD.org> | 2003-01-12 04:53:54 +0000 |
---|---|---|
committer | mtm <mtm@FreeBSD.org> | 2003-01-12 04:53:54 +0000 |
commit | 6b0993779549416b2b76645c33285c3d5f992493 (patch) | |
tree | 8f3412ffc3cffa01fdac5b41b888c187ea2a076e /etc | |
parent | d780a8e4ec7278df96a51bf2a94de46d27ab9177 (diff) | |
download | FreeBSD-src-6b0993779549416b2b76645c33285c3d5f992493.zip FreeBSD-src-6b0993779549416b2b76645c33285c3d5f992493.tar.gz |
Fix the named script to find the correct pid file for the
named(8) daemon by providing a new rc.conf knob: named_pidfile
that defaults to the path specified in the system-installed named.conf(5).
Approved by: markm (mentor)
Reviewed by: dougb
Noticed by : Galen Sampson <galen_sampson@yahoo.com>
Dan Pelleg <daniel+bsd@pelleg.org>
PR: conf/46402
MFC: 2 weeks (with re@ approval)
Diffstat (limited to 'etc')
-rw-r--r-- | etc/defaults/rc.conf | 1 | ||||
-rwxr-xr-x | etc/rc.d/named | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 791d2cd..99ed8d4 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -136,6 +136,7 @@ named_rcng="NO" # XXX Temporary. Enable to use new rc named_enable="NO" # Run named, the DNS server (or NO). named_program="/usr/sbin/named" # path to named, if you want a different one. named_flags="-u bind -g bind" # Flags for named +named_pidfile="/var/run/named/pid" # Pid file named_chrootdir="" # Chroot directory (or "" not to auto-chroot it) named_chroot_autoupdate="YES" # Automatically install/update chrooted # components of named. See /etc/rc.d/named. diff --git a/etc/rc.d/named b/etc/rc.d/named index 0bd5cac..db1dd5d 100755 --- a/etc/rc.d/named +++ b/etc/rc.d/named @@ -14,7 +14,6 @@ name="named" rcvar=`set_rcvar` command="/usr/sbin/${name}" -pidfile="/var/run/${name}.pid" start_precmd="named_precmd" required_dirs="$named_chrootdir" # if it is set, it must exist extra_commands="reload" @@ -72,7 +71,7 @@ chroot_autoupdate() # make_symlinks() { - ln -fs "${named_chrootdir}/var/run/named.pid" /var/run/named.pid + ln -fs "${named_chrootdir}${named_pidfile}" ${named_pidfile} ln -fs "${named_chrootdir}/var/run/ndc" /var/run/ndc } @@ -120,5 +119,6 @@ load_rc_config $name # The following variable requires that rc.conf be loaded first # required_dirs="$named_chrootdir" # if it is set, it must exist +pidfile="${named_pidfile:-/var/run/${name}/pid}" run_rc_command "$1" |