autofs-5.0.5 - add piddir to configure From: Ian Kent In order to accomodate possible changes or different pid file locations add directory selection for pid file directory to configure. Also update the fifo directory and flag file directory configure checks. --- CHANGELOG | 1 + Makefile.conf.in | 3 +++ aclocal.m4 | 20 ++++++++++++++++++-- configure | 4 ++-- redhat/Makefile | 1 + redhat/autofs.init.in | 4 ++-- samples/Makefile | 2 +- 7 files changed, 28 insertions(+), 7 deletions(-) --- autofs-5.0.6.orig/CHANGELOG +++ autofs-5.0.6/CHANGELOG @@ -16,6 +16,7 @@ - fix ipv6 name lookup check. - fix ipv6 rpc calls. - fix ipv6 configure check. +- add piddir to configure. 28/06/2011 autofs-5.0.6 ----------------------- --- autofs-5.0.6.orig/Makefile.conf.in +++ autofs-5.0.6/Makefile.conf.in @@ -79,6 +79,9 @@ autofsconfdir = @confdir@ # Location for autofs maps autofsmapdir = @mapdir@ +# Localtion of pid files +autofspiddir = @piddir@ + # Location for autofs fifos autofsfifodir = @fifodir@ --- autofs-5.0.6.orig/aclocal.m4 +++ autofs-5.0.6/aclocal.m4 @@ -121,13 +121,29 @@ AC_DEFUN(AF_MAP_D, fi]) dnl -------------------------------------------------------------------------- +dnl AF_PID_D +dnl +dnl Check the location of the pid file directory. +dnl -------------------------------------------------------------------------- +AC_DEFUN(AF_PID_D, +[if test -z "$piddir"; then + for pid_d in /run /var/run /tmp; do + if test -z "$piddir"; then + if test -d "$pid_d"; then + piddir="$pid_d" + fi + fi + done +fi]) + +dnl -------------------------------------------------------------------------- dnl AF_FIFO_D dnl dnl Check the location of the autofs fifos directory dnl -------------------------------------------------------------------------- AC_DEFUN(AF_FIFO_D, [if test -z "$fifodir"; then - for fifo_d in /var/run /tmp; do + for fifo_d in /run /var/run /tmp; do if test -z "$fifodir"; then if test -d "$fifo_d"; then fifodir="$fifo_d" @@ -143,7 +159,7 @@ dnl Check the location of the autofs fla dnl -------------------------------------------------------------------------- AC_DEFUN(AF_FLAG_D, [if test -z "$flagdir"; then - for flag_d in /var/run /tmp; do + for flag_d in /run /var/run /tmp; do if test -z "$flagdir"; then if test -d "$flag_d"; then flagdir="$flag_d" --- autofs-5.0.6.orig/configure +++ autofs-5.0.6/configure @@ -2184,7 +2184,7 @@ $as_echo "$mapdir" >&6; } # The user can specify --with-fifodir=PATH to specify where autofs fifos go # if test -z "$fifodir"; then - for fifo_d in /var/run /tmp; do + for fifo_d in /run /var/run /tmp; do if test -z "$fifodir"; then if test -d "$fifo_d"; then fifodir="$fifo_d" @@ -2214,7 +2214,7 @@ $as_echo "$fifodir" >&6; } # The user can specify --with-flagdir=PATH to specify where autofs flag file goes # if test -z "$flagdir"; then - for flag_d in /var/run /tmp; do + for flag_d in /run /var/run /tmp; do if test -z "$flagdir"; then if test -d "$flag_d"; then flagdir="$flag_d" --- autofs-5.0.6.orig/redhat/Makefile +++ autofs-5.0.6/redhat/Makefile @@ -8,6 +8,7 @@ autofs.init: autofs.init.in sed -e "s|@@sbindir@@|$(sbindir)|g" \ -e "s|@@autofslibdir@@|$(autofslibdir)|g" \ -e "s|@@autofsconfdir@@|$(autofsconfdir)|g" \ + -e "s|@@autofspiddir@@|$(autofspiddir)|g" \ -e "s|@@initdir@@|$(initdir)|g" < autofs.init.in > autofs.init autofs.sysconfig: autofs.sysconfig.in --- autofs-5.0.6.orig/redhat/autofs.init.in +++ autofs-5.0.6/redhat/autofs.init.in @@ -86,7 +86,7 @@ function start() { fi echo -n $"Starting $prog: " - $prog $OPTIONS --pid-file /var/run/autofs.pid + $prog $OPTIONS --pid-file @@autofspiddir@@/autofs.pid RETVAL=$? if [ $RETVAL -eq 0 ] ; then success "$prog startup" @@ -171,7 +171,7 @@ case "$1" in stop ;; status) - status -p /var/run/autofs.pid -l autofs $prog + status -p @@autofspiddir@@/autofs.pid -l autofs $prog ;; restart|force-reload) restart --- autofs-5.0.6.orig/samples/Makefile +++ autofs-5.0.6/samples/Makefile @@ -21,7 +21,7 @@ dirs: install -d -m 755 $(INSTALLROOT)$(autofsmapdir) install -d -m 755 $(INSTALLROOT)$(autofsconfdir) install -d -m 755 $(INSTALLROOT)$(autofslibdir) - install -d -m 755 $(INSTALLROOT)/var/run/autofs + install -d -m 755 $(INSTALLROOT)$(autofspiddir) .PHONY: autofs.init autofs.init: