From: Harald Hoyer Date: Fri, 22 Jun 2012 06:57:20 +0000 (+0200) Subject: dracut-functions.sh: replace strstr() X-Git-Tag: 020~52 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=520047c3c4e1279f831b92939910de5c866d4848;p=thirdparty%2Fdracut.git dracut-functions.sh: replace strstr() the new strstr() is faster, when compared --- diff --git a/dracut-functions.sh b/dracut-functions.sh index d4a766b91..ace5a0bcf 100755 --- a/dracut-functions.sh +++ b/dracut-functions.sh @@ -21,7 +21,7 @@ # # Generic substring function. If $2 is in $1, return 0. -strstr() { [ "${1#*$2*}" != "$1" ]; } +strstr() { [[ $1 = *$2* ]]; } if ! [[ $dracutbasedir ]]; then dracutbasedir=${BASH_SOURCE[0]%/*}