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