miniupnpd: fix local variables in hotplug, change startup priority

* Remove 'local' variable definitions from hotplug script.
  Busybox 1.25.0 does not allow local variables defined outside functions.
  This fixes #231

* Change startup priority from 95 to 94, so that miniupnpd starts
  before S95done (which is intended to be run last).

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
This commit is contained in:
Hannu Nyman 2016-09-30 10:06:12 +03:00
parent 546405983f
commit 3db27f27b2
3 changed files with 5 additions and 7 deletions

View file

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=miniupnpd PKG_NAME:=miniupnpd
PKG_VERSION:=2.0 PKG_VERSION:=2.0
PKG_RELEASE:=2 PKG_RELEASE:=3
PKG_SOURCE_URL:=http://miniupnp.free.fr/files PKG_SOURCE_URL:=http://miniupnp.free.fr/files
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz

View file

@ -13,11 +13,9 @@
[ ! "$ACTION" = "ifup" ] && service_check /usr/sbin/miniupnpd && exit 0 [ ! "$ACTION" = "ifup" ] && service_check /usr/sbin/miniupnpd && exit 0
local iface tmpconf="/var/etc/miniupnpd.conf"
local ifname extiface=$(uci get upnpd.config.external_iface)
local tmpconf="/var/etc/miniupnpd.conf" extzone=$(uci get upnpd.config.external_zone)
local extiface=$(uci get upnpd.config.external_iface)
local extzone=$(uci get upnpd.config.external_zone)
. /lib/functions/network.sh . /lib/functions/network.sh

View file

@ -1,7 +1,7 @@
#!/bin/sh /etc/rc.common #!/bin/sh /etc/rc.common
# Copyright (C) 2006-2014 OpenWrt.org # Copyright (C) 2006-2014 OpenWrt.org
START=95 START=94
STOP=15 STOP=15
SERVICE_USE_PID=1 SERVICE_USE_PID=1