From c4da2963264ece6afe47ee69d9017992afe2d160 Mon Sep 17 00:00:00 2001 From: Dan Mihai Date: Mon, 13 Jan 2025 21:07:53 +0000 Subject: [PATCH] rootfs: delete links to deleted files Delete symbolic links to files being deleted. Signed-off-by: Dan Mihai --- tools/osbuilder/rootfs-builder/rootfs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/osbuilder/rootfs-builder/rootfs.sh b/tools/osbuilder/rootfs-builder/rootfs.sh index 4f79a3fba1..e377e25f7e 100755 --- a/tools/osbuilder/rootfs-builder/rootfs.sh +++ b/tools/osbuilder/rootfs-builder/rootfs.sh @@ -837,7 +837,7 @@ delete_unnecessary_files() info "Removing unneeded systemd services and sockets" for u in "${systemd_units[@]}"; do find "${ROOTFS_DIR}" \ - -type f \ + \( -type f -o -type l \) \ \( -name "${u}.service" -o -name "${u}.socket" \) \ -exec echo "deleting {}" \; \ -exec rm -f {} \; @@ -846,7 +846,7 @@ delete_unnecessary_files() info "Removing unneeded systemd files" for u in "${systemd_files[@]}"; do find "${ROOTFS_DIR}" \ - -type f \ + \( -type f -o -type l \) \ -name "${u}" \ -exec echo "deleting {}" \; \ -exec rm -f {} \;