summaryrefslogtreecommitdiffstats
path: root/openwrt/package/ez-ipupdate/files/ez-ipupdate.hotplug
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-02-08 14:08:21 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-02-08 14:08:21 +0000
commit378a18c0f3a8019d44c457f2f06e848a694714b0 (patch)
tree96e55d302e5bf6c831212681f9aef161397a3f4c /openwrt/package/ez-ipupdate/files/ez-ipupdate.hotplug
parenta8b7ca268e49ec9ed9540c7cf9f026112594f8c2 (diff)
Removed init script as there is an hotplug one, check whether user configuration directive is properly set, change the numbering to 10 rather than 15
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@3189 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/package/ez-ipupdate/files/ez-ipupdate.hotplug')
-rw-r--r--openwrt/package/ez-ipupdate/files/ez-ipupdate.hotplug7
1 files changed, 6 insertions, 1 deletions
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 &
+ }
+}