08e17ea2 |
1 | /* debugging */ |
1c38000a |
2 | #define INSTALL 1 |
11475670 |
3 | //#define NO_BUILTIN_XML 1 |
08e17ea2 |
4 | /* end debugging */ |
5 | |
387173cb |
6 | #include <gio/gio.h> |
1c38000a |
7 | #include "config.c" |
b7f8df44 |
8 | #include "interfaces/hostnamed/hostnamed.c" |
11475670 |
9 | //#include "main.h" |
496f5d66 |
10 | |
71e3eef1 |
11 | #ifdef INSTALL |
12 | static gboolean install_conf() { |
13 | |
14 | } |
15 | #endif |
16 | |
496f5d66 |
17 | int main() { |
71e3eef1 |
18 | //TODO cleanup |
19 | #ifdef INSTALL |
1c38000a |
20 | if(!config_init()) { |
71e3eef1 |
21 | g_printf("%s\n", "FAILED to install configs in /etc/!"); |
1c38000a |
22 | return 1; |
71e3eef1 |
23 | } |
24 | #endif |
08e17ea2 |
25 | |
71e3eef1 |
26 | //TODO cleanup |
08e17ea2 |
27 | #if (defined NO_BUILTIN_XML && defined INSTALL) |
1c38000a |
28 | if(!config_init()) { |
71e3eef1 |
29 | g_printf("%s\n", "FAILED to install xml configs!"); |
1c38000a |
30 | return 1; |
71e3eef1 |
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 | |