From 042f31fe685c28662fb5e5e9533a7a2f1b29bd64 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Tue, 24 Oct 2017 10:28:25 -0400 Subject: [PATCH] Add default CRI-O socket path back to conmon Signed-off-by: Matthew Heon --- conmon/conmon.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/conmon/conmon.c b/conmon/conmon.c index 94124d4c..3fd14212 100644 --- a/conmon/conmon.c +++ b/conmon/conmon.c @@ -96,6 +96,8 @@ static inline void strv_cleanup(char ***strv) #define CMD_SIZE 1024 #define MAX_EVENTS 10 +#define DEFAULT_SOCKET_PATH "/var/lib/crio" + static bool opt_terminal = false; static bool opt_stdin = false; static char *opt_cid = NULL; @@ -111,7 +113,7 @@ static char *opt_log_path = NULL; static char *opt_exit_dir = NULL; static int opt_timeout = 0; static int64_t opt_log_size_max = -1; -static char *opt_socket_path = NULL; +static char *opt_socket_path = DEFAULT_SOCKET_PATH; static GOptionEntry opt_entries[] = { { "terminal", 't', 0, G_OPTION_ARG_NONE, &opt_terminal, "Terminal", NULL }, @@ -1159,9 +1161,6 @@ int main(int argc, char *argv[]) if (opt_log_path == NULL) nexit("Log file path not provided. Use --log-path"); - if (opt_socket_path == NULL) - nexit("Socket path not provided. Use --socket-path"); - start_pipe_fd = get_pipe_fd_from_env("_OCI_STARTPIPE"); if (start_pipe_fd >= 0) { /* Block for an initial write to the start pipe before