dracut/0065-dracut-functions.sh-replace-strstr.patch
Harald Hoyer 53e9906e08 dracut-019-92.git20120625
- support vlan tagged binding
- speedup initramfs emergency service
- speedup image creation
- fix installkernel() return codes
Resolves: rhbz#833256
- add qemu and qemu-net modules to add qemu drivers even in host-only
- speedup btrfs and xfs fsck (nop)
- no more mknod in the initramfs (fixes plymouth on s390)
2012-06-25 14:08:03 +02:00

24 lines
692 B
Diff

From bc616b4d5660d8d79465202bdc3a1b43b4ea3ba1 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 22 Jun 2012 08:57:20 +0200
Subject: [PATCH] dracut-functions.sh: replace strstr()
the new strstr() is faster, when compared
---
dracut-functions.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index d4a766b..ace5a0b 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]%/*}