masqmail
changeset 419:d209b4846f2b
The pid files goes to /var/run/masqmail.pid now. Added --with-piddir.
Now we can change the pid dir to /run on system that did this transition.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Tue, 29 May 2012 21:35:17 +0200 |
parents | 4cbaf6d6793f |
children | 09da6e72cd30 |
files | INSTALL Makefile.am Makefile.in aclocal.m4 config.h.in configure configure.ac man/Makefile.in src/Makefile.in src/base64/Makefile.in src/masqmail.c src/masqmail.h src/md5/Makefile.in |
diffstat | 13 files changed, 66 insertions(+), 24 deletions(-) [+] |
line diff
1.1 --- a/INSTALL Tue May 29 21:33:49 2012 +0200 1.2 +++ b/INSTALL Tue May 29 21:35:17 2012 +0200 1.3 @@ -88,14 +88,13 @@ 1.4 Check that 'make install' worked correctly. The following command: 1.5 1.6 ls -ld /usr/local/sbin/masqmail /etc/masqmail /var/log/masqmail/ \ 1.7 - /var/run/masqmail /var/spool/masqmail/ /var/spool/masqmail/* 1.8 + /var/spool/masqmail/ /var/spool/masqmail/* 1.9 1.10 should give output similar to 1.11 1.12 -rwsr-xr-x 1 root root 399356 May 10 12:34 /usr/local/sbin/masqmail 1.13 drwxr-xr-x 2 root root 4096 May 10 12:34 /etc/masqmail 1.14 drwxr-xr-x 2 mail mail 4096 May 10 12:34 /var/log/masqmail 1.15 - drwxr-xr-x 2 mail mail 4096 May 10 12:34 /var/run/masqmail 1.16 drwxr-xr-x 5 mail mail 4096 May 10 12:34 /var/spool/masqmail 1.17 drwxr-xr-x 2 mail mail 4096 May 10 12:34 /var/spool/masqmail/input 1.18 drwxr-xr-x 2 mail mail 4096 May 10 12:34 /var/spool/masqmail/lock
2.1 --- a/Makefile.am Tue May 29 21:33:49 2012 +0200 2.2 +++ b/Makefile.am Tue May 29 21:35:17 2012 +0200 2.3 @@ -2,9 +2,9 @@ 2.4 2.5 SUBDIRS = src man 2.6 2.7 -install-data-local: log_dir spool_dir uid_bit conf_dir tpl_dir run_dir doc_dir rmail 2.8 +install-data-local: log_dir spool_dir uid_bit conf_dir tpl_dir pid_dir doc_dir rmail 2.9 2.10 -uninstall-local: rm-rmail rm-doc_dir rm-tpl_dir rm-conf_dir rm-run_dir rm-spool_dir rm-log_dir 2.11 +uninstall-local: rm-rmail rm-doc_dir rm-tpl_dir rm-conf_dir rm-pid_dir rm-spool_dir rm-log_dir 2.12 2.13 2.14 conf_dir: 2.15 @@ -37,11 +37,11 @@ 2.16 rmdir $(DESTDIR)@docdir@ 2.17 2.18 2.19 -run_dir: 2.20 - install -d -o @with_user@ -g @with_group@ $(DESTDIR)/var/run/masqmail 2.21 +pid_dir: 2.22 + install -d $(DESTDIR)@with_piddir@ 2.23 2.24 -rm-run_dir: 2.25 - rm -rf $(DESTDIR)/var/run/masqmail 2.26 +rm-pid_dir: 2.27 + rm -rf $(DESTDIR)@with_piddir@ 2.28 2.29 2.30 log_dir: 2.31 @@ -73,5 +73,5 @@ 2.32 rm -f $(DESTDIR)@prefix@/sbin/rmail 2.33 2.34 2.35 -uid_bit: $(DESTDIR)@prefix@/sbin/masqmail 2.36 +uid_bit: 2.37 chmod u+s $(DESTDIR)@prefix@/sbin/masqmail
3.1 --- a/Makefile.in Tue May 29 21:33:49 2012 +0200 3.2 +++ b/Makefile.in Tue May 29 21:35:17 2012 +0200 3.3 @@ -200,6 +200,7 @@ 3.4 with_confdir = @with_confdir@ 3.5 with_group = @with_group@ 3.6 with_logdir = @with_logdir@ 3.7 +with_piddir = @with_piddir@ 3.8 with_spooldir = @with_spooldir@ 3.9 with_user = @with_user@ 3.10 EXTRA_DIST = examples docs man tpl devel 3.11 @@ -689,9 +690,9 @@ 3.12 uninstall uninstall-am uninstall-local 3.13 3.14 3.15 -install-data-local: log_dir spool_dir uid_bit conf_dir tpl_dir run_dir doc_dir rmail 3.16 +install-data-local: log_dir spool_dir uid_bit conf_dir tpl_dir pid_dir doc_dir rmail 3.17 3.18 -uninstall-local: rm-rmail rm-doc_dir rm-tpl_dir rm-conf_dir rm-run_dir rm-spool_dir rm-log_dir 3.19 +uninstall-local: rm-rmail rm-doc_dir rm-tpl_dir rm-conf_dir rm-pid_dir rm-spool_dir rm-log_dir 3.20 3.21 conf_dir: 3.22 install -d $(DESTDIR)@with_confdir@ 3.23 @@ -720,11 +721,11 @@ 3.24 ) 3.25 rmdir $(DESTDIR)@docdir@ 3.26 3.27 -run_dir: 3.28 - install -d -o @with_user@ -g @with_group@ $(DESTDIR)/var/run/masqmail 3.29 +pid_dir: 3.30 + install -d $(DESTDIR)@with_piddir@ 3.31 3.32 -rm-run_dir: 3.33 - rm -rf $(DESTDIR)/var/run/masqmail 3.34 +rm-pid_dir: 3.35 + rm -rf $(DESTDIR)@with_piddir@ 3.36 3.37 log_dir: 3.38 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_logdir@ 3.39 @@ -753,7 +754,7 @@ 3.40 rm-rmail: 3.41 rm -f $(DESTDIR)@prefix@/sbin/rmail 3.42 3.43 -uid_bit: $(DESTDIR)@prefix@/sbin/masqmail 3.44 +uid_bit: 3.45 chmod u+s $(DESTDIR)@prefix@/sbin/masqmail 3.46 3.47 # Tell versions [3.59,3.63) of GNU make to not export all variables.
4.1 --- a/aclocal.m4 Tue May 29 21:33:49 2012 +0200 4.2 +++ b/aclocal.m4 Tue May 29 21:35:17 2012 +0200 4.3 @@ -47,7 +47,8 @@ 4.4 # ---------------------------------- 4.5 AC_DEFUN([PKG_PROG_PKG_CONFIG], 4.6 [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 4.7 -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 4.8 +m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 4.9 +m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 4.10 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 4.11 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 4.12 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 4.13 @@ -93,7 +94,8 @@ 4.14 pkg_cv_[]$1="$$1" 4.15 elif test -n "$PKG_CONFIG"; then 4.16 PKG_CHECK_EXISTS([$3], 4.17 - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 4.18 + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 4.19 + test "x$?" != "x0" && pkg_failed=yes ], 4.20 [pkg_failed=yes]) 4.21 else 4.22 pkg_failed=untried 4.23 @@ -141,9 +143,9 @@ 4.24 AC_MSG_RESULT([no]) 4.25 _PKG_SHORT_ERRORS_SUPPORTED 4.26 if test $_pkg_short_errors_supported = yes; then 4.27 - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 4.28 + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 4.29 else 4.30 - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 4.31 + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 4.32 fi 4.33 # Put the nasty error message in config.log where it belongs 4.34 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
5.1 --- a/config.h.in Tue May 29 21:33:49 2012 +0200 5.2 +++ b/config.h.in Tue May 29 21:35:17 2012 +0200 5.3 @@ -128,6 +128,9 @@ 5.4 /* Define to the version of this package. */ 5.5 #undef PACKAGE_VERSION 5.6 5.7 +/* The pid file location */ 5.8 +#undef PID_DIR 5.9 + 5.10 /* Define as the return type of signal handlers (`int' or `void'). */ 5.11 #undef RETSIGTYPE 5.12
6.1 --- a/configure Tue May 29 21:33:49 2012 +0200 6.2 +++ b/configure Tue May 29 21:35:17 2012 +0200 6.3 @@ -606,6 +606,7 @@ 6.4 am__EXEEXT_TRUE 6.5 LTLIBOBJS 6.6 LIBOBJS 6.7 +with_piddir 6.8 with_confdir 6.9 with_spooldir 6.10 with_logdir 6.11 @@ -715,6 +716,7 @@ 6.12 with_logdir 6.13 with_spooldir 6.14 with_confdir 6.15 +with_piddir 6.16 ' 6.17 ac_precious_vars='build_alias 6.18 host_alias 6.19 @@ -1361,6 +1363,7 @@ 6.20 --with-logdir=DIR set log directory /var/log/masqmail 6.21 --with-spooldir=DIR set spool directory /var/spool/masqmail 6.22 --with-confdir=DIR directory for configuration /etc/masqmail 6.23 + --with-piddir=DIR directory for pid files /var/run 6.24 6.25 Some influential environment variables: 6.26 CC C compiler command 6.27 @@ -4244,6 +4247,7 @@ 6.28 6.29 6.30 6.31 + 6.32 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 6.33 if test -n "$ac_tool_prefix"; then 6.34 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. 6.35 @@ -4372,6 +4376,7 @@ 6.36 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 6.37 test $ac_status = 0; }; then 6.38 pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0" 2>/dev/null` 6.39 + test "x$?" != "x0" && pkg_failed=yes 6.40 else 6.41 pkg_failed=yes 6.42 fi 6.43 @@ -4388,6 +4393,7 @@ 6.44 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 6.45 test $ac_status = 0; }; then 6.46 pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0" 2>/dev/null` 6.47 + test "x$?" != "x0" && pkg_failed=yes 6.48 else 6.49 pkg_failed=yes 6.50 fi 6.51 @@ -4407,9 +4413,9 @@ 6.52 _pkg_short_errors_supported=no 6.53 fi 6.54 if test $_pkg_short_errors_supported = yes; then 6.55 - GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0" 2>&1` 6.56 + GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0" 2>&1` 6.57 else 6.58 - GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0" 2>&1` 6.59 + GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0" 2>&1` 6.60 fi 6.61 # Put the nasty error message in config.log where it belongs 6.62 echo "$GLIB_PKG_ERRORS" >&5 6.63 @@ -5288,6 +5294,22 @@ 6.64 6.65 6.66 6.67 + 6.68 +# Check whether --with-piddir was given. 6.69 +if test "${with_piddir+set}" = set; then : 6.70 + withval=$with_piddir; 6.71 +else 6.72 + with_piddir='/var/run' 6.73 + 6.74 +fi 6.75 + 6.76 + 6.77 +cat >>confdefs.h <<_ACEOF 6.78 +#define PID_DIR "${with_piddir}" 6.79 +_ACEOF 6.80 + 6.81 + 6.82 + 6.83 test "x$prefix" = xNONE && prefix="$ac_default_prefix" 6.84 6.85
7.1 --- a/configure.ac Tue May 29 21:33:49 2012 +0200 7.2 +++ b/configure.ac Tue May 29 21:35:17 2012 +0200 7.3 @@ -188,6 +188,15 @@ 7.4 AC_DEFINE_UNQUOTED(CONF_DIR, "${with_confdir}", [The configuration file location]) 7.5 AC_SUBST(with_confdir) 7.6 7.7 +dnl dir for pid files 7.8 +AC_ARG_WITH(piddir, 7.9 + [ --with-piddir=DIR directory for pid files [/var/run]], 7.10 + , 7.11 + with_piddir='/var/run' 7.12 + ) 7.13 +AC_DEFINE_UNQUOTED(PID_DIR, "${with_piddir}", [The pid file location]) 7.14 +AC_SUBST(with_piddir) 7.15 + 7.16 test "x$prefix" = xNONE && prefix="$ac_default_prefix" 7.17 7.18 dnl well, /me/ thought that autoconf should make things _easy_ ... -- oku
8.1 --- a/man/Makefile.in Tue May 29 21:33:49 2012 +0200 8.2 +++ b/man/Makefile.in Tue May 29 21:35:17 2012 +0200 8.3 @@ -172,6 +172,7 @@ 8.4 with_confdir = @with_confdir@ 8.5 with_group = @with_group@ 8.6 with_logdir = @with_logdir@ 8.7 +with_piddir = @with_piddir@ 8.8 with_spooldir = @with_spooldir@ 8.9 with_user = @with_user@ 8.10 man_MANS = masqmail.8 mservdetect.1 masqmail.conf.5 masqmail.route.5 masqmail.aliases.5 rmail.8
9.1 --- a/src/Makefile.in Tue May 29 21:33:49 2012 +0200 9.2 +++ b/src/Makefile.in Tue May 29 21:35:17 2012 +0200 9.3 @@ -231,6 +231,7 @@ 9.4 with_confdir = @with_confdir@ 9.5 with_group = @with_group@ 9.6 with_logdir = @with_logdir@ 9.7 +with_piddir = @with_piddir@ 9.8 with_spooldir = @with_spooldir@ 9.9 with_user = @with_user@ 9.10 SUBDIRS = base64 md5
10.1 --- a/src/base64/Makefile.in Tue May 29 21:33:49 2012 +0200 10.2 +++ b/src/base64/Makefile.in Tue May 29 21:35:17 2012 +0200 10.3 @@ -173,6 +173,7 @@ 10.4 with_confdir = @with_confdir@ 10.5 with_group = @with_group@ 10.6 with_logdir = @with_logdir@ 10.7 +with_piddir = @with_piddir@ 10.8 with_spooldir = @with_spooldir@ 10.9 with_user = @with_user@ 10.10 AM_CFLAGS = @CFLAGS@ @GLIB_CFLAGS@ -D_GNU_SOURCE
11.1 --- a/src/masqmail.c Tue May 29 21:33:49 2012 +0200 11.2 +++ b/src/masqmail.c Tue May 29 21:35:17 2012 +0200 11.3 @@ -146,7 +146,7 @@ 11.4 } 11.5 11.6 signal(SIGTERM, sigterm_handler); 11.7 - write_pidfile(PIDFILEDIR "/masqmail.pid"); 11.8 + write_pidfile(PID_DIR "/masqmail.pid"); 11.9 11.10 conf.do_verbose = FALSE; 11.11
12.1 --- a/src/masqmail.h Tue May 29 21:33:49 2012 +0200 12.2 +++ b/src/masqmail.h Tue May 29 21:35:17 2012 +0200 12.3 @@ -529,7 +529,9 @@ 12.4 12.5 #define CONF_FILE CONF_DIR"/masqmail.conf" 12.6 12.7 -#define PIDFILEDIR "/var/run/masqmail/" 12.8 +#ifndef PID_DIR 12.9 +#define PID_DIR "/var/run" 12.10 +#endif 12.11 12.12 #ifndef va_copy 12.13 #ifdef __va_copy
13.1 --- a/src/md5/Makefile.in Tue May 29 21:33:49 2012 +0200 13.2 +++ b/src/md5/Makefile.in Tue May 29 21:35:17 2012 +0200 13.3 @@ -169,6 +169,7 @@ 13.4 with_confdir = @with_confdir@ 13.5 with_group = @with_group@ 13.6 with_logdir = @with_logdir@ 13.7 +with_piddir = @with_piddir@ 13.8 with_spooldir = @with_spooldir@ 13.9 with_user = @with_user@ 13.10 AM_CFLAGS = @CFLAGS@ @GLIB_CFLAGS@ -D_GNU_SOURCE