From 82907b261ddc17ea7c4b838d927a6c9c9b00e6a6 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 8 Jan 2008 10:34:25 +0100 Subject: [PATCH] Add creation of the storage directory --- src/Makefile.am | 6 +++++- src/main.c | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index b78d4b3..66d2f1c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -11,6 +11,8 @@ connmand_LDADD = @HAL_LIBS@ @GDBUS_LIBS@ @GMODULE_LIBS@ statedir = $(localstatedir)/run/connman +storagedir = $(localstatedir)/lib/connman + if MAINTAINER_MODE plugindir = $(abs_top_srcdir)/plugins else @@ -18,7 +20,9 @@ plugindir = $(libdir)/connman/plugins endif AM_CFLAGS = @GMODULE_CFLAGS@ @GDBUS_CFLAGS@ @HAL_CFLAGS@ \ - -DSTATEDIR=\""$(statedir)"\" -DPLUGINDIR=\""$(plugindir)"\" + -DSTATEDIR=\""$(statedir)"\" \ + -DSTORAGEDIR=\""$(storagedir)\"" \ + -DPLUGINDIR=\""$(plugindir)"\" INCLUDES = -I$(top_builddir)/include diff --git a/src/main.c b/src/main.c index 1f30cb4..8de7fbe 100644 --- a/src/main.c +++ b/src/main.c @@ -104,6 +104,9 @@ int main(int argc, char *argv[]) mkdir(STATEDIR, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); + mkdir(STORAGEDIR, S_IRUSR | S_IWUSR | S_IXUSR | + S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); + main_loop = g_main_loop_new(NULL, FALSE); conn = g_dbus_setup_bus(DBUS_BUS_SYSTEM, CONNMAN_SERVICE); @@ -144,6 +147,8 @@ int main(int argc, char *argv[]) g_main_loop_unref(main_loop); + rmdir(STORAGEDIR); + rmdir(STATEDIR); closelog(); -- 2.7.4