diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2024-06-19 10:02:41 +0200 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2024-06-19 10:02:41 +0200 |
commit | 5afac2cf9815f1624e282850aeb32e78408c0878 (patch) | |
tree | 9fca7e3c2da85f8f9656427b57f0619f80cdb419 /board/common.sh | |
parent | 16cc62db836611212d597df4491a79cd8facd49a (diff) |
Correction: the same mount point could be add multiple times
Diffstat (limited to 'board/common.sh')
-rw-r--r-- | board/common.sh | 4 |
1 files 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__ |