2008-05-22 Dan Williams <dcbw@redhat.com>
authorDan Williams <dcbw@redhat.com>
Thu, 22 May 2008 17:22:53 +0000 (17:22 +0000)
committerDan Williams <dcbw@redhat.com>
Thu, 22 May 2008 17:22:53 +0000 (17:22 +0000)
Remove anything mDNS related.  This is better done from a distro-specific
dispatcher script.  Plus, any distro using avahi doesn't need to restart
avahi, since avahi can handle interface changes just fine using netlink.

* configure.in
- Remove --with-mdns-provider

* src/NetworkManagerPolicy.c
- (global_state_changed): don't restart the mdns provider

* src/NetworkManagerSystem.h
  src/backends/NetworkManagerArch.c
  src/backends/NetworkManagerDebian.c
  src/backends/NetworkManagerFrugalware.c
  src/backends/NetworkManagerGentoo.c
  src/backends/NetworkManagerMandriva.c
  src/backends/NetworkManagerPaldo.c
  src/backends/NetworkManagerRedHat.c
  src/backends/NetworkManagerSlackware.c
  src/backends/NetworkManagerSuSE.c
- (nm_system_restart_mdns_responder): remove

* src/backends/NetworkManagerGeneric.c
  src/backends/NetworkManagerGeneric.h
- (nm_generic_restart_mdns_responder): remove

git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3684 4912f4e0-d625-0410-9fb7-b9a5a253dbdc

15 files changed:
ChangeLog
configure.in
src/NetworkManagerPolicy.c
src/NetworkManagerSystem.h
src/backends/NetworkManagerArch.c
src/backends/NetworkManagerDebian.c
src/backends/NetworkManagerFrugalware.c
src/backends/NetworkManagerGeneric.c
src/backends/NetworkManagerGeneric.h
src/backends/NetworkManagerGentoo.c
src/backends/NetworkManagerMandriva.c
src/backends/NetworkManagerPaldo.c
src/backends/NetworkManagerRedHat.c
src/backends/NetworkManagerSlackware.c
src/backends/NetworkManagerSuSE.c

index e688065..ba3ac63 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,33 @@
 2008-05-22  Dan Williams  <dcbw@redhat.com>
 
+       Remove anything mDNS related.  This is better done from a distro-specific
+       dispatcher script.  Plus, any distro using avahi doesn't need to restart
+       avahi, since avahi can handle interface changes just fine using netlink.
+
+       * configure.in
+               - Remove --with-mdns-provider
+
+       * src/NetworkManagerPolicy.c
+               - (global_state_changed): don't restart the mdns provider
+
+       * src/NetworkManagerSystem.h
+         src/backends/NetworkManagerArch.c
+         src/backends/NetworkManagerDebian.c
+         src/backends/NetworkManagerFrugalware.c
+         src/backends/NetworkManagerGentoo.c
+         src/backends/NetworkManagerMandriva.c
+         src/backends/NetworkManagerPaldo.c
+         src/backends/NetworkManagerRedHat.c
+         src/backends/NetworkManagerSlackware.c
+         src/backends/NetworkManagerSuSE.c
+               - (nm_system_restart_mdns_responder): remove
+
+       * src/backends/NetworkManagerGeneric.c
+         src/backends/NetworkManagerGeneric.h
+               - (nm_generic_restart_mdns_responder): remove
+
+2008-05-22  Dan Williams  <dcbw@redhat.com>
+
        * configure.in
                - clean up crypto options; just use --with-crypto=nss or
                        --with-crypto=gnutls
index 77f8b31..096b85b 100644 (file)
@@ -115,26 +115,6 @@ AM_CONDITIONAL(TARGET_PALDO, test x"$with_distro" = xpaldo)
 AM_CONDITIONAL(TARGET_FRUGALWARE, test x"$with_distro" = xfrugalware)
 AM_CONDITIONAL(TARGET_MANDRIVA, test x"$with_distro" = xmandriva)
 
