mirror of
https://github.com/raspberrypi/rpi-eeprom.git
synced 2026-01-20 21:13:36 +08:00
Fix rpi-eeprom-update when using busybox find
The busybox implementation of find does not detect recursive nested symlinks, this results in it finding multiple instances of of_node matching -samefile, the result of which then fails the -e path test. The of_node symlink we're tyring to find should match the path /sys/bus/nvmem/devices/*/of_node so just limit the find depth to 3 as there's no point searching deeper than that. Signed-off-by: Allan Xavier <mr.a.xavier@googlemail.com>
This commit is contained in:
@@ -126,7 +126,7 @@ getBootloaderConfig() {
|
|||||||
|
|
||||||
if [ -f "${blconfig_alias}" ]; then
|
if [ -f "${blconfig_alias}" ]; then
|
||||||
local blconfig_ofnode_path="/sys/firmware/devicetree/base"$(strings "${blconfig_alias}")""
|
local blconfig_ofnode_path="/sys/firmware/devicetree/base"$(strings "${blconfig_alias}")""
|
||||||
local blconfig_ofnode_link=$(find -L /sys/bus/nvmem -samefile "${blconfig_ofnode_path}" 2>/dev/null)
|
local blconfig_ofnode_link=$(find -L /sys/bus/nvmem -maxdepth 3 -samefile "${blconfig_ofnode_path}" 2>/dev/null)
|
||||||
|
|
||||||
if [ -e "${blconfig_ofnode_link}" ]; then
|
if [ -e "${blconfig_ofnode_link}" ]; then
|
||||||
blconfig_nvmem_path=$(dirname "${blconfig_ofnode_link}")
|
blconfig_nvmem_path=$(dirname "${blconfig_ofnode_link}")
|
||||||
|
|||||||
Reference in New Issue
Block a user