#include <connman/plugin.h>
#include <connman/log.h>
+#if 0
static GIOChannel *inotify_channel = NULL;
static int hostname_descriptor = -1;
close(fd);
}
+#endif
+
+static void create_hostname(void)
+{
+ const char *name = "localhost";
+
+ if (sethostname(name, strlen(name)) < 0)
+ connman_error("Failed to set hostname to %s", name);
+}
static int setup_hostname(void)
{
if (strlen(name) > 0 && strcmp(name, "(none)") != 0)
connman_info("System hostname is %s", name);
+ else
+ create_hostname();
memset(name, 0, sizeof(name));
setup_hostname();
- create_watch();
+ //create_watch();
return 0;
}
static void loopback_exit(void)
{
- remove_watch();
+ //remove_watch();
}
CONNMAN_PLUGIN_DEFINE(loopback, "Loopback device plugin", VERSION,