From: Vincent Bernat Date: Wed, 7 May 2014 11:21:50 +0000 (+0200) Subject: configure: make default PID location configurable X-Git-Tag: 0.7.9~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5133ce2fc2b9b2d148a7c786c9b36b0b7f2c6c33;p=thirdparty%2Flldpd.git configure: make default PID location configurable Also, document those changes in NEWS as using `localstatedir` may move stuff from `/var` to `/usr/local/var`. Closes #64. --- diff --git a/NEWS b/NEWS index ece3f6ae..2697fcc6 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,12 @@ +lldpd (0.7.9) + * Changes: + + Default location for chroot, socket and PID are now configurable + in `./configure`. The default location is based on the value of + `runstatedir` which in turn may be based on the value of + `localstatedir` which defaults to `/usr/local/var`. Therefore, + to get the previous locations, lldpd should be configured with + `./configure --localstatedir=/var`. + lldpd (0.7.8) * Fixes: + Don't hard-code default values for system name, system diff --git a/configure.ac b/configure.ac index 8823f54a..0878ca06 100644 --- a/configure.ac +++ b/configure.ac @@ -234,6 +234,7 @@ if test "x$runstatedir" = x; then fi lldp_ARG_WITH([privsep-chroot], [Which directory to use to chroot lldpd], [${runstatedir}/lldpd]) lldp_ARG_WITH([lldpd-ctl-socket], [Path to socket for communication with lldpd], [${runstatedir}/lldpd.socket]) +lldp_ARG_WITH([lldpd-pid-file], [Path to lldpd PID file], [${runstatedir}/lldpd.pid]) # CDP/FDP/EDP/SONMP lldp_ARG_ENABLE([cdp], [Cisco Discovery Protocol], [yes]) diff --git a/src/daemon/lldpd.h b/src/daemon/lldpd.h index f2b5f1f4..b9c451d1 100644 --- a/src/daemon/lldpd.h +++ b/src/daemon/lldpd.h @@ -73,7 +73,6 @@ struct event_base; #define LLDPD_TTL LLDPD_TX_INTERVAL * LLDPD_TX_HOLD #define LLDPD_TX_MSGDELAY 1 #define LLDPD_MAX_NEIGHBORS 4 -#define LLDPD_PID_FILE "/var/run/lldpd.pid" #define LLDPD_FAST_TX_INTERVAL 1 #define LLDPD_FAST_INIT 4