From d82d08db06e37ead99880c3dd2ccc58eb3453be0 Mon Sep 17 00:00:00 2001 From: "Ivan T. Ivanov" Date: Mon, 30 Jan 2023 12:19:17 +0200 Subject: [PATCH] rpi-eeprom-update: Follow links when looking for latest EEPROM latest and default are links to directories, so follow them. Before: /usr/bin/rpi-eeprom-update BOOTLOADER: up to date CURRENT: Wed Jan 11 17:40:52 UTC 2023 (1673458852) LATEST: Thu Jan 1 00:00:00 UTC 1970 (0) RELEASE: critical (/lib/firmware/raspberrypi/bootloader/critical) After: /usr/bin/rpi-eeprom-update BOOTLOADER: up to date CURRENT: Wed Jan 11 17:40:52 UTC 2023 (1673458852) LATEST: Wed Jan 11 17:40:52 UTC 2023 (1673458852) RELEASE: critical (/lib/firmware/raspberrypi/bootloader/critical) Signed-off-by: Ivan T. Ivanov --- rpi-eeprom-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpi-eeprom-update b/rpi-eeprom-update index cb25316..be0f4e5 100755 --- a/rpi-eeprom-update +++ b/rpi-eeprom-update @@ -308,7 +308,7 @@ BOOTLOADER_UPDATE_VERSION=0 getBootloaderUpdateVersion() { BOOTLOADER_UPDATE_VERSION=0 match=".*/pieeprom-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].bin" - latest="$(find "${FIRMWARE_IMAGE_DIR}/" -maxdepth 1 -type f -size "${EEPROM_SIZE}c" -regex "${match}" | sort -r | head -n1)" + latest="$(find "${FIRMWARE_IMAGE_DIR}/" -maxdepth 1 -type f -follow -size "${EEPROM_SIZE}c" -regex "${match}" | sort -r | head -n1)" if [ -f "${latest}" ]; then BOOTLOADER_UPDATE_VERSION=$(strings "${latest}" | grep BUILD_TIMESTAMP | sed 's/.*=//g') BOOTLOADER_UPDATE_IMAGE="${latest}"