Integrate inotify watcher into network daemon
This commit integrates watching for DNS entries and updating
/etc/resolv.conf functionality into network manager daemon
as opposed to having another daemon doing just that.
Change-Id: Id858815675ed4a23ee8c6a31ba3ae6e5ee0054fd
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
diff --git a/netman_watch_dns.c b/netman_watch_dns.c
index 33e6f14..b60b699 100644
--- a/netman_watch_dns.c
+++ b/netman_watch_dns.c
@@ -380,12 +380,20 @@
printf("Watching for changes in DNS settings..\n");
- /* Now that we have checked it once. rest is all notification bases. */
+ /* Commenting since this functionality has been built into network
+ * manager and this file will be deleted in the very next commit
+ */
+ /*
rc = watch_for_dns_change(netif_dir, state_file);
if(rc < 0)
{
fprintf(stderr,"Error watching for DNS changes\n");
}
+ */
- return 0;
+ // Returning will result in app getting launched again per Restart
+ // policy in service file
+ pause();
+
+ return rc;
}