summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/services/admin.scm21
1 files changed, 15 insertions, 6 deletions
diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm
index edd8ce59da..fa2407ed84 100644
--- a/gnu/services/admin.scm
+++ b/gnu/services/admin.scm
@@ -22,7 +22,7 @@
(define-module (gnu services admin)
#:use-module (gnu packages admin)
#:use-module ((gnu packages base)
- #:select (canonical-package findutils))
+ #:select (canonical-package findutils coreutils sed))
#:use-module (gnu packages certs)
#:use-module (gnu packages package-management)
#:use-module (gnu services)
@@ -330,11 +330,20 @@ is passed to the @option{--prunepaths} option of
(package schedule excluded-directories)
(let ((updatedb (program-file
"updatedb"
- #~(execl #$(file-append package "/bin/updatedb")
- "updatedb"
- #$(string-append "--prunepaths="
- (string-join
- excluded-directories))))))
+ #~(begin
+ ;; 'updatedb' is a shell script that expects various
+ ;; commands in $PATH.
+ (setenv "PATH"
+ (string-append #$package "/bin:"
+ #$(canonical-package coreutils)
+ "/bin:"
+ #$(canonical-package sed)
+ "/bin"))
+ (execl #$(file-append package "/bin/updatedb")
+ "updatedb"
+ #$(string-append "--prunepaths="
+ (string-join
+ excluded-directories)))))))
(list #~(job #$schedule #$updatedb)))))
(define file-database-service-type