dracut/0004-dracut-functions.sh-get_fs_env-replaced-egrep-with-s.patch
Harald Hoyer 9e9f8f2f11 dracut-017-43.git20120312
- live image: fixed image uncompression
- live updates for livenet
2012-03-12 15:46:29 +01:00

26 lines
869 B
Diff

From 07f3e4f1689545bd5817c785ee97a3f668239014 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Sat, 25 Feb 2012 16:07:45 +0100
Subject: [PATCH] dracut-functions.sh: get_fs_env() replaced egrep with shell
---
dracut-functions.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index bb0c96f..9e9ee4e 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -168,7 +168,10 @@ get_fs_env() {
[[ $1 ]] || return
unset ID_FS_TYPE
unset ID_FS_UUID
- eval $(udevadm info --query=env --name=$1|egrep 'ID_FS_(TYPE|UUID)=')
+ eval $(udevadm info --query=env --name=$1 \
+ | while read line; do
+ [[ "$line" =~ 'ID_FS_(TYPE|UUID)=' ]] && echo $line;
+ done)
[[ $ID_FS_TYPE ]] && return
if [[ -x /lib/udev/vol_id ]]; then