X-Git-Url: https://uglyman.kremlin.cc/gitweb/gitweb.cgi?a=blobdiff_plain;f=src%2Fmain.h;h=c8f97819dee7e4811a1715d80b25f3fafc71908d;hb=5047f6bfd1a812c46128b0d68bf7b93c21c2e76c;hp=2fd39eaa782bd5fb6051b6d2146fd418a08e6639;hpb=faab2eee0d3cdd778fef60dd7d9e8976a001a1b8;p=systembsd.git diff --git a/src/main.h b/src/main.h index 2fd39ea..c8f9781 100644 --- a/src/main.h +++ b/src/main.h @@ -1,51 +1,20 @@ #include -#ifdef NO BUILTIN XML -//TODO install conf -#endif +gboolean install_conf() { + gchar *our_conf_uri = "systemd-utl/xml-conf/"; + gchar **data_dir = g_get_system_data_dirs(); -#ifndef NO_BUILTIN_XML -gchar **hostnamed_config_xml = -"" -"" -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -""; + if(g_strcmp0(data_dir[0], NULL)) { + const gchar our_conf_path[256]; + g_snprintf(our_conf_path, sizeof our_conf_path, "%s%s", *data_dir, our_conf_uri); + GError **errors; -gchar **hostnamed_ispect_xml = -"" -"" -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -""; + /*TODO permissions w/ this */ + g_mkdir_with_parents(our_conf_path, 0644); + + return FALSE; + //return (errors[0] == NULL); + + } else + return FALSE; +}