From 7ac82a61aff588daaa1c217889b3055538380e47 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 24 Jun 2009 07:53:48 -0400 Subject: Monitor resolv.conf for changes This patch updates the monitor_config_file() functions so that they can monitor any number of files and invoke a specified callback whenever they are modified. When inotify is available, we will add an additional watch descriptor to the inotify file descriptor. When inotify is not available, the polling function will simply loop to check each file in the monitor list. When changes are discovered in resolv.conf, the monitor will send a "resInit" signal to all of its known children. They are only required to handle this function if they need updated DNS information. Services that do not implement resInit should return DBUS_ERROR_UNKNOWN_METHOD (rather than timing out) with no ill effects. --- server/monitor/monitor_interfaces.h | 1 + 1 file changed, 1 insertion(+) (limited to 'server/monitor/monitor_interfaces.h') diff --git a/server/monitor/monitor_interfaces.h b/server/monitor/monitor_interfaces.h index 8fdafd612..05d1bb416 100644 --- a/server/monitor/monitor_interfaces.h +++ b/server/monitor/monitor_interfaces.h @@ -39,5 +39,6 @@ #define SERVICE_METHOD_PING "ping" #define SERVICE_METHOD_RELOAD "reloadConfig" #define SERVICE_METHOD_SHUTDOWN "shutDown" +#define SERVICE_METHOD_RES_INIT "resInit" #define SSSD_SERVICE_PIPE "private/sbus-monitor" -- cgit