mirror of
https://github.com/brain-hackers/brain-config.git
synced 2024-12-22 20:20:06 +09:00
Require matching EEPROM file for boot order setting
This commit is contained in:
parent
b56fe9f8d7
commit
4eb2224f0f
@ -1196,17 +1196,16 @@ do_boot_order() {
|
|||||||
fi
|
fi
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
CURDATE=$(date -d "`vcgencmd bootloader_version | head -n 1`" +%Y%m%d)
|
CURDATE=$(date -d "`vcgencmd bootloader_version | head -n 1`" +%Y%m%d)
|
||||||
LATEST=0
|
FILNAME="none"
|
||||||
for filename in /lib/firmware/raspberrypi/bootloader/critical/pieeprom*.bin ; do
|
for filename in /lib/firmware/raspberrypi/bootloader/critical/pieeprom*.bin ; do
|
||||||
FILDATE=$(date -d "`echo $filename | cut -d - -f 2- | cut -d . -f 1`" +%Y%m%d)
|
FILDATE=$(date -d "`echo $filename | cut -d - -f 2- | cut -d . -f 1`" +%Y%m%d)
|
||||||
if [ $FILDATE -gt $LATEST ]; then
|
if [ $FILDATE -eq $CURDATE ]; then
|
||||||
LATEST=$FILDATE
|
|
||||||
FILNAME=$filename
|
FILNAME=$filename
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ $CURDATE -lt $LATEST ]; then
|
if [ "$FILNAME" = "none" ]; then
|
||||||
if [ "$INTERACTIVE" = True ]; then
|
if [ "$INTERACTIVE" = True ]; then
|
||||||
whiptail --msgbox "No up-to-date EEPROM bin file - aborting" 20 60 2
|
whiptail --msgbox "No matching EEPROM bin file - aborting" 20 60 2
|
||||||
fi
|
fi
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user