929eb2a9 |
1 | /* debugging */ |
d1e1db9e |
2 | //#define INSTALL 1 |
3 | //#define NO_BUILTIN_XML 1 |
929eb2a9 |
4 | /* end debugging */ |
5 | |
387173cb |
6 | #include <gio/gio.h> |
a35a69c5 |
7 | #include <config.c> |
b7f8df44 |
8 | #include "interfaces/hostnamed/hostnamed.c" |
d1e1db9e |
9 | //#include "main.h" |
496f5d66 |
10 | |
a35a69c5 |
11 | #ifdef INSTALL |
12 | static gboolean install_conf() { |
13 | |
14 | } |
15 | #endif |
16 | |
496f5d66 |
17 | int main() { |
a35a69c5 |
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 |
929eb2a9 |
25 | |
a35a69c5 |
26 | //TODO cleanup |
929eb2a9 |
27 | #if (defined NO_BUILTIN_XML && defined INSTALL) |
a35a69c5 |
28 | if(!install_conf()) { |
29 | g_printf("%s\n", "FAILED to install xml configs!"); |
30 | exit(1); |
31 | } |
929eb2a9 |
32 | #else |
33 | #endif |
34 | |
1cd91c9c |
35 | GMainLoop *mloop = NULL; |
387173cb |
36 | |
1cd91c9c |
37 | mloop = g_main_loop_new(NULL, FALSE); |
38 | hostnamed_init(); |
39 | g_main_loop_run(mloop); |
40 | |
496f5d66 |
41 | return 0; |
ea207ed3 |
42 | } |
a35a69c5 |
43 | |