/*Poll the ethernet Cable Plug-in /Plug-out status at every 1000 ms*/
#define ETH_POLLING_TIME 1000
+#define CONTAINER_FILE "/run/systemd/container"
/* Callback to Poll the Ethernet Status*/
gboolean __net_ethernet_cable_status_polling_callback(gpointer data)
g_type_init();
#endif
+ main_loop = g_main_loop_new(NULL, FALSE);
+ if (main_loop == NULL) {
+ ERR("Couldn't create GMainLoop\n");
+ log_cleanup();
+ return 0;
+ }
+
+ if (access(CONTAINER_FILE, F_OK) == 0) {
+ g_main_loop_run(main_loop);
+ log_cleanup();
+ return 0;
+ }
+
/* Backward compatibility:
* Execute only when the old style hal architecture is not running
*/
g_free(ifname);
}
- main_loop = g_main_loop_new(NULL, FALSE);
- if (main_loop == NULL) {
- ERR("Couldn't create GMainLoop\n");
- return 0;
- }
-
ret = setup_gdbus(_got_name_cb);
if (ret > 0) {
ERR("_netconfig_setup_gdbus is failed\n");