configuregateway: Only match "function" in subshell

When running OpenWrt master, "type <functionname>" only returns
"<functionname> is a function". Thus, to make the implementation
future-proof and since it is also working with the current state,
change the grep in execute_subshell to match "function".

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
This commit is contained in:
Adrian Schmutzler 2019-05-25 14:11:10 +02:00 committed by Fabian Bläse
parent ea6c5d60e9
commit 9c5b65a770
2 changed files with 2 additions and 3 deletions

View File

@ -1,8 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-gateway
PKG_VERSION:=1
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-gateway

View File

@ -24,7 +24,7 @@ execute_subshell() {
unset -f "$1"
. "$script"
if type "$1" | grep -q "shell function"; then
if type "$1" | grep -q "function" ; then
"$1"
fi
)