SummaryRefsLogTreeCommitDiffStats
path: root/crontab.scm
diff options
context:
space:
mode:
authordale_mellor <dale_mellor>2003-07-05 12:13:19 +0000
committerdale_mellor <dale_mellor>2003-07-05 12:13:19 +0000
commit62b040336328d99ade41776bd52b1d7cd7298629 (patch)
tree501d06d9af92555884a0820214a2634bde8a36e9 /crontab.scm
parent3725aedd02d9b24c1239610066dd62387ef4d5a9 (diff)
downloadmcron-62b040336328d99ade41776bd52b1d7cd7298629.tar.gz
mcron-62b040336328d99ade41776bd52b1d7cd7298629.tar.bz2
mcron-62b040336328d99ade41776bd52b1d7cd7298629.zip
Disabled installation of cron, crontab by default. Fixed up all information files to reflect this.0.99.1
Diffstat (limited to 'crontab.scm')
-rw-r--r--crontab.scm19
1 files changed, 8 insertions, 11 deletions
diff --git a/crontab.scm b/crontab.scm
index 417a900..f7bcf2a 100644
--- a/crontab.scm
+++ b/crontab.scm
@@ -82,8 +82,7 @@
;; Iff the real user is root, he can use the -u option to access files of
;; another user.
-(define crontab-user
- (option-ref options 'user crontab-real-user))
+(define crontab-user (option-ref options 'user crontab-real-user))
@@ -147,12 +146,11 @@
((option-ref options 'edit #f)
(let ((temp-file (string-append "/tmp/crontab." (number->string (getpid))))
- (editor (if (getenv "VISUAL") (getenv "VISUAL")
- (if (getenv "EDITOR") (getenv "EDITOR")
- "vi"))))
- (catch #t
- (lambda () (copy-file crontab-file temp-file))
- (lambda (key . args) (with-output-to-file temp-file (lambda () #t))))
+ (editor (cond ((getenv "VISUAL") (getenv "VISUAL"))
+ ((getenv "EDITOR") (getenv "EDITOR"))
+ (else "vi"))))
+ (catch #t (lambda () (copy-file crontab-file temp-file))
+ (lambda (key . args) (with-output-to-file temp-file noop)))
(chown temp-file (getuid) (getgid))
(system (string-append editor " " temp-file))
(read-vixie-file temp-file)
@@ -167,7 +165,7 @@
((option-ref options 'remove #f)
(catch #t (lambda () (delete-file crontab-file)
(hit-server crontab-user))
- (lambda (key . args) #t)))
+ noop))
;; In the case of the replace personality we loop over all the arguments on the
@@ -194,6 +192,5 @@
;; used to put out, for total compatibility.
(else
- (display
- "crontab: usage error: file name must be specified for replace.\n")
+ (display "crontab: usage error: file name must be specified for replace.\n")
(primitive-exit 15)))