SummaryRefsLogTreeCommitDiffStats
path: root/main.scm
diff options
context:
space:
mode:
authordale_mellor <dale_mellor>2004-01-22 13:54:21 +0000
committerdale_mellor <dale_mellor>2004-01-22 13:54:21 +0000
commit627e81918e50e7806aace870d1529adf5d75a15d (patch)
tree379d46f025c297f9ab392d1663d85fd84227ef92 /main.scm
parenteb50865add48ceccfa38bf4165351dd0418df41f (diff)
downloadmcron-627e81918e50e7806aace870d1529adf5d75a15d.tar.gz
mcron-627e81918e50e7806aace870d1529adf5d75a15d.tar.bz2
mcron-627e81918e50e7806aace870d1529adf5d75a15d.zip
This is the version 1.0.0 release (many changes have occurred without commiting due to disruption to Savannah, including a skip over the 0.99.4 release).1.0.0
Diffstat (limited to 'main.scm')
-rw-r--r--main.scm20
1 files changed, 10 insertions, 10 deletions
diff --git a/main.scm b/main.scm
index 94cb004..0795324 100644
--- a/main.scm
+++ b/main.scm
@@ -162,8 +162,8 @@ Report bugs to " config-package-bugreport ".\n
;; running.
(define (delete-run-file)
- (catch #t (lambda () (delete-file "/var/run/cron.pid")
- (delete-file "/var/cron/socket"))
+ (catch #t (lambda () (delete-file config-pid-file)
+ (delete-file config-socket-file))
noop)
(quit))
@@ -187,14 +187,14 @@ Report bugs to " config-package-bugreport ".\n
(display "This program must be run by the root user (and should ")
(display "have been installed as such).\n")
(primitive-exit 16)))
- (if (access? "/var/run/cron.pid" F_OK)
+ (if (access? config-pid-file F_OK)
(begin
(display "A cron daemon is already running.\n")
(display " (If you are sure this is not true, remove the file\n")
- (display " /var/run/cron.pid.)\n")
+ (display " " config-pid-file ".)\n")
(primitive-exit 1)))
(if (not (option-ref options 'schedule #f))
- (with-output-to-file "/var/run/cron.pid" noop))
+ (with-output-to-file config-pid-file noop))
(setenv "MAILTO" #f)
(c-set-cron-signals)))
@@ -294,12 +294,12 @@ Report bugs to " config-package-bugreport ".\n
(define (process-files-in-system-directory)
(catch #t (lambda ()
- (let ((directory (opendir "/var/cron/tabs")))
+ (let ((directory (opendir config-spool-dir)))
(do ((file-name (readdir directory) (readdir directory)))
((eof-object? file-name))
(and-let* ((user (valid-user file-name)))
(set-configuration-user user)
- (read-vixie-file (string-append "/var/cron/tabs/"
+ (read-vixie-file (string-append config-spool-dir
file-name))))))
(lambda (key . args)
(display "You do not have permission to access the system crontabs.\n")
@@ -366,7 +366,7 @@ option.\n")
(quit))
(setsid)
(if (eq? command-type 'cron)
- (with-output-to-file "/var/run/cron.pid"
+ (with-output-to-file config-pid-file
(lambda () (display (getpid)) (newline))))))
@@ -380,7 +380,7 @@ option.\n")
(if (eq? command-type 'cron)
(let ((socket (socket AF_UNIX SOCK_STREAM 0)))
- (bind socket AF_UNIX "/var/cron/socket")
+ (bind socket AF_UNIX config-socket-file)
(listen socket 5)
(set! fd-list (list socket))))
@@ -406,7 +406,7 @@ option.\n")
(let ((user (getpw user-name)))
(remove-user-jobs user)
(set-configuration-user user)
- (read-vixie-file (string-append "/var/cron/tabs/" user-name))))))
+ (read-vixie-file (string-append config-spool-dir "/" user-name))))))