Message ID | 4a89f1f44cb171e1f92dae2401a580a10fd0c5a0.1666339129.git.edvin.torok@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [for-4.17,v2] tools/ocaml/xenstored: fix live update exception | expand |
diff --git a/tools/ocaml/xenstored/xenstored.ml b/tools/ocaml/xenstored/xenstored.ml index fc90fcdeb5..acc7290627 100644 --- a/tools/ocaml/xenstored/xenstored.ml +++ b/tools/ocaml/xenstored/xenstored.ml @@ -353,7 +353,9 @@ let _ = ) in (* required for xenstore-control to detect availability of live-update *) - Store.mkdir store Perms.Connection.full_rights (Store.Path.of_string "/tool"); + let tool_path = Store.Path.of_string "/tool" in + if not (Store.path_exists store tool_path) then + Store.mkdir store Perms.Connection.full_rights tool_path; Store.write store Perms.Connection.full_rights (Store.Path.of_string "/tool/xenstored") Sys.executable_name;