mirror of https://github.com/openwrt/packages.git
ddns-scripts: update hotplug script
To handle ip address changing by ifupdate. When the ipv6 address is updated for an interface (some ISP only give dynamic ipv6 address). The ddns script will go into dead loop, as the new ipv6 address is not used. The simple change is restarting ddns when ip address is changed. Signed-off-by: Jimmy Qin <sunnyqeen@gmail.com>pull/30470/head
parent
4c19a2ea6b
commit
889e134007
|
|
@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=ddns-scripts
|
||||
PKG_VERSION:=2.8.4
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
|
|
|
|||
|
|
@ -38,4 +38,10 @@ case "$ACTION" in
|
|||
ifdown)
|
||||
ddns_service "ifdown" "$INTERFACE"
|
||||
;;
|
||||
ifupdate)
|
||||
[ -z "$IFUPDATE_ADDRESSES" ] && exit 0
|
||||
ddns_service "ifdown" "$INTERFACE"
|
||||
sleep 1 # give time to shutdown
|
||||
/etc/init.d/ddns enabled && ddns_service "ifup" "$INTERFACE"
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Reference in New Issue