]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-functions.sh: instmods(): replace egrep with shell code
authorHarald Hoyer <harald@redhat.com>
Sat, 25 Feb 2012 15:08:30 +0000 (16:08 +0100)
committerHarald Hoyer <harald@redhat.com>
Sat, 25 Feb 2012 16:09:14 +0000 (17:09 +0100)
dracut-functions.sh

index 9e9ee4e56e48b794c9d98725724a25e2703435b6..81801e14533077d32c8d595fa6f51966c73b024c 100755 (executable)
@@ -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 $?
 }