mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +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
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for all_dtb in /flash/*.dtb /flash/DTB; do
|
for all_dtb in /flash/*.dtb ; do
|
||||||
dtb=$(basename $all_dtb)
|
if [ -f $all_dtb ] ; then
|
||||||
if [ -f $SYSTEM_ROOT/usr/share/bootloader/$dtb ]; then
|
dtb=$(basename $all_dtb)
|
||||||
echo "*** updating Device Tree Blob: $dtb ..."
|
if [ -f $SYSTEM_ROOT/usr/share/bootloader/$dtb ]; then
|
||||||
mount -o rw,remount $BOOT_ROOT
|
echo "*** updating Device Tree Blob: $dtb ..."
|
||||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT
|
mount -o rw,remount $BOOT_ROOT
|
||||||
|
cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user