init.d/dhcp-event: kill always ntpd on bound/rebound to use the correct DNS server

This commit is contained in:
Jaroslav Kysela 2018-09-17 09:38:39 +02:00
parent 43e3f5671c
commit 4fdf79250a
1 changed files with 2 additions and 1 deletions

View File

@ -30,7 +30,6 @@ renew|bound)
logger -p local0.notice "DHCP IPv4 changed, killing minisatip"
rm -f /tmp/satip-network
killall -9 minisatip 2> /dev/null
killall -9 ntpd 2> /dev/null
fi
ifconfig $interface $ip $BROADCAST $NETMASK
if test -n "$router" ; then
@ -46,6 +45,8 @@ renew|bound)
for i in $dns ; do
echo "nameserver $i" >> $RESOLV_CONF
done
# kill always ntpd
killall -9 ntpd 2> /dev/null
# notify satip init script
echo "ok" | nc 127.0.0.1 999 2> /dev/null
sleep 0.5