dracut/0005-dracut-functions.sh-instmods-replace-egrep-with-shel.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

27 lines
938 B
Diff

From 86191581d125b1373532593371fde767a56728a0 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Sat, 25 Feb 2012 16:08:30 +0100
Subject: [PATCH] dracut-functions.sh: instmods(): replace egrep with shell
code
---
dracut-functions.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index 9e9ee4e..81801e1 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -1167,9 +1167,10 @@ instmods() {
return $_ret
}
+ local _filter_not_found='FATAL: Module .* not found.'
# Capture all stderr from modprobe to _fderr. We could use {var}>...
# redirections, but that would make dracut require bash4 at least.
eval "( instmods_1 \"\$@\" ) ${_fderr}>&1" \
- | egrep -v 'FATAL: Module .* not found.' | derror
+ | while read line; do [[ "$line" =~ $_filter_not_found ]] || echo $line;done | derror
return $?
}