Bug 183 - make location of pidfile configurable
make location of pidfile configurable
Status: RESOLVED FIXED
Product: unbound
Classification: Unclassified
Component: server
unspecified
All Linux
: P2 enhancement
Assigned To: unbound team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-28 09:41 CEST by Klaus Singvogel
Modified: 2008-06-09 17:08 CEST (History)
2 users (show)

See Also:


Attachments
patch for configure.ac (1.40 KB, patch)
2008-05-28 16:24 CEST, Klaus Singvogel
Details | Diff
patch for doc/example.conf (1.07 KB, patch)
2008-05-28 16:26 CEST, Klaus Singvogel
Details | Diff
configure patch (1.41 KB, patch)
2008-05-28 16:42 CEST, Klaus Singvogel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Singvogel 2008-05-28 09:41:58 CEST
The Filesystem Hierarchy Standard (FHS) see: http://www.pathname.com/fhs/pub/fhs-2.3.html
has defined where to locate pidfiles:
- either /var/lock if they were used for locking
- or /var/run if they were previously stored in /etc
- but no more in /etc

As I'm working on unbound for our distribution, I've to respect this FHS when building packages.

I noticed that unbound is using "--sysconfdir" as the location of pidfile, which is equal to "/etc/" (in most distributions). Can location of pidfiles been made more configurable to honor the FHS?
Comment 1 Klaus Singvogel 2008-05-28 14:29:28 CEST
Ok, it was my fault - in a way.

The "--sysconfdir" was misleading to me. It's uncommon use to specify the runtime directory via this name, let me stumble over its unusual way.

Maybe it would be less error prone, to use a different configure variable to specify its location?
Having a look at different packages, like "squid", "(x)ntp", "openssh" or just at "bind": it seems that none let specify this runtime directory via configure.

Maybe the use of "/var/lib/unbound" without configure call instead, is a common practice?

Nevertheless. However this will be solved, please fix the example configuration file in the runtime environment later; otherwise users might run into trouble.
Change in file "doc/example.conf" every occurrance of "/usr/local/etc/unbound/" to "$(ug_dir)" via configure. A rename of "doc/example.conf" to "doc/example.conf.in" might help either. :-)
Comment 2 Klaus Singvogel 2008-05-28 16:24:37 CEST
Created attachment 67 [details]
patch for configure.ac

I enhanced the configure as described
Comment 3 Klaus Singvogel 2008-05-28 16:26:37 CEST
Created attachment 68 [details]
patch for doc/example.conf

doc/example.conf has to be renamed too
Comment 4 Klaus Singvogel 2008-05-28 16:42:53 CEST
Created attachment 69 [details]
configure patch

sorry, but I forgot the quotes on first try. :-(
Comment 5 Wouter Wijngaards 2008-06-09 17:08:43 CEST
Fix in trunk r1114. Also you can set the run-dir and chroot-dir using configure, and it puts the correct values into the manual pages as well.

Thank you for the patches,
   Wouter