From 5afac2cf9815f1624e282850aeb32e78408c0878 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Wed, 19 Jun 2024 10:02:41 +0200 Subject: Correction: the same mount point could be add multiple times --- board/common.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/common.sh b/board/common.sh index 8153c2b..6e05d2a 100644 --- a/board/common.sh +++ b/board/common.sh @@ -1,5 +1,5 @@ create_missing_dir() { - test -d "${TARGET_DIR}/$1" || mkdir "${TARGET_DIR}/$1" + test -d "${TARGET_DIR}/$1" || mkdir -p "${TARGET_DIR}/$1" } remove_text() { @@ -9,7 +9,7 @@ remove_text() { add_tmpfs() { create_missing_dir "$1" - if ! grep -qE '$1' "${TARGET_DIR}/etc/fstab"; then + if ! grep -q "$1" "${TARGET_DIR}/etc/fstab"; then cat << __EOF__ >> "${TARGET_DIR}/etc/fstab" tmpfs $1 tmpfs rw 0 0 __EOF__ -- cgit v1.2.3