dracut/0005-dracut-functions.sh-instmods-replace-egrep-with-shel.patch
Harald Hoyer 66318bb058 update to latest git
- fixes for convertfs (/usr-move)
2012-02-29 13:24:44 +01:00

27 lines
940 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 files changed, 2 insertions(+), 1 deletions(-)
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 $?
}