From: Marcel Holtmann Date: Tue, 8 Jan 2008 09:34:25 +0000 (+0100) Subject: Add creation of the storage directory X-Git-Tag: 0.1~446 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=82907b261ddc17ea7c4b838d927a6c9c9b00e6a6;p=platform%2Fupstream%2Fconnman.git Add creation of the storage directory --- 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();