diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-03-23 18:57:22 -0700 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2018-08-05 14:59:40 -0400 |
commit | a2df58945c232186c96ffa8958f555ed33965ff7 (patch) | |
tree | ec38d5ead15d3a05dc20e9ab09defbd11e44db79 /configure.ac | |
parent | a089aec341997945ad2906414c39c09761a788b7 (diff) | |
download | e2fsprogs-a2df58945c232186c96ffa8958f555ed33965ff7.tar.gz |
e2scrub: add service (cron, systemd) support
Add the ability to run the e2scrub utilities as a periodically scheduled
system service.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 74 |
1 files changed, 73 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 33da6e38..7763aae7 100644 --- a/configure.ac +++ b/configure.ac @@ -1393,7 +1393,8 @@ else libdir=$libdir/$withval root_libdir=$root_libdir/$withval fi -)dnl +) +dnl dnl dnl See if -static works. This could fail if the linker does not dnl support -static, or if required external libraries are not available @@ -1515,6 +1516,77 @@ AC_SUBST(have_udev) AC_SUBST(pkg_udev_rules_dir) dnl +dnl Where do cron jobs go? +dnl +AC_ARG_WITH([crond_dir], + [AS_HELP_STRING([--with-crond-dir@<:@=DIR@:>@], + [Install system crontabs into DIR.])], + [], + [with_crond_dir=yes]) +AS_IF([test "x${with_crond_dir}" != "xno"], + [ + AS_IF([test "x${with_crond_dir}" = "xyes"], + [ + AS_IF([test -d "/etc/cron.d"], + [with_crond_dir="/etc/cron.d"]) + ]) + AC_MSG_CHECKING([for system crontab dir]) + crond_dir="${with_crond_dir}" + AS_IF([test -n "${crond_dir}"], + [ + AC_MSG_RESULT(${crond_dir}) + have_crond="yes" + ], + [ + AC_MSG_RESULT(no) + have_crond="no" + ]) + ], + [ + have_crond="disabled" + ]) +AC_SUBST(have_crond) +AC_SUBST(crond_dir) + +dnl +dnl Where do systemd services go? +dnl +AC_ARG_WITH([systemd_unit_dir], + [AS_HELP_STRING([--with-systemd-unit-dir@<:@=DIR@:>@], + [Install systemd system units into DIR.])], + [], + [with_systemd_unit_dir=yes]) +AS_IF([test "x${with_systemd_unit_dir}" != "xno"], + [ + AS_IF([test "x${with_systemd_unit_dir}" = "xyes"], + [ + PKG_CHECK_MODULES([systemd], [systemd], + [ + with_systemd_unit_dir="$($PKG_CONFIG --variable=systemdsystemunitdir systemd)" + ], [ + with_systemd_unit_dir="" + ]) + m4_pattern_allow([^PKG_(MAJOR|MINOR|BUILD|REVISION)$]) + ]) + AC_MSG_CHECKING([for systemd system unit dir]) + systemd_system_unit_dir="${with_systemd_unit_dir}" + AS_IF([test -n "${systemd_system_unit_dir}"], + [ + AC_MSG_RESULT(${systemd_system_unit_dir}) + have_systemd="yes" + ], + [ + AC_MSG_RESULT(no) + have_systemd="no" + ]) + ], + [ + have_systemd="disabled" + ]) +AC_SUBST(have_systemd) +AC_SUBST(systemd_system_unit_dir) + +dnl dnl Make our output files, being sure that we create the some miscellaneous dnl directories dnl |