From a16a1a3cf8b8248bf8ff35965ea2b5cad7378cdd Mon Sep 17 00:00:00 2001 From: Alex Bee Date: Sat, 11 Feb 2023 09:22:33 +0100 Subject: [PATCH] scripts/image: add --remove-destination when copying filesystem This is required to override symlinks which might exist there already. --- scripts/image | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/image b/scripts/image index 7a0d80acfd..4c458d36c2 100755 --- a/scripts/image +++ b/scripts/image @@ -184,7 +184,7 @@ ln -sf /etc/issue ${INSTALL}/etc/motd # Copy PROJECT related files to filesystem if [ -d "${PROJECT_DIR}/${PROJECT}/filesystem" ]; then - cp -PR ${PROJECT_DIR}/${PROJECT}/filesystem/* ${INSTALL} + cp -PR --remove-destination ${PROJECT_DIR}/${PROJECT}/filesystem/* ${INSTALL} # Install project specific systemd services for service in ${PROJECT_DIR}/${PROJECT}/filesystem/usr/lib/systemd/system/*.service; do if [ -f "${service}" ]; then @@ -195,7 +195,7 @@ fi # Copy DEVICE related files to filesystem if [ -n "${DEVICE}" -a -d "${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/filesystem" ]; then - cp -PR ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/filesystem/* ${INSTALL} + cp -PR --remove-destination ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/filesystem/* ${INSTALL} # Install device specific systemd services for service in ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/filesystem/usr/lib/systemd/system/*.service; do if [ -f "${service}" ]; then