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

View File

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