X-Git-Url: https://uglyman.kremlin.cc/gitweb/gitweb.cgi?p=systembsd.git;a=blobdiff_plain;f=src%2Fmain.h;h=a5fd502aa5dd181248f8594eea995e887ed4bb44;hp=2fd39eaa782bd5fb6051b6d2146fd418a08e6639;hb=39df684714f381d12e902de486e20a23c2e78bec;hpb=faab2eee0d3cdd778fef60dd7d9e8976a001a1b8 diff --git a/src/main.h b/src/main.h index 2fd39ea..a5fd502 100644 --- a/src/main.h +++ b/src/main.h @@ -1,51 +1,21 @@ #include -#ifdef NO BUILTIN XML -//TODO install conf -#endif +//TODO change this to config dir, not data dir +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; +}