-if test x"$with_distro" = xgentoo -o x"$with_distro" = xmandriva ; then
-       AC_ARG_WITH([mdns_provider],
-                   AS_HELP_STRING([--with-mdns-provider=PROVIDER], [Specify the mDNS implementation: Avahi, Bonjour]),,
-                   [with_mdns_provider=avahi])
-
-       with_mdns_provider=`echo ${with_mdns_provider} | tr '[[:upper:]]' '[[:lower:]]'`
-
-       case $with_mdns_provider in
-               avahi)
-                       AC_DEFINE([MDNS_PROVIDER_AVAHI], [], [Use avahi for mDNS provider])
-               ;;
-               bonjour)
-                       AC_DEFINE([MDNS_PROVIDER_BONJOUR], [], [Use Bonjour mDNSResponderPosix for mDNS provider])
-               ;;
-               *)
-                       AC_MSG_ERROR([invalid mdns implementation specified ($with_mdns_provider)])
-               ;;
-       esac
-fi
-
 AC_MSG_CHECKING([Linux Wireless Extensions >= 18])
 AC_TRY_COMPILE([#ifndef __user
                 #define __user
index fcb54f3..31e05db 100644 (file)
@@ -284,8 +284,6 @@ auto_activate_device (gpointer user_data)
 static void
 global_state_changed (NMManager *manager, NMState state, gpointer user_data)
 {
-       if (state == NM_STATE_CONNECTED)
-               nm_system_restart_mdns_responder ();
 }
 
 static void
index 0e34ba7..0efb9ae 100644 (file)
@@ -52,7 +52,6 @@ void                  nm_system_flush_loopback_routes                 (void);
 void                   nm_system_flush_arp_cache                               (void);
 void                   nm_system_kill_all_dhcp_daemons                 (void);
 void                   nm_system_update_dns                                    (void);
-void                   nm_system_restart_mdns_responder                        (void);
 
 gboolean               nm_system_device_set_from_ip4_config            (const char *iface,
                                                                                                 NMIP4Config *config,
index 5f55ecb..f9cad1e 100644 (file)
@@ -288,23 +288,6 @@ void nm_system_update_dns (void)
        }
 }
 
-
-/*
- * nm_system_restart_mdns_responder
- *
- * Restart the multicast DNS responder so that it knows about new
- * network interfaces and IP addresses.
- *
- */
-void nm_system_restart_mdns_responder (void)
-{
-       /* Check if the daemon was already running - do not start a new instance */
-       if (g_file_test("/var/run/daemons/avahi-daemon", G_FILE_TEST_EXISTS))
-       {
-               nm_spawn_process ("/etc/rc.d/avahi-daemon restart");
-       }       
-}
-
 /*
  * nm_system_activate_nis
  *
index 0a7bd86..7a8e483 100644 (file)
@@ -163,19 +163,6 @@ void nm_system_update_dns (void)
 
 }
 
-
-/*
- * nm_system_restart_mdns_responder
- *
- * Restart the multicast DNS responder so that it knows about new
- * network interfaces and IP addresses.
- *
- */
-void nm_system_restart_mdns_responder (void)
-{
-       nm_spawn_process ("/usr/bin/killall -q -USR1 mDNSResponder");
-}
-
 /*
  * nm_system_activate_nis
  *
index f11dc1e..8d6ee0d 100644 (file)
@@ -163,22 +163,6 @@ void nm_system_update_dns (void)
 }
 
 /*
- * nm_system_restart_mdns_responder
- *
- * Restart the multicast DNS responder so that it knows about new
- * network interfaces and IP addresses.
- *
- */
-void nm_system_restart_mdns_responder (void)
-{
-       /* Check if the daemon was already running - do not start a new instance */
-       if (g_file_test("/var/run/avahi-daemon/pid", G_FILE_TEST_EXISTS))
-       {
-               nm_spawn_process ("/etc/rc.d/rc.avahi-daemon restart");
-       }
-}
-
-/*
  * nm_system_flush_loopback_routes
  *
  * Flush all routes associated with the loopback device, because it
index ba0ebc4..8c0f194 100644 (file)
@@ -174,18 +174,6 @@ void nm_generic_update_dns (void)
 {
 }
 
-
-/*
- * nm_generic_restart_mdns_responder
- *
- * Restart the multicast DNS responder so that it knows about new
- * network interfaces and IP addresses.
- *
- */
-void nm_generic_restart_mdns_responder (void)
-{
-}
-
 /*
  * nm_generic_set_ip4_config_from_resolv_conf
  *
index c5db46d..b082b4c 100644 (file)
@@ -47,7 +47,6 @@ void                  nm_generic_flush_loopback_routes                        (void);
 void                   nm_generic_flush_arp_cache                              (void);
 void                   nm_generic_kill_all_dhcp_daemons                        (void);
 void                   nm_generic_update_dns                                   (void);
-void                   nm_generic_restart_mdns_responder                       (void);
 
 void                   nm_generic_set_ip4_config_from_resolv_conf (const char *filename, NMIP4Config *ip4_config);
 void *         nm_generic_device_get_system_config                     (NMDevice *dev);
index c7ec84a..eec4848 100644 (file)
@@ -193,33 +193,6 @@ void nm_system_update_dns (void)
 }
 
 /*
- * nm_system_restart_mdns_responder
- *
- * Restart the multicast DNS responder so that it knows about new
- * network interfaces and IP addresses.
- *
- */
-void nm_system_restart_mdns_responder (void)
-{
-#if defined(MDNS_PROVIDER_AVAHI)
-       nm_info ("Restarting avahi-daemon");
-       if (g_file_test ("/var/run/avahi-daemon/pid", G_FILE_TEST_EXISTS))
-       {
-               nm_spawn_process ("/etc/init.d/avahi-daemon restart");
-       }
-#elif defined(MDNS_PROVIDER_BONJOUR)
-       if (g_file_test ("/var/run/mDNSResponderPosix.pid", G_FILE_TEST_EXISTS))
-       {
-               nm_info ("Restarting mDNSResponderPosix");
-               nm_spawn_process ("/etc/init.d/mDNSResponderPosix restart");
-       }
-#else
-       g_printerr("No mDNSResponder support enabled");
-       g_assert_not_reached();
-#endif
-}
-
-/*
  * nm_system_activate_nis
  *
  * set up the nis domain and write a yp.conf
index e521f1d..31a05b7 100644 (file)
@@ -189,42 +189,6 @@ void nm_system_update_dns (void)
        }
 }
 
-
-/*
- * nm_system_restart_mdns_responder
- *
- * Restart the multicast DNS responder so that it knows about new
- * network interfaces and IP addresses.
- *
- */
-void nm_system_restart_mdns_responder (void)
-{
-#if defined(MDNS_PROVIDER_AVAHI)
-       nm_info ("Restarting avahi-daemon");
-       if (g_file_test ("/var/run/avahi-daemon/pid", G_FILE_TEST_EXISTS))
-       {
-               nm_spawn_process ("/etc/init.d/avahi-daemon restart");
-       }
-#elif defined(MDNS_PROVIDER_HOWL)
-       if (g_file_text ("/var/run/mDNSResponder.pid", G_FILE_TEST_EXISTS))
-       {
-               nm_info ("Restarting mDNSResponder");
-               nm_spawn_process ("/etc/init.d/mDNSResponder stop");
-               nm_spawn_process ("/etc/init.d/mDNSResponder zap");
-               nm_spawn_process ("/etc/init.d/mDNSResponder start");
-       }
-#elif defined(MDNS_PROVIDER_BONJOUR)
-       if (g_file_test ("/var/run/mDNSResponderPosix.pid", G_FILE_TEST_EXISTS))
-       {
-               nm_info ("Restarting mDNSResponderPosix");
-               nm_spawn_process ("/etc/init.d/mDNSResponderPosix restart");
-       }
-#else
-       g_printerr("No mDNSResponder support enabled");
-       g_assert_not_reached();
-#endif
-}
-
 /*
  * nm_system_activate_nis
  *
index ba704d4..5ea5287 100644 (file)
@@ -175,19 +175,6 @@ void nm_system_update_dns (void)
        nm_spawn_process ("/usr/sbin/nscd -i hosts");
 }
 
-
-/*
- * nm_system_restart_mdns_responder
- *
- * Restart the multicast DNS responder so that it knows about new
- * network interfaces and IP addresses.
- *
- */
-void nm_system_restart_mdns_responder (void)
-{
-       nm_spawn_process("/etc/init.d/avahi-daemon try-restart");
-}
-
 /*
  * nm_system_activate_nis
  *
index 1356e40..33908d7 100644 (file)
@@ -187,31 +187,6 @@ void nm_system_update_dns (void)
        }
 }
 
-
-/*
- * nm_system_restart_mdns_responder
- *
- * Restart the multicast DNS responder so that it knows about new
- * network interfaces and IP addresses.
- *
- */
-void nm_system_restart_mdns_responder (void)
-{
-       FILE            *fp  = NULL;
-
-       if ((fp = fopen ("/var/run/mDNSResponder.pid", "rt")))
-       {
-               int pid;
-               int res = fscanf (fp, "%d", &pid);
-               fclose (fp);
-               if (res == 1)
-               {
-                       nm_info ("Restarting mDNSResponder.");
-                       kill (pid, SIGUSR1);
-               }
-       }
-}
-
 /*
  * nm_system_activate_nis
  *
index 1cf4405..3e2d3d5 100644 (file)
@@ -148,17 +148,6 @@ void nm_system_update_dns (void)
 }
 
 /*
- * nm_system_restart_mdns_responder
- *
- * Restart the multicast DNS responder so that it knows about new
- * network interfaces and IP addresses.
- *
- */
-void nm_system_restart_mdns_responder (void)
-{
-}
-
-/*
  * nm_system_flush_loopback_routes
  *
  * Flush all routes associated with the loopback device, because it
index 384ac64..7af55a0 100644 (file)
@@ -181,34 +181,6 @@ void nm_system_update_dns (void)
        nm_spawn_process ("/usr/sbin/nscd -i hosts");
 }
 
-
-/*
- * nm_system_restart_mdns_responder
- *
- * Restart the multicast DNS responder so that it knows about new
- * network interfaces and IP addresses.
- *
- */
-void nm_system_restart_mdns_responder (void)
-{
-       pid_t pid;
-       FILE *fp;
-       int res;
-
-       fp = fopen ("/var/run/mdnsd.pid", "rt");
-       if (!fp)
-               return;
-
-       res = fscanf (fp, "%d", &pid);
-       if (res == 1)
-       {
-               nm_info ("Restarting mdnsd (pid=%d).", pid);
-               kill (pid, SIGUSR1);
-       }
-
-       fclose (fp);
-}
-
 /*
  * nm_system_activate_nis
  *