Skip to content

Commit

Permalink
rootfs: delete links to deleted files
Browse files Browse the repository at this point in the history
Delete symbolic links to files being deleted.

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
  • Loading branch information
danmihai1 committed Jan 24, 2025
1 parent ef42ccf commit a3ca1b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/osbuilder/rootfs-builder/rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,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 {} \;
Expand All @@ -757,7 +757,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 {} \;
Expand Down

0 comments on commit a3ca1b5

Please sign in to comment.