X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=globals.ml;h=29054a6225716bed81df6a0e87c12e08f6ddb49d;hb=2b608078f42cc629a62b64149bc620a227c8831f;hp=1506e01d7710779965ef2d393c200c33401619fa;hpb=ae0378a578b7c73091fdc46769ba7a5971ef0939;p=vsys.git diff --git a/globals.ml b/globals.ml index 1506e01..29054a6 100644 --- a/globals.ml +++ b/globals.ml @@ -1,7 +1,7 @@ (** Some things that didn't fit in elsewhere *) let backend = ref "" let debug = ref true -let vsys_version = "0.5" +let vsys_version = "0.7" let nochroot = ref false let conffile = ref "" let pid_filepath = ref "/var/run/vsys.pid" @@ -10,6 +10,7 @@ let failsafe = ref false let logfd = open_out_gen [Open_append;Open_creat] 0o644 !log_filepath let logprint fmt = Printf.fprintf logfd (fmt ^^ "%!") +let debprint fmt = if (!debug) then Printf.fprintf logfd (fmt ^^ "%!") let print fmt = Printf.printf (fmt ^^ "%!") type result = Success | Failed