mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
projects/Amlogic: fix update script when no *.dtb in /flash
If there is no file matching /flash/*.dtb wildcard, the loop will proceed with all_dtb="/flash/*.dtb", causing erratic behaviour in next script steps. Fix this by checking if exists before proceeding.
This commit is contained in:
parent
760c839f1f
commit
695d78e4aa
@ -75,12 +75,14 @@ for arg in $(cat /proc/cmdline); do
|
||||
esac
|
||||
fi
|
||||
|
||||
for all_dtb in /flash/*.dtb /flash/DTB; do
|
||||
dtb=$(basename $all_dtb)
|
||||
if [ -f $SYSTEM_ROOT/usr/share/bootloader/$dtb ]; then
|
||||
echo "*** updating Device Tree Blob: $dtb ..."
|
||||
mount -o rw,remount $BOOT_ROOT
|
||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT
|
||||
for all_dtb in /flash/*.dtb ; do
|
||||
if [ -f $all_dtb ] ; then
|
||||
dtb=$(basename $all_dtb)
|
||||
if [ -f $SYSTEM_ROOT/usr/share/bootloader/$dtb ]; then
|
||||
echo "*** updating Device Tree Blob: $dtb ..."
|
||||
mount -o rw,remount $BOOT_ROOT
|
||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT
|
||||
fi
|
||||
fi
|
||||
done
|
||||
;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user