Double verification of the string before invoking it.

This commit is contained in:
Ronny Nilsson 2019-12-03 15:38:58 +01:00
parent 0a80afc550
commit 3ccdcb4140

View file

@ -25,7 +25,7 @@ source /lib/upgrade/iopsys.sh
# only call function if it exists
function_call() {
if type "$1" 2>/dev/null >/dev/null
if [ -n "$1" ] && type "$1" 2>/dev/null >/dev/null
then
$1 "$@" || exit
fi