mirror of
https://github.com/raspberrypi/rpi-eeprom.git
synced 2026-01-20 21:13:36 +08:00
rpi-eeprom-config: Trap errors when deleting previous update files
This commit is contained in:
@@ -631,6 +631,7 @@ removePreviousUpdates()
|
|||||||
if [ "$(id -u)" = "0" ]; then
|
if [ "$(id -u)" = "0" ]; then
|
||||||
findBootFS
|
findBootFS
|
||||||
|
|
||||||
|
(
|
||||||
# Remove any stale recovery.bin files or EEPROM images
|
# Remove any stale recovery.bin files or EEPROM images
|
||||||
# N.B. recovery.bin is normally ignored by the ROM if is not a valid
|
# N.B. recovery.bin is normally ignored by the ROM if is not a valid
|
||||||
# executable but it's best to not have the file at all.
|
# executable but it's best to not have the file at all.
|
||||||
@@ -639,6 +640,7 @@ removePreviousUpdates()
|
|||||||
rm -f "${BOOTFS}/vl805.bin" "${BOOTFS}/vl805.sig"
|
rm -f "${BOOTFS}/vl805.bin" "${BOOTFS}/vl805.sig"
|
||||||
# Case insensitive for FAT bootfs
|
# Case insensitive for FAT bootfs
|
||||||
find "${BOOTFS}" -maxdepth 1 -type f -follow -iname "recovery.*" -regex '.*\.[0-9][0-9][0-9]$' -exec rm -f {} \;
|
find "${BOOTFS}" -maxdepth 1 -type f -follow -iname "recovery.*" -regex '.*\.[0-9][0-9][0-9]$' -exec rm -f {} \;
|
||||||
|
) || die "Failed to remove previous update files"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user