Skip to content

Commit

Permalink
cleanup: Allow rm -f to fail on msdos mounts
Browse files Browse the repository at this point in the history
  • Loading branch information
jlduran committed Jul 30, 2024
1 parent ab2edab commit 387db0d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ sed -i '' -e 's/^PermitRootLogin yes/#PermitRootLogin no/' /etc/ssh/sshd_config

# Purge files we no longer need
rm -rf /boot/kernel.old
rm -f /boot/efi/EFI/FreeBSD/*-old.efi
rm -f /boot/efi/EFI/BOOT/*-old.efi
rm -f /etc/hostid
rm -f /etc/machine-id
rm -f /etc/ssh/ssh_host_*
Expand All @@ -19,3 +17,9 @@ rm -f /var/db/freebsd-update/*-rollback
rm -rf /var/db/freebsd-update/install.*
rm -f /var/db/pkg/repo-*.sqlite
rm -rf /var/log/*

# /boot/efi is an MS-DOS mount,
# allow rm -f to fail (EINVAL)
set +e
rm -f /boot/efi/EFI/FreeBSD/*-old.efi
rm -f /boot/efi/EFI/BOOT/*-old.efi

0 comments on commit 387db0d

Please sign in to comment.