aboutsummaryrefslogtreecommitdiffstats
path: root/unix.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-12-15 13:24:25 +0100
committerJelmer Vernooij <jelmer@samba.org>2005-12-15 13:24:25 +0100
commitbd69a219c0a618354fd80a98dd0d9a04fee755e0 (patch)
treeb4477537e48c6d7b2e5a261aa860a0688d69fb66 /unix.c
parent2983f5e8c2d3046bf01337e5caefa3af55ba6bff (diff)
parentbf02a679c61b0f030ee8f2f01698699a7775f7d5 (diff)
Merge Wilmer
Diffstat (limited to 'unix.c')
-rw-r--r--unix.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/unix.c b/unix.c
index c108528a..3474ca75 100644
--- a/unix.c
+++ b/unix.c
@@ -52,11 +52,12 @@ int main( int argc, char *argv[] )
CONF_FILE = g_strdup( CONF_FILE_DEF );
global.helpfile = g_strdup( HELP_FILE );
-
+
global.conf = conf_load( argc, argv );
if( global.conf == NULL )
return( 1 );
-
+
+
if( global.conf->runmode == RUNMODE_INETD )
{
log_link( LOGLVL_ERROR, LOGOUTPUT_IRC );
@@ -76,6 +77,14 @@ int main( int argc, char *argv[] )
}
if( i != 0 )
return( i );
+
+ global.storage = storage_init( global.conf->primary_storage,
+ global.conf->migrate_storage );
+ if ( global.storage == NULL) {
+ log_message( LOGLVL_ERROR, "Unable to load storage backend '%s'", global.conf->primary_storage );
+ return( 1 );
+ }
+
/* Catch some signals to tell the user what's happening before quitting */
memset( &sig, 0, sizeof( sig ) );
@@ -93,10 +102,6 @@ int main( int argc, char *argv[] )
if( !getuid() || !geteuid() )
log_message( LOGLVL_WARNING, "BitlBee is running with root privileges. Why?" );
- if( access( global.conf->configdir, F_OK ) != 0 )
- log_message( LOGLVL_WARNING, "The configuration directory %s does not exist. Configuration won't be saved.", CONFIG );
- else if( access( global.conf->configdir, R_OK ) != 0 || access( global.conf->configdir, W_OK ) != 0 )
- log_message( LOGLVL_WARNING, "Permission problem: Can't read/write from/to %s.", global.conf->configdir );
if( help_init( &(global.help) ) == NULL )
log_message( LOGLVL_WARNING, "Error opening helpfile %s.", HELP_FILE );