Re: wpasupplicant hack. trivilal NM patch



2006. 12. 3, vasárnap keltezéssel 23.25-kor Bastien Nocera ezt írta:
On Sun, 2006-12-03 at 16:59 +0100, Gergely Gábor wrote:
> ---
> NetworkManager-0.6.4-gg/src/backends/NetworkManagerRedHat.c 2006-07-13
> 18:43:53.000000000 +0200
> +++
> NetworkManager-0.6.4/src/backends/NetworkManagerRedHat.c    2006-12-03
> 16:32:39.000000000 +0100
> @@ -298,15 +298,15 @@
>  {
>         FILE            *fp  = NULL;
>
> -       if ((fp = fopen ("/var/run/mDNSResponder.pid", "rt")))
> +       if ((fp = fopen ("/var/run/avahi-daemon/pid", "rt")))
>         {
>                 int pid;
>                 int res = fscanf (fp, "%d", &pid);
>                 fclose (fp);
>                 if (res == 1)
>                 {
> -                       nm_info ("Restarting mDNSResponder.");
> -                       kill (pid, SIGUSR1);
> +                       nm_info ("Restarting Avahi-Deamon.");
> +                       kill (pid, SIGHUP);
>                 }
>         }
>  }

That's wrong, as avahi doesn't need to be signalled that the interface
is gone, it will detect it automatically (check your /var/log/messages
to see that yourself).

Cheers

I recon that you may be (and are) right, but man avahi-daemon says that it _can_ be notified, by sending SIGHUP to the given pid, that is (in case of fc6) kept int the file /var/run/avahi-daemon/pid

the manual says:
SIGNALS
      SIGINT, SIGTERM, SIGQUIT: avahi-daemon will shutdown. This is issued by
      passing --kill to avahi-daemon.

      SIGHUP:  avahi-daemon  will  reload  unicast  DNS  server   data   from
      /etc/resolv.conf  and  static  service definitions from /etc/avahi/ser-
      vices/.

      SIGUSR1: avahi-daemon will dump local and remote cached resource record
      data to syslog.

AUTHORS

And according to syslog, you are right. Anyway, there has to be some
point of being able to notify avahi, maybe the changes in resolv conf?
(but IMHO this would only affect the avahi-dnsconfd. Does avahi notify
it? Because if that is the case, we have a point of notifying avahi!)

Oh, and an another remark, but to Dan, about avahi: I have read a
bugzilla message, that was about to change the computer's mdns name to
"User's machine" I think this should not be implemented, as this would
make the nss-mdns resolver lib unuseable. how could I type in an ssh
or scp command? it wolud e wery impractical. maybe it should only be
implemented as a NMDispatcher script, or some way, where the user
wolud be able to choose wether to enable it or not, but not to force
him to make this decision at compile-time. Anyway, I think that
shoould it be implemented, it shuold be done a way, that when
./confiure-ing it could be disabled.


Best regards: Gábor Gergely


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]