]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-functions.sh: turn off regexp for strstr()
authorHarald Hoyer <harald@redhat.com>
Wed, 22 Feb 2012 12:04:16 +0000 (13:04 +0100)
committerHarald Hoyer <harald@redhat.com>
Wed, 22 Feb 2012 15:13:20 +0000 (16:13 +0100)
dracut-functions.sh

index 17ffd680cbc4f1674b78faa986e54ab6cf195830..653f401b52b5408de0d2425db8949409c2c2f0ae 100755 (executable)
@@ -40,7 +40,7 @@ fi
 }
 
 # Generic substring function.  If $2 is in $1, return 0.
-strstr() { [[ $1 =~ $2 ]]; }
+strstr() { [ "${1#*$2*}" != "$1" ]; }
 
 # Create all subdirectories for given path without creating the last element.
 # $1 = path