minor, fix system call logic
[systembsd.git] / src / config.c
index 2d761065b961ff5e9ad4b4494d2b2c2ebe54d85b..2456097794064b1cb6a29b40137f5b0d76bbb47f 100644 (file)
@@ -34,6 +34,8 @@ static gchar **localed_ispect_xml, localed_dbus_xml;
 static gchar **timedated_ispect_xml, timedated_dbus_xml;
 static gchar **logind_ispect_xml, logind_dbus_xml; */
 
+static void set_xml_descriptors(); 
+
 static const gchar *CONFIG_KEYS[] = {
     "PrettyHostname",
     "IconName",
@@ -113,7 +115,7 @@ gboolean config_init() {
     /* it does exist, read it */
     } else {
 
-        if(!g_access(config_path, W_OK)) {
+        if(g_access(config_path, W_OK)) {
             g_printf("%s\n", "no write permissions for /etc/! exiting..");
             return FALSE;
         } else if(g_key_file_load_from_file(config, config_path, G_KEY_FILE_KEEP_COMMENTS, NULL))
@@ -148,9 +150,10 @@ gboolean init_xml() {
                        return FALSE;
                }
 
-               //set_xml_descriptors();
+               set_xml_descriptors();
        }
-}
+       return TRUE; /* kill me! */
+} /* kill me too!*/
 
 //LEFTOFF