#include "includes.h"
#include "system/network.h"
+#include "system/filesys.h"
+#include <libgen.h>
/*
uint16 checksum for n bytes
return NULL;
}
+
+int mkdir_p(const char *dir, int mode)
+{
+ char * t;
+ int ret;
+
+ if (strcmp(dir, "/") == 0) {
+ return 0;
+ }
+
+ t = talloc_strdup(NULL, dir);
+ if (t == NULL) {
+ return ENOMEM;
+ }
+ ret = mkdir_p(dirname(t), mode);
+ talloc_free(t);
+
+ if (ret == 0) {
+ ret = mkdir(dir, mode);
+ if ((ret == -1) && (errno == EEXIST)) {
+ ret = 0;
+ }
+ }
+
+ return ret;
+}
ctdb_options="$ctdb_options --public-addresses=$public_addresses_mine"
fi
- if [ -n "$VALGRIND" ] ; then
- ctdb_options="$ctdb_options --valgrinding"
- fi
-
# We'll use "pkill -f" to kill the daemons with
# "--socket=.* --nlist .* --nopublicipcheck" as context.
$VALGRIND ctdbd --socket="${TEST_VAR_DIR}/sock.$pnn" $ctdb_options "$@" ||return 1