Only add --systemd-socket-activation flag on Linux

This commit is contained in:
Reynir Björnsson 2020-11-26 07:40:09 +01:00
parent 9afe691de2
commit 9f317f2638

View file

@ -346,8 +346,11 @@ let retry_connections =
Arg.(value & opt int 0 & info [ "retry-connections" ] ~doc) Arg.(value & opt int 0 & info [ "retry-connections" ] ~doc)
let systemd_socket_activation = let systemd_socket_activation =
let doc = "Pass this flag when systemd socket activation is being used" in match Lazy.force Vmm_unix.uname with
Arg.(value & flag & info [ "systemd-socket-activation" ] ~doc) | FreeBSD -> Term.const false
| Linux ->
let doc = "Pass this flag when systemd socket activation is being used" in
Arg.(value & flag & info [ "systemd-socket-activation" ] ~doc)
let exit_status = function let exit_status = function
| Ok () -> Ok Success | Ok () -> Ok Success