merge license, hostname buffer changes from master branch
authorkremlin <ian@kremlin.cc>
Thu, 26 Jun 2014 01:44:39 +0000 (20:44 -0500)
committerkremlin <ian@kremlin.cc>
Thu, 26 Jun 2014 01:44:39 +0000 (20:44 -0500)
TODO
src/config.c
src/main.c

diff --git a/TODO b/TODO
index 1f986f42e727fc859c99b1644546b8e12ffd6a4f..8463eba0eb407c926fdf3d8406fc549fbc7409cb 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1 +1,2 @@
  * get autoconf stuff figured out
+ * handle SIGINTs so file descriptors are dropped properly, otherwise we get bus errors next run
index ac9ecf468e2df72c62f6f4e2be478da8304b4491..3c20820d9b7d08cd31aa8ba5005d2c86c858b21e 100644 (file)
 #include <gio/gio.h>
 
 static GKeyFile *config;
+static int config_descr;
+
+static gchar *data_dir;
+
+static int hostnamed_ispect_xml_descr, hostnamed_dbus_xml_descr;
+static int localed_ispect_xml_descr, localed_dbus_xml_descr;
+static int timedated_ispect_xml_descr, timedated_dbus_xml_descr;
+static int logind_ispect_xml_descr, logind_dbus_xml_descr;
+
+/*TODO depending on builtin xml flag, these should be matched to checksums */
+static gchar **hostnamed_ispect_xml, hostnamed_dbus_xml;
+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 const gchar *CONFIG_KEYS[] = {
     "PrettyHostname",
@@ -109,3 +123,4 @@ gboolean config_init() {
         return FALSE;
     }
 }
+}
index 0c343e43faff7f869dd80b7b92ec8ec7fef3ce0b..fc50a2445cdd8bc547163381d62f59c52ea7f6ab 100644 (file)
 //#include "main/h"
 
 gboolean systemd_utils_init() {
+<<<<<<< HEAD
+       #ifdef INSTALL
+               if(!config_init()) {
+                       gchar *tmp;
+                       tmp = "/etc/"; //what the hell is /etc/xdg anyway
+
+                       g_printf("FAILED to install configs in %s!\n", tmp);
+                       return FALSE;
+               } 
+               if(!init_xml()) {
+                       gchar **tmp;
+                       tmp = g_get_system_data_dirs();
+
+                       g_printf("FAILED to install xml configs in %s!\n", tmp[0]);
+                       return FALSE;
+               }
+       #endif
+       return TRUE;
+=======
     #ifdef INSTALL
         if(!config_init()) {
             g_printf("%s\n", "FAILED to install configs in /etc/!");
@@ -35,6 +54,7 @@ gboolean systemd_utils_init() {
         }
     #endif
     return TRUE;
+>>>>>>> master
 }
 
 int main() {