Skip to content

Commit

Permalink
Only clean up pod filesystems if umount succeeds
Browse files Browse the repository at this point in the history
Signed-off-by: Brad Davidson <[email protected]>
(cherry picked from commit abfac1f)
Signed-off-by: Brad Davidson <[email protected]>
  • Loading branch information
brandond committed Nov 14, 2024
1 parent af35954 commit af93505
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bundle/bin/rke2-killall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ do_unmount_and_remove() {
MOUNTS=$(printf ${MOUNTS} | grep "^$1" | sort -r)
if [ -n "${MOUNTS}" ]; then
set -x
umount ${MOUNTS}
rm -rf --one-file-system ${MOUNTS}
umount -- ${MOUNTS} && rm -rf --one-file-system -- ${MOUNTS}
else
set -x
fi
Expand Down

0 comments on commit af93505

Please sign in to comment.