Setting tag vsys-0.99-2
[vsys.git] / globals.ml
1 (** Some things that didn't fit in elsewhere *)
2 let backend = ref ""
3 let debug = ref true
4 let vsys_version = "0.99"
5 let nochroot = ref false
6 let conffile = ref ""
7 let pid_filepath = ref "/var/run/vsys.pid"
8 let log_filepath = ref "/var/log/vsys"
9 let failsafe = ref false
10
11 let logfd = ref Pervasives.stdout
12 let logprint fmt = Printf.fprintf !logfd (fmt ^^ "%!")
13
14 let debprint fmt = if (!debug) then Printf.fprintf !logfd (fmt ^^ "%!")
15 let print fmt = Printf.printf (fmt ^^ "%!")
16
17 type result = Success | Failed
18 type fname_and_fd = string option * Unix.file_descr
19
20 (* Relative path, never precededed by a '/' *)
21 type relpath = Relpath of string
22
23 exception Bad_path 
24 exception Bug