[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] oxenstored: honour XEN_RUN_STORED and XEN_CONFIG_DIR



commit 44e6ba4b3376f78315cd447dc88813ba60a83b32
Author:     Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Mon Jun 13 08:49:14 2016 +0100
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Fri Jun 17 11:27:21 2016 +0100

    oxenstored: honour XEN_RUN_STORED and XEN_CONFIG_DIR
    
    Only contain changes to ocaml source code. C stub files will be handled
    separately.
    
    Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Acked-by: David Scott <dave@xxxxxxxxxx>
---
 tools/ocaml/xenstored/define.ml    | 6 +++---
 tools/ocaml/xenstored/disk.ml      | 2 +-
 tools/ocaml/xenstored/xenstored.ml | 8 ++++----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/tools/ocaml/xenstored/define.ml b/tools/ocaml/xenstored/define.ml
index d60861c..e9d957f 100644
--- a/tools/ocaml/xenstored/define.ml
+++ b/tools/ocaml/xenstored/define.ml
@@ -20,10 +20,10 @@ let xenstored_minor = 0
 let xenstored_proc_kva = "/proc/xen/xsd_kva"
 let xenstored_proc_port = "/proc/xen/xsd_port"
 
-let xs_daemon_socket = "/var/run/xenstored/socket"
-let xs_daemon_socket_ro = "/var/run/xenstored/socket_ro"
+let xs_daemon_socket = Paths.xen_run_stored ^ "/socket"
+let xs_daemon_socket_ro = Paths.xen_run_stored ^ "/socket_ro"
 
-let default_config_dir = "/etc/xen"
+let default_config_dir = Paths.xen_config_dir
 
 let maxwatch = ref (50)
 let maxtransaction = ref (20)
diff --git a/tools/ocaml/xenstored/disk.ml b/tools/ocaml/xenstored/disk.ml
index 4ae1fce..4739967 100644
--- a/tools/ocaml/xenstored/disk.ml
+++ b/tools/ocaml/xenstored/disk.ml
@@ -15,7 +15,7 @@
  *)
 
 let enable = ref false
-let xs_daemon_database = "/var/run/xenstored/db"
+let xs_daemon_database = Paths.xen_run_stored ^ "/db"
 
 let error fmt = Logging.error "disk" fmt
 
diff --git a/tools/ocaml/xenstored/xenstored.ml 
b/tools/ocaml/xenstored/xenstored.ml
index fc8cc95..30570ed 100644
--- a/tools/ocaml/xenstored/xenstored.ml
+++ b/tools/ocaml/xenstored/xenstored.ml
@@ -66,7 +66,7 @@ let process_domains store cons domains =
 let sigusr1_handler store =
        try
                let channel = open_out_gen [ Open_wronly; Open_creat; 
Open_trunc; ]
-                                          0o600 "/var/run/xenstored/db.debug" 
in
+                                          0o600 (Paths.xen_run_stored ^ 
"/db.debug") in
                finally (fun () -> Store.dump store channel)
                        (fun () -> close_out channel)
        with _ ->
@@ -266,7 +266,7 @@ let _ =
        let quit = ref false in
 
        if cf.restart then (
-               DB.from_file store domains cons "/var/run/xenstored/db";
+               DB.from_file store domains cons (Paths.xen_run_stored ^ "/db");
                Event.bind_dom_exc_virq eventchn
        ) else (
                if !Disk.enable then (
@@ -293,7 +293,7 @@ let _ =
 
        Logging.init_xenstored_log();
        if cf.activate_access_log then begin
-               let post_rotate () = DB.to_file store cons 
"/var/run/xenstored/db" in
+               let post_rotate () = DB.to_file store cons 
(Paths.xen_run_stored ^ "/db") in
                Logging.init_access_log post_rotate
        end;
 
@@ -440,5 +440,5 @@ let _ =
                                raise exc
        done;
        info "stopping xenstored";
-       DB.to_file store cons "/var/run/xenstored/db";
+       DB.to_file store cons (Paths.xen_run_stored ^ "/db");
        ()
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.