SummaryRefsLogTreeCommitDiffStats
path: root/src/mcron/base.scm
diff options
context:
space:
mode:
authorMathieu Lirzin <mthl@gnu.org>2018-03-24 01:33:22 +0100
committerMathieu Lirzin <mthl@gnu.org>2018-03-24 01:33:22 +0100
commita1f9e3d7a765e7a057b6c2292cb0ccebe0c697d5 (patch)
tree5af1416c63282c8686eee3088d90a50fd2ff3d47 /src/mcron/base.scm
parent07017255a181114a9b1529aaa197e16b305910ba (diff)
downloadmcron-a1f9e3d7a765e7a057b6c2292cb0ccebe0c697d5.tar.gz
mcron-a1f9e3d7a765e7a057b6c2292cb0ccebe0c697d5.tar.bz2
mcron-a1f9e3d7a765e7a057b6c2292cb0ccebe0c697d5.zip
utils: Add 'get-user'
* src/mcron/utils.scm (get-user): New procedure. * src/mcron/job-specifier.scm (job): Use it. * src/mcron/base.scm (remove-user-jobs): Likewise.
Diffstat (limited to 'src/mcron/base.scm')
-rw-r--r--src/mcron/base.scm5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mcron/base.scm b/src/mcron/base.scm
index 8a3f5c3..951c1d7 100644
--- a/src/mcron/base.scm
+++ b/src/mcron/base.scm
@@ -28,6 +28,7 @@
(define-module (mcron base)
#:use-module (ice-9 match)
#:use-module (mcron environment)
+ #:use-module (mcron utils)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-2)
#:use-module (srfi srfi-9)
@@ -85,9 +86,7 @@ This procedure is deprecated."
(define* (remove-user-jobs user #:key (schedule %global-schedule))
"Remove user jobs from SCHEDULE belonging to USER. USER must be either a
username, a UID, or a passwd entry."
- (let ((user* (if (or (string? user) (integer? user))
- (getpw user)
- user)))
+ (let ((user* (get-user user)))
(set-schedule-user! schedule
(filter (lambda (job)
(not (eqv? (passwd:uid user*)