Implemented crossplatform automatic startup management.
[udpgate.git] / src / main.c
index a2a7c61..e9833d9 100644 (file)
@@ -37,7 +37,7 @@
 #include "ui-line.h"
 #include "network.h"
 #include "configuration.h"
-#include "startup.h"
+#include "static-startup.h"
 #ifdef ENABLE_BUNDLE
 #include "bundle-util.h"
 #endif
@@ -276,16 +276,13 @@ guint handler_id;
 
        if (!is_interactive) {
 
-               if (optarg_startup_query || optarg_startup_off || optarg_startup_on)
-                       startup_init();
-
                if (optarg_stop)
                        if (!network_stop())
                                exit_rc=2;
                if (optarg_startup_query) {
 gboolean is_on;
 
-                       if (startup_query(&is_on)) {
+                       if (static_startup_query(&is_on)) {
                                g_message((is_on
                                                ? _("System startup registrance is turned on.")
                                                : _("System startup registrance is turned off.")));
@@ -296,11 +293,11 @@ gboolean is_on;
                                exit_rc=2;
                        }
                if (optarg_startup_off) {
-                       if (!startup_off())
+                       if (!static_startup_off())
                                exit_rc=2;
                        }
                if (optarg_startup_on) {
-                       if (!startup_on())
+                       if (!static_startup_on())
                                exit_rc=2;
                        }
                if (optarg_start)