diff options
Diffstat (limited to 'gnu/services/mcron.scm')
-rw-r--r-- | gnu/services/mcron.scm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gnu/services/mcron.scm b/gnu/services/mcron.scm index 045d6e2fe8..bd4e6e7410 100644 --- a/gnu/services/mcron.scm +++ b/gnu/services/mcron.scm @@ -67,12 +67,21 @@ #~(begin (use-modules (guix build utils)) + (call-with-output-file "prologue" + (lambda (port) + ;; This prologue allows 'mcron --schedule' to + ;; proceed no matter what #:user option is passed + ;; to 'job'. + (write '(set! getpw + (const (getpwuid (getuid)))) + port))) + (call-with-output-file "job" (lambda (port) (write '#$job port))) (invoke #+(file-append mcron "/bin/mcron") - "--schedule=20" "job") + "--schedule=20" "prologue" "job") (copy-file "job" #$output))) #:options '(#:env-vars (("COLUMNS" . "150"))))) |