furthering hostnamed, begining configuration..
[systembsd.git] / src / main.c
CommitLineData
08e17ea2 1/* debugging */
11475670 2//#define INSTALL 1
3//#define NO_BUILTIN_XML 1
08e17ea2 4/* end debugging */
5
387173cb 6#include <gio/gio.h>
71e3eef1 7#include <config.c>
b7f8df44 8#include "interfaces/hostnamed/hostnamed.c"
11475670 9//#include "main.h"
496f5d66 10
71e3eef1 11#ifdef INSTALL
12static gboolean install_conf() {
13
14}
15#endif
16
496f5d66 17int main() {
71e3eef1 18 //TODO cleanup
19 #ifdef INSTALL
20 if(!install_conf()) {
21 g_printf("%s\n", "FAILED to install configs in /etc/!");
22 exit(1);
23 }
24 #endif
08e17ea2 25
71e3eef1 26 //TODO cleanup
08e17ea2 27 #if (defined NO_BUILTIN_XML && defined INSTALL)
71e3eef1 28 if(!install_conf()) {
29 g_printf("%s\n", "FAILED to install xml configs!");
30 exit(1);
31 }
08e17ea2 32 #else
33 #endif
34
e8c57a5d 35 GMainLoop *mloop = NULL;
387173cb 36
e8c57a5d 37 mloop = g_main_loop_new(NULL, FALSE);
38 hostnamed_init();
39 g_main_loop_run(mloop);
40
496f5d66 41 return 0;
ea207ed3 42}
71e3eef1 43