diff options
-rw-r--r-- | TODO | 1 | ||||
-rw-r--r-- | src/config.c | 15 | ||||
-rw-r--r-- | src/main.c | 20 |
3 files changed, 36 insertions, 0 deletions
@@ -1 +1,2 @@ * get autoconf stuff figured out + * handle SIGINTs so file descriptors are dropped properly, otherwise we get bus errors next run diff --git a/src/config.c b/src/config.c index ac9ecf4..3c20820 100644 --- a/src/config.c +++ b/src/config.c @@ -19,6 +19,20 @@ #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; } } +} @@ -28,6 +28,25 @@ //#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() { |