-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle resolv.conf file changes #118
Comments
When fixing the errors about loading resolv.conf, we also need to note that errors are produced both by load_resolv_conf and avahi_chroot_helper_get_file |
As a suggestion, adding a dbus API which allows setting nameservers/search domains would mean the resolv.conf reading could be done in a separate, low-privileged service (as it would only need to read the file, and send the dbus messages), and could reduce the need to have different paths to handle the chroot and non-chroot cases. That would also mean that avahi could be told about DNS-SD domains independent of "normal" search domains. |
Since #159 is marked as a duplicate of this, I have to write here that what is really needed is that avahi-daemon.service restarts/refreshes e.g. every 10 seconds. This way Avahi would always find network printers / scanners /multifunctionals that had just been switched on. It would also find computers which had just been turned on and which have enabled e.g. the sftp service in order for the home folders to be browsable using Nautilus. In order to facilitate the above without editing avahi-daemon.service, one has to set a cron job or create and enable a systemd timer. For the systemd timer, creating avahi-daemon-timer.service and avahi-daemon-timer.timer in /usr/lib/systemd/system and enabling avahi-daemon-timer.timer would do the trick. avahi-daemon-timer.service:
avahi-daemon-timer.timer:
|
We should monitor and reload /etc/resolv.conf if changes are detected, because either
(a) The servers may change, or
(b) The file may not yet be available during early startup as the network connection is not yet established
This information is used in two main areas,
(1) publish-resolv-conf-dns-servers,
(2) as the list of servers to query for wide area DNS queries.
Ideally this would be done with inotify and not polled, but we also need to consider the chroot helper.
This would also avoid errors being logged on startup currently even if neither of these features are actually used. Refer to #63 and #59.
The text was updated successfully, but these errors were encountered: