Added --enable-no-vixie-clobber to configure.ac.

This commit is contained in:
Dale Mellor 2010-06-13 03:49:39 +01:00
commit 323033546d
3 changed files with 47 additions and 19 deletions

View file

@ -1,4 +1,17 @@
2008-02-21 Dale Mellor <Dale Mellor <dale_mellor@users.sourceforge.net> 2010-06-13 Dale Mellor <dale_mellor@users.sourceforge.net>
* configure.ac: added --enable-no-vixie-clobber argument to
configure so that the root user can avoid overwriting a legacy
cron installation.
* mcron.1: added simple, minimal man page using help2man (the
texinfo file is still the primary documentation source).
* makefile.am: replaced use of mkinstalldirs with install; the
former is not supplied with the latest automake (1.11).
2008-02-21 Dale Mellor <dale_mellor@users.sourceforge.net>
* ALL FILES: Replaced version 2 GPL notices with version 3 ones. * ALL FILES: Replaced version 2 GPL notices with version 3 ones.
@ -8,7 +21,8 @@
* configure.ac: Bumped version to 1.0.4. * configure.ac: Bumped version to 1.0.4.
2008-01-25 Dale Mellor <Dale Mellor <dale_mellor@users.sourceforge.net>
2008-01-25 Dale Mellor <dale_mellor@users.sourceforge.net>
* main.scm (command-type): Files which are listed on the command * main.scm (command-type): Files which are listed on the command
line are assumed to be guile configurations if they do not end in line are assumed to be guile configurations if they do not end in
@ -26,7 +40,7 @@
* Version is currently at 1.0.3. * Version is currently at 1.0.3.
2005-09-02 hydro23 <Dale Mellor <dale_mellor@users.sourceforge.net> 2005-09-02 Dale Mellor <dale_mellor@users.sourceforge.net>
* makefile.am, mcron.c.template (main): Modified install-exec-hook * makefile.am, mcron.c.template (main): Modified install-exec-hook
so that a proper installation of a Vixie-compatible cron only so that a proper installation of a Vixie-compatible cron only

View file

@ -105,6 +105,18 @@ fi
SENDMAIL=$ac_cv_prog_SENDMAIL SENDMAIL=$ac_cv_prog_SENDMAIL
# Find out if we are avoiding Vixie.
AC_MSG_CHECKING([whether to avoid clobbering a Vixie installation])
AC_ARG_ENABLE(no-vixie-clobber,
AC_HELP_STRING([--enable-no-vixie-clobber],
[do not install with program names that would override a legacy cron installation]),
NO_VIXIE_CLOBBER=$enableval,
NO_VIXIE_CLOBBER=[no])
AC_MSG_RESULT($NO_VIXIE_CLOBBER)
AC_SUBST(NO_VIXIE_CLOBBER)
# Configure the various files that mcron uses at runtime. # Configure the various files that mcron uses at runtime.
AC_MSG_CHECKING([which spool directory to use]) AC_MSG_CHECKING([which spool directory to use])

View file

@ -63,7 +63,7 @@ fpp = $(DESTDIR)$(bindir)/@real_program_prefix@
install-exec-hook: install-exec-hook:
@if [ "`id -u`" -eq "0" ]; then \ @if [ "x@NO_VIXIE_CLOBBER@" != "xyes" -a "`id -u`" -eq "0" ]; then \
rm -f $(fpp)cron$(EXEEXT) > /dev/null 2>&1; \ rm -f $(fpp)cron$(EXEEXT) > /dev/null 2>&1; \
$(INSTALL) --mode='u=rwx' mcron$(EXEEXT) $(fpp)cron$(EXEEXT); \ $(INSTALL) --mode='u=rwx' mcron$(EXEEXT) $(fpp)cron$(EXEEXT); \
rm -f $(fpp)crontab$(EXEEXT) > /dev/null 2>&1; \ rm -f $(fpp)crontab$(EXEEXT) > /dev/null 2>&1; \
@ -72,6 +72,8 @@ install-exec-hook:
$(INSTALL) -d --mode='u=rwx,og=rx' /var/run; \ $(INSTALL) -d --mode='u=rwx,og=rx' /var/run; \
$(INSTALL) -d --mode='u=rwx,og=rx' @GUILE_SITE@; \ $(INSTALL) -d --mode='u=rwx,og=rx' @GUILE_SITE@; \
$(INSTALL) -d --mode='u=rwx,og=rx' @GUILE_SITE@/mcron; \ $(INSTALL) -d --mode='u=rwx,og=rx' @GUILE_SITE@/mcron; \
elif [ "x@NO_VIXIE_CLOBBER@" = "xyes" ]; then \
echo "Not installing Vixie-style programs"; \
else \ else \
echo "+++ WARNING: NON-ROOT INSTALL: ONLY mcron WILL BE INSTALLED, NOT ANY OF THE VIXIE REPLACEMENT PROGRAMS"; \ echo "+++ WARNING: NON-ROOT INSTALL: ONLY mcron WILL BE INSTALLED, NOT ANY OF THE VIXIE REPLACEMENT PROGRAMS"; \
fi fi