common: post-build.sh: Avoid duping fstab entries in dirty build

Delete the old entries with the same mountpoint.

Change-Id: I3b898f0ad3ee28a12f6262725ab233387050f0bf
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
This commit is contained in:
Jeffy Chen
2022-02-18 11:28:27 +08:00
parent d4516c7ba7
commit 48e4fc10f7

View File

@ -35,7 +35,7 @@ function fixup_part()
FS_TYPE=${3:-auto}
OPT=${4:-defaults}
sed -i "#[[:space:]]${MOUNT}[[:space:]]#d" ${TARGET_DIR}/etc/fstab
sed -i "/[[:space:]]${MOUNT//\//\\\/}[[:space:]]/d" ${TARGET_DIR}/etc/fstab
echo -e "${DEV}\t${MOUNT}\t${FS_TYPE}\t${OPT}\t0 2" >> \
${TARGET_DIR}/etc/fstab