aboutsummaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorKurt J. Bosch <kjb-temp-2009@alpenjodel.de>2011-07-11 16:47:31 +0200
committerKurt J. Bosch <kjb-temp-2009@alpenjodel.de>2011-07-12 17:22:39 +0200
commit67a8cea19a353af71227eb077d433e4b9cbe8cd4 (patch)
treeba1beeaee0316bde5408d421f6d011f38ad91a3f /functions
parent7cc6e8dc3254e4e061db822511522634d329c2b3 (diff)
downloadinitscripts-67a8cea19a353af71227eb077d433e4b9cbe8cd4.tar.xz
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 <d@falconindy.com>
Diffstat (limited to 'functions')
-rw-r--r--functions2
1 files changed, 1 insertions, 1 deletions
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
}