vlib: create unix runtime directory
Ensure the runtime directory is created at startup.
Default /run/vpp
Type: fix
Fixes: I53d70939c8125d04a365ac51a6cbf8926dc52adf
Change-Id: I6d70364ea756b86768c4dd1f6a9383238ed275c8
Signed-off-by: Ole Troan <ot@cisco.com>
diff --git a/src/vlib/unix/main.c b/src/vlib/unix/main.c
index 3ec4c34..42c3064 100755
--- a/src/vlib/unix/main.c
+++ b/src/vlib/unix/main.c
@@ -500,6 +500,11 @@
vlib_default_runtime_dir, 0);
}
+ /* Ensure the runtime directory is created */
+ error = vlib_unix_recursive_mkdir ((char *) um->runtime_dir);
+ if (error)
+ return error;
+
error = setup_signal_handlers (um);
if (error)
return error;