From e633d453ff2bdd8b4bb66bdad2d2f830be8950a5 Mon Sep 17 00:00:00 2001 From: Scott Fan Date: Wed, 24 Sep 2025 23:43:15 +0800 Subject: [PATCH] board/qemu/{x86, x86_64}: fix shellcheck warning in post-build.sh This removes a warning reported by shellcheck: "Double quote to prevent globbing and word splitting". As a result, the file can be removed from .checkpackageignore. Signed-off-by: Scott Fan Signed-off-by: Julien Olivain (cherry picked from commit e7937c52b6da69c4ff7de5ce40d836a0636c775c) Signed-off-by: Titouan Christophe --- .checkpackageignore | 2 -- board/qemu/x86/post-build.sh | 6 +++--- board/qemu/x86_64/post-build.sh | 6 +++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.checkpackageignore b/.checkpackageignore index fe7f4ad0ee..9422706794 100644 --- a/.checkpackageignore +++ b/.checkpackageignore @@ -48,8 +48,6 @@ board/orangepi/orangepi-zero/patches/linux/0002-ARM-dts-orange-pi-zero-enable-sp board/orangepi/orangepi-zero/patches/linux/0003-ARM-dts-orange-pi-zero-enable-spidev.patch lib_patch.Upstream board/orangepi/orangepi-zero/patches/linux/0004-ARM-dts-orange-pi-zero-enable-uart.patch lib_patch.Upstream board/qemu/aarch64-sbsa/assemble-flash-images Shellcheck -board/qemu/x86/post-build.sh Shellcheck -board/qemu/x86_64/post-build.sh Shellcheck board/raspberrypi/post-build.sh Shellcheck board/raspberrypi/post-image.sh Shellcheck board/roseapplepi/patches/uboot/0001-compiler-.h-sync-include-linux-compiler-.h-with-Linu.patch lib_patch.Upstream diff --git a/board/qemu/x86/post-build.sh b/board/qemu/x86/post-build.sh index bf83a002c2..24eee7f0e5 100755 --- a/board/qemu/x86/post-build.sh +++ b/board/qemu/x86/post-build.sh @@ -4,8 +4,8 @@ set -u set -e # Add a console on tty1 -if [ -e ${TARGET_DIR}/etc/inittab ]; then - grep -qE '^tty1::' ${TARGET_DIR}/etc/inittab || \ +if [ -e "${TARGET_DIR}/etc/inittab" ]; then + grep -qE '^tty1::' "${TARGET_DIR}/etc/inittab" || \ sed -i '/GENERIC_SERIAL/a\ -tty1::respawn:/sbin/getty -L tty1 0 vt100 # QEMU graphical window' ${TARGET_DIR}/etc/inittab +tty1::respawn:/sbin/getty -L tty1 0 vt100 # QEMU graphical window' "${TARGET_DIR}/etc/inittab" fi diff --git a/board/qemu/x86_64/post-build.sh b/board/qemu/x86_64/post-build.sh index bf83a002c2..24eee7f0e5 100755 --- a/board/qemu/x86_64/post-build.sh +++ b/board/qemu/x86_64/post-build.sh @@ -4,8 +4,8 @@ set -u set -e # Add a console on tty1 -if [ -e ${TARGET_DIR}/etc/inittab ]; then - grep -qE '^tty1::' ${TARGET_DIR}/etc/inittab || \ +if [ -e "${TARGET_DIR}/etc/inittab" ]; then + grep -qE '^tty1::' "${TARGET_DIR}/etc/inittab" || \ sed -i '/GENERIC_SERIAL/a\ -tty1::respawn:/sbin/getty -L tty1 0 vt100 # QEMU graphical window' ${TARGET_DIR}/etc/inittab +tty1::respawn:/sbin/getty -L tty1 0 vt100 # QEMU graphical window' "${TARGET_DIR}/etc/inittab" fi