X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/867f8d07c7b6200cba0e4b9bc2d4e718e860eb9f..378a18c0f3a8019d44c457f2f06e848a694714b0:/openwrt/package/ez-ipupdate/files/ez-ipupdate.hotplug?ds=sidebyside 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 & + } +}