PKG_NAME:=ez-ipupdate
PKG_VERSION:=3.0.11b8
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MD5SUM:=000211add4c4845ffa4211841bff4fb0
PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/e/ez-ipupdate \
touch $@
$(IPKG_EZIPUPDATE):
- mkdir -p $(IDIR_EZIPUPDATE)/usr/sbin $(IDIR_EZIPUPDATE)/etc/hotplug.d/iface
- cp $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_EZIPUPDATE)/usr/sbin/
- cp ./files/$(PKG_NAME).hotplug $(IDIR_EZIPUPDATE)/etc/hotplug.d/iface/10-$(PKG_NAME)
- $(STRIP) $(IDIR_EZIPUPDATE)/usr/sbin/*
+ install -d -m0755 $(IDIR_EZIPUPDATE)/etc
+ install -m0600 ./files/$(PKG_NAME).conf $(IDIR_EZIPUPDATE)/etc/
+ install -d -m0755 $(IDIR_EZIPUPDATE)/etc/hotplug.d/iface
+ install -m0755 ./files/$(PKG_NAME).hotplug $(IDIR_EZIPUPDATE)/etc/hotplug.d/iface/10-$(PKG_NAME)
+ install -d -m0755 $(IDIR_EZIPUPDATE)/usr/sbin
+ install -m0755 $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_EZIPUPDATE)/usr/sbin/
+ $(RSTRIP) $(IDIR_EZIPUPDATE)
$(IPKG_BUILD) $(IDIR_EZIPUPDATE) $(PACKAGE_DIR)
-PGM=ez-ipupdate
+. /etc/functions.sh
+NAME=ez-ipupdate
+CONFIG=/etc/$NAME.conf
+COMMAND=/usr/sbin/$NAME
[ "$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 &
- }
+ [ -x $COMMAND ] && [ -r $CONFIG ] && {
+ IFNAME=$(nvram get ${INTERFACE}_ifname)
+ $COMMAND -c $CONFIG -i $IFNAME 2>&1 | logger -t $NAME
+ } &
}