File 0167-98systemd-rootfs-generator-Use-builtins-instead-of-g.patch of Package dracut.892

From 0b9f9d4d5417c3ad58778dedf7bd2228cc1153c6 Mon Sep 17 00:00:00 2001
From: Julian Wolf <juwolf@suse.de>
Date: Fri, 17 Oct 2014 13:54:29 +0200
Subject: 98systemd/rootfs-generator: Use builtins instead of 'grep'

References: bnc#897252

Signed-off-by: Julian Wolf <juwolf@suse.de>
---
 modules.d/98systemd/rootfs-generator.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules.d/98systemd/rootfs-generator.sh b/modules.d/98systemd/rootfs-generator.sh
index 8473784..d9b7be2 100755
--- a/modules.d/98systemd/rootfs-generator.sh
+++ b/modules.d/98systemd/rootfs-generator.sh
@@ -112,7 +112,8 @@ esac
 if [ "${root%%:*}" = "block" ]; then
    generator_wait_for_dev "${root#block:}" "$RDRETRY"
    generator_fsck_after_pre_mount "${root#block:}"
-   grep -q 'root=' /proc/cmdline || generator_mount_rootfs "${root#block:}" "$(getarg rootfstype=)" "$(getarg rootflags=)"
+   cmdline=$(</proc/cmdline)
+   test "$cmdline" = "${cmdline#*root=}" && generator_mount_rootfs "${root#block:}" "$(getarg rootfstype=)" "$(getarg rootflags=)"
 fi
 
 exit 0
-- 
1.8.4.5