inject.sh: redirect stderer to /dev/null FIRST

for the grep command, we must ensure that errors are
suppressed *BEFORE* outputting to a file. depending
on the sh implementation, the previous code might
have begun outputting to a file before suppressing
errors.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-08-29 04:44:52 +01:00
parent 50a0bac01c
commit d9011da0eb
+1 -1
View File
@@ -112,7 +112,7 @@ readkconfig()
scankconfig()
{
for cbc in $cv; do
grep "$cbc" "$1" 1>>"$xbtmp/cbcfg" 2>/dev/null || :
grep "$cbc" "$1" 2>/dev/null 1>>"$xbtmp/cbcfg" || :
done
}