scripts/image: add --remove-destination when copying filesystem

This is required to override symlinks which might exist there already.
This commit is contained in:
Alex Bee 2023-02-11 09:22:33 +01:00
parent fcdf6fa397
commit a16a1a3cf8

View File

@ -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