Bug 155006 - [patch] named(8): /etc/rc.d/named might set wrong pid file
Summary: [patch] named(8): /etc/rc.d/named might set wrong pid file
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 8.1-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Doug Barton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-24 16:00 UTC by Helmut Schneider
Modified: 2011-07-22 22:41 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Schneider 2011-02-24 16:00:19 UTC
According to "man named 8" the default pid file is /var/run/named/named.pid. /etc/rc.d/named says:

pidfile="${named_pidfile:-/var/run/named/pid}"

There might be a reason for it but if not /etc/rc.d/named should state:

pidfile="${named_pidfile:-/var/run/named/${name}.pid}

Fix: 

-pidfile="${named_pidfile:-/var/run/named/pid}"
+pidfile="${named_pidfile:-/var/run/named/${name}.pid}"
 named_confdir="${named_chrootdir}${named_conf%/*}"

 run_rc_command "$1"--vDdHv5Uovh1GVb4pGC2c8o7jFR45krpd0jEkU5gb785dQW8T
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- /etc/rc.d/named.org 2011-02-24 16:43:08.000000000 +0100
+++ /etc/rc.d/named     2011-02-24 16:43:37.000000000 +0100
@@ -279,7 +279,7 @@
 #
 required_dirs="$named_chrootdir"       # if it is set, it must exist
Comment 1 Jaakko Heinonen freebsd_committer freebsd_triage 2011-06-08 15:37:04 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-rc

Reclassify and assign.
Comment 2 Doug Barton freebsd_committer freebsd_triage 2011-07-17 04:50:19 UTC
Responsible Changed
From-To: freebsd-rc->dougb


I'll fix the man page
Comment 3 dfilter service freebsd_committer freebsd_triage 2011-07-17 05:09:09 UTC
dougb       2011-07-17 04:08:59 UTC

  FreeBSD ports repository

  Modified files:
    dns/bind96           Makefile 
    dns/bind97           Makefile 
    dns/bind98           Makefile 
  Log:
  Fix the location of the default pid file in named.8
  
  Problem pointed out in the PR
  
  PR:             conf/155006
  Submitted by:   Helmut Schneider <jumper99@gmx.de>
  
  Revision  Changes    Path
  1.117     +1 -0      ports/dns/bind96/Makefile
  1.19      +1 -0      ports/dns/bind97/Makefile
  1.10      +1 -0      ports/dns/bind98/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 dfilter service freebsd_committer freebsd_triage 2011-07-17 05:10:21 UTC
Author: dougb
Date: Sun Jul 17 04:10:00 2011
New Revision: 224122
URL: http://svn.freebsd.org/changeset/base/224122

Log:
  Fix the location of the default pid file in named.8
  
  Problem pointed out in the PR
  
  PR:		conf/155006
  Submitted by:	Helmut Schneider <jumper99@gmx.de>

Modified:
  head/usr.sbin/named/Makefile

Modified: head/usr.sbin/named/Makefile
==============================================================================
--- head/usr.sbin/named/Makefile	Sun Jul 17 03:44:05 2011	(r224121)
+++ head/usr.sbin/named/Makefile	Sun Jul 17 04:10:00 2011	(r224122)
@@ -57,7 +57,8 @@ LDADD+=		${BIND_LDADD} ${CRYPTO_LDADD} $
 
 MAN=		named.8 lwresd.8 named.conf.5
 
-MANFILTER=	sed -e "s@/etc/named\.conf@/etc/namedb/named.conf@g"
+MANFILTER=	sed -e "s@/etc/named\.conf@/etc/namedb/named.conf@g" \
+		-e "s@/var\/run\/named\/named.pid@/var/run/named/pid@"
 
 LINKS=		${BINDIR}/named ${BINDIR}/lwresd
 
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 5 Doug Barton freebsd_committer freebsd_triage 2011-07-17 05:10:34 UTC
State Changed
From-To: open->patched


I fixed the location in the ports, and patched src/usr.sbin/named/Makefile 
in r224122. 

The default path and file name have been the way they are in FreeBSD for 
a long time, so the appropriate solution is to fix the documentation, not 
to change the path.
Comment 6 Doug Barton freebsd_committer freebsd_triage 2011-07-22 22:41:00 UTC
State Changed
From-To: patched->closed


The change has been MFC'ed