diff --git a/Makefile.am b/Makefile.am index 3c084f4..fc56307 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,7 +3,7 @@ ACLOCAL_AMFLAGS = -I config sbin_SCRIPTS = vrrp_switch.sh EXTRA_DIST = vrrp_switch.sh -AM_CPPFLAGS = $(DEBUG_OPTS) -DPATH="$(sbindir)" +AM_CPPFLAGS = $(DEBUG_OPTS) -DPATH="$(sbindir)" -DPATHRUN="$(localestatedir)/run" AM_CFLAGS = -Wall -W -Werror diff --git a/uvrrpd.h b/uvrrpd.h index 901d9ad..ef4048b 100644 --- a/uvrrpd.h +++ b/uvrrpd.h @@ -24,7 +24,7 @@ #include "bits.h" -#define PIDFILE_NAME "/var/run/uvrrpd_%d.pid" +#define PIDFILE_NAME stringify(PATHRUN) "/uvrrpd_%d.pid" /** * uvrrpd_control diff --git a/vrrp_options.c b/vrrp_options.c index 76cdf68..f7f3d56 100644 --- a/vrrp_options.c +++ b/vrrp_options.c @@ -58,9 +58,9 @@ static void vrrp_usage(void) " -6, --ipv6 IPv6 support, (only in VRRPv3)\n" " -a, --auth pass Simple text password (only in VRRPv2)\n" " -f, --foreground Execute uvrrpd in foreground\n" - " -s, --script Path of hook script (default /etc/uvrrpd/uvrrpd-switch.sh)\n" + " -s, --script Path of hook script (default "stringify(PATH)"/vrrp-switch.sh)\n" " -F --pidfile name Create pid file 'name'\n" - " Default /var/run/uvrrp_${vrid}.pid\n" + " Default "stringify(PATHRUN)"/uvrrp_${vrid}.pid\n" " -d, --debug\n" " -h, --help\n"); }