Removed init script as there is an hotplug one, check whether user configuration...
authorFlorian Fainelli <florian@openwrt.org>
Wed, 8 Feb 2006 14:08:21 +0000 (14:08 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Wed, 8 Feb 2006 14:08:21 +0000 (14:08 +0000)
SVN-Revision: 3189

openwrt/package/ez-ipupdate/Makefile
openwrt/package/ez-ipupdate/files/ez-ipupdate.hotplug

index 66a25d934cbb0b7525c251eeadb208b4981c8146..ce2583a4b5be162517fd082992a65441a78f27c6 100644 (file)
@@ -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)
 
index 3f27c140af9cecfa008d581b3b587f1d41361662..56a054b4ac00150e43ee447af6f3d097a6e3a967 100644 (file)
@@ -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 &
+       }
+}