summaryrefslogtreecommitdiffstats
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
commit56add57f296e5b9e8e9ec4a739f872109f20077c (patch)
treee7a1db9d50612f3d814bf34ebef6bf15484d36b6
parenta9a867a45eca8fb24761dee60d2a8fa03861932b (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/openwrt@3189 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/ez-ipupdate/Makefile2
-rw-r--r--package/ez-ipupdate/files/ez-ipupdate.hotplug7
2 files changed, 7 insertions, 2 deletions
diff --git a/package/ez-ipupdate/Makefile b/package/ez-ipupdate/Makefile
index 66a25d934..ce2583a4b 100644
--- a/package/ez-ipupdate/Makefile
+++ b/package/ez-ipupdate/Makefile
@@ -50,7 +50,7 @@ $(IPKG_EZIPUPDATE):
install -m0755 $(PKG_BUILD_DIR)/ez-ipupdate $(IDIR_EZIPUPDATE)/usr/sbin/
install -m0755 files/$(PKG_NAME).init $(IDIR_EZIPUPDATE)/etc/init.d/S80$(PKG_NAME)
install -m0755 files/$(PKG_NAME).conf $(IDIR_EZIPUPDATE)/etc/
- install -m0755 files/$(PKG_NAME).hotplug $(IDIR_EZIPUPDATE)/etc/hotplug.d/iface/15-$(PKG_NAME)
+ install -m0755 files/$(PKG_NAME).hotplug $(IDIR_EZIPUPDATE)/etc/hotplug.d/iface/10-$(PKG_NAME)
$(STRIP) $(IDIR_EZIPUPDATE)/usr/sbin/*
$(IPKG_BUILD) $(IDIR_EZIPUPDATE) $(PACKAGE_DIR)
diff --git a/package/ez-ipupdate/files/ez-ipupdate.hotplug b/package/ez-ipupdate/files/ez-ipupdate.hotplug
index 3f27c140a..56a054b4a 100644
--- a/package/ez-ipupdate/files/ez-ipupdate.hotplug
+++ b/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 &
+ }
+}