[u-boot-test-hooks PATCH 3/7] rpi3: Tweak the grep pattern
Simon Glass
sjg at chromium.org
Sat Oct 30 20:25:35 CEST 2021
Just to be safe, check for the pattern only at the start of a line, since
it is possible to add a comment with this in it.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
bin/writer.rpi3_mount | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/writer.rpi3_mount b/bin/writer.rpi3_mount
index 7b078a1..97f24a5 100755
--- a/bin/writer.rpi3_mount
+++ b/bin/writer.rpi3_mount
@@ -41,7 +41,7 @@ fi
# Enable the UART and fix the GPU frequency so it works correctly
sed -i '/enable_uart/c\enable_uart = 1' /media/rpi3_b_boot/config.txt
-if ! grep -q gpu_freq=250 /media/rpi3_b_boot/config.txt; then
+if ! grep -q "^gpu_freq=250" /media/rpi3_b_boot/config.txt; then
echo 'gpu_freq=250' >>/media/rpi3_b_boot/config.txt
fi
--
2.33.1.1089.g2158813163f-goog
More information about the U-Boot
mailing list