I hadn't heard of invoke-rc.d before, so I looked it up. The manual page says it's "a generic interface to execute System V style init script /etc/init.d/name actions" and that "all access to the init scripts by Debian packages' maintainer scripts should be done through invoke-rc.d".

I had initially tried to solve the problem by editing /etc/init.d/ntp. But that doesn't seem right, so I restored the original file from backup.

How can I find out now what is calling invoke-rc.d ntp try-restart during shutdown and why?

As for this issue being connected to the network device settings, I've found the following: When I use auto wlan0 instead of allow-hotplug wlan0 in /etc/network/interfaces (where I do all my network configuration), I'll get this during boot:

DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
DHCPREQUEST of 192.168.178.21 on wlan0 to 255.255.255.255 port 67
DHCPOFFER of 192.168.178.21 from 192.168.178.1
DHCPACK of 192.168.178.21 from 192.168.178.1
invoke-rc.d: could not determine current runlevel
bound to 192.168.178.21 -- renewal in 400249 seconds.

First, these messages are not shown when using the allow-hotplug configuration. In that case, all that is shown of the network device configuration during boot is:

Re: Problems with NTP and network config after upgrade

msi wrote:

I temporarily replaced the current verison of the file with that from Jessie to see if it would make any difference and it didn't. So, the root of the problem must be somewhere else.

Well, maybe not. I've found that throwing out /etc/dhcp/dhclient-exit-hooks.d/ntp will make both of the error messages mentioned above go away. So, the one on boot is obviously also triggered by it. There will, of course, be no automatic handling of ntp restarts on DHCP events if the file is missing.

I've been trying to understand what this script really does and I kind of do. But the ntp_servers_setup function is still a mystery to me. Where does it get the value for $reason? It's simply not defined within the script. And neither are $new_ntp_servers and $old_ntp_servers, which are used in the ntp_servers_setup_add function.

Re: Problems with NTP and network config after upgrade

The reason there is a ntp hook for dhcp is to override the system configuration with the ntp servers advertised through dhcp. You could get rid of it all by removing 'ntp-server' from the dhclient.conf request line. I haven't tested it yet though, so if I don't correct myself assume what I said to be accurate.