summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-09-02 17:28:30 -0400
committerLennart Poettering <lennart@poettering.net>2012-09-11 01:43:48 +0200
commitb51fc639f01ee6194af3e7e944a79accce474fe1 (patch)
tree66eecc6fd27a771a9d85cd79c5e05490de88df76
parent742a862bb803641b78a40f6b498486397a321294 (diff)
build-sys: perform autodetection of quota-tools binaries
Use AC_PATH_PROG to try and locate the quotaon and quotacheck binaries, falling back on hardcoded defaults when they can't be found.
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac3
-rw-r--r--units/.gitignore1
-rw-r--r--units/quotaon.service.in (renamed from units/quotaon.service)4
-rw-r--r--units/systemd-quotacheck.service.in2
5 files changed, 13 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index 135d9f8ab1..730db1d5a8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -382,6 +382,7 @@ EXTRA_DIST += \
units/debug-shell.service.in \
units/systemd-hibernate.service.in \
units/systemd-suspend.service.in \
+ units/quotaon.service.in \
introspect.awk \
man/custom-html.xsl
@@ -2794,6 +2795,9 @@ endif
EXTRA_DIST += \
units/systemd-quotacheck.service.in
+nodist_systemunit_DATA += \
+ units/quotaon.service
+
# ------------------------------------------------------------------------------
if ENABLE_RANDOMSEED
rootlibexec_PROGRAMS += \
@@ -3427,6 +3431,8 @@ SED_PROCESS = \
-e 's,@rootprefix\@,$(rootprefix),g' \
-e 's,@udevlibexecdir\@,$(udevlibexecdir),g' \
-e 's,@sushell\@,$(sushell),g' \
+ -e 's,@QUOTAON\@,$(QUOTAON),g' \
+ -e 's,@QUOTACHECK\@,$(QUOTACHECK),g' \
< $< > $@
units/%: units/%.in Makefile
diff --git a/configure.ac b/configure.ac
index f1b88384f1..b132499556 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,6 +64,9 @@ AC_PROG_GCC_TRADITIONAL
AC_PATH_PROG([M4], [m4])
AC_PATH_PROG([XSLTPROC], [xsltproc])
+AC_PATH_PROG([QUOTAON], [quotaon], [/sbin/quotaon])
+AC_PATH_PROG([QUOTACHECK], [quotacheck], [/sbin/quotacheck])
+
# gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
m4_ifdef([GTK_DOC_CHECK], [
GTK_DOC_CHECK([1.18],[--flavour no-tmpl])
diff --git a/units/.gitignore b/units/.gitignore
index de5117914d..74bff5431f 100644
--- a/units/.gitignore
+++ b/units/.gitignore
@@ -14,6 +14,7 @@
/rescue.service
/systemd-ask-password-wall.service
/systemd-quotacheck.service
+/quotaon.service
/systemd-fsck@.service
/systemd-fsck-root.service
/systemd-tmpfiles-clean.service
diff --git a/units/quotaon.service b/units/quotaon.service.in
index caaf12d9f7..49a50a7feb 100644
--- a/units/quotaon.service
+++ b/units/quotaon.service.in
@@ -11,9 +11,9 @@ Documentation=man:quotaon(8)
DefaultDependencies=no
After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-quotacheck.service
Before=local-fs.target shutdown.target
-ConditionPathExists=/sbin/quotaon
+ConditionPathExists=@QUOTAON@
[Service]
Type=oneshot
RemainAfterExit=yes
-ExecStart=/sbin/quotaon -aug
+ExecStart=@QUOTAON@ -aug
diff --git a/units/systemd-quotacheck.service.in b/units/systemd-quotacheck.service.in
index 319a3ced48..f726ea1bcd 100644
--- a/units/systemd-quotacheck.service.in
+++ b/units/systemd-quotacheck.service.in
@@ -11,7 +11,7 @@ Documentation=man:systemd-quotacheck.service(8)
DefaultDependencies=no
After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service
Before=local-fs.target shutdown.target
-ConditionPathExists=/sbin/quotacheck
+ConditionPathExists=@QUOTACHECK@
[Service]
Type=oneshot