1 (** Some things that didn't fit in elsewhere *)
4 let vsys_version = "0.7"
5 let nochroot = ref false
7 let pid_filepath = ref "/var/run/vsys.pid"
8 let log_filepath = ref "/var/log/vsys"
9 let failsafe = ref false
11 let logfd = open_out_gen [Open_append;Open_creat] 0o644 !log_filepath
12 let logprint fmt = Printf.fprintf logfd (fmt ^^ "%!")
13 let debprint fmt = if (!debug) then Printf.fprintf logfd (fmt ^^ "%!")
14 let print fmt = Printf.printf (fmt ^^ "%!")
16 type result = Success | Failed
17 type fname_and_fd = string option * Unix.file_descr
19 (* Relative path, never precededed by a '/' *)
20 type relpath = Relpath of string