X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/867f8d07c7b6200cba0e4b9bc2d4e718e860eb9f..3005042d932a79abbbc8ac6a76a2c899675b80dd:/openwrt/package/ez-ipupdate/files/ez-ipupdate.hotplug?ds=inline diff --git a/openwrt/package/ez-ipupdate/files/ez-ipupdate.hotplug b/openwrt/package/ez-ipupdate/files/ez-ipupdate.hotplug index 3f27c140a..56a054b4a 100644 --- a/openwrt/package/ez-ipupdate/files/ez-ipupdate.hotplug +++ b/openwrt/package/ez-ipupdate/files/ez-ipupdate.hotplug @@ -1 +1,6 @@ -[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && /usr/sbin/ez-ipupdate -c /etc/ez-ipupdate.conf & +PGM=ez-ipupdate +[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && { + [ -e /etc/$PGM.conf ] && { + [ -n $(grep "user=" /etc/$PGM.conf | cut -d= -f2 | cut -d: -f1) ] && [ -n $(grep "user=" /etc/$PGM.conf | cut -d= -f2 | cut -d: -f2) ] && /usr/sbin/$PGM -c /etc/$PGM.conf & + } +}