From 67a8cea19a353af71227eb077d433e4b9cbe8cd4 Mon Sep 17 00:00:00 2001 From: "Kurt J. Bosch" Date: Mon, 11 Jul 2011 16:47:31 +0200 Subject: functions: Make in_array() non DAEMONS specific For checking whether a daemon is started via the DAEMONS array we use ck_autostart() now. So make in_array() generic as the name suggests instead of removing '@'-prefixes from array members behind ones back. Suggested-by: Dave Reisner --- functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'functions') diff --git a/functions b/functions index f564f3d..000ee0e 100644 --- a/functions +++ b/functions @@ -169,7 +169,7 @@ in_array() { local needle=$1; shift local item for item; do - [[ ${item#@} = $needle ]] && return 0 + [[ $item = $needle ]] && return 0 done return 1 # Not Found } -- cgit v1.2.3