projects
/
rrq
/
hourglass.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Edits and additions to satisfy lintian.
[rrq/hourglass.git]
/
control-logic.lsp
diff --git
a/control-logic.lsp
b/control-logic.lsp
index bdf291d858cae4fe80cad182a4e709473d6db2d2..2d2cd3e4efcac3ed4824390b071bda48bd59cc20 100644
(file)
--- a/
control-logic.lsp
+++ b/
control-logic.lsp
@@
-14,8
+14,9
@@
'ACTDIR SITE:listener.activity.dir
'CONTROL.DAT SITE:control.dat
'EXTRA.DAT SITE:control.extra.dat
'ACTDIR SITE:listener.activity.dir
'CONTROL.DAT SITE:control.dat
'EXTRA.DAT SITE:control.extra.dat
- 'USAGE.DAT SITE:usage.dat
- 'USAGE.TMP SITE:usage.tmp
+ 'USAGE.DAT SITE:control.usage.dat
+ 'USAGE.TMP SITE:control.usage.tmp
+ 'ACTION SITE:control.action
)
# Set current time variables in local timezone
)
# Set current time variables in local timezone
@@
-32,10
+33,13
@@
)
# Load CONTROL.DAT
)
# Load CONTROL.DAT
-# (
(control "file") (gap minutes)
( weekday start limit stop ) ... )
+# (( weekday start limit stop ) ... )
(setf CONTROL (read-expr (or (read-file CONTROL.DAT)
(die "** Missing " CONTROL.DAT " ** Exiting."))
))
(setf CONTROL (read-expr (or (read-file CONTROL.DAT)
(die "** Missing " CONTROL.DAT " ** Exiting."))
))
+
+(write-line 2 (string (list CONTROL DOW)))
+
(map set '(dow MODE START LIMIT END)
(or (assoc DOW CONTROL)
(assoc 'policy CONTROL)
(map set '(dow MODE START LIMIT END)
(or (assoc DOW CONTROL)
(assoc 'policy CONTROL)
@@
-43,10
+47,10
@@
)
# Load the configured control mechanism
)
# Load the configured control mechanism
-(if (
lookup 'control CONTROL) (load $it
)
+(if (
file? ACTION) (load ACTION
)
(die "** Unknown control mechanism. Exiting!!"))
(unless control
(die "** Unknown control mechanism. Exiting!!"))
(unless control
-
(die "** Control function (control cmd reason) not defined. Exiting!!"))
+ (die "** Control function (control cmd reason) not defined. Exiting!!"))
;; Apply control command with reason, then exit
(define (do-control x r) (control x r) (exit 0))
;; Apply control command with reason, then exit
(define (do-control x r) (control x r) (exit 0))