Fix U-Boot environment handling (#1001)

* Use /run as default location for lock files for U-Boot tools

While there is a command line parameter to set the lock file explicitly,
there are other tools invoking fw_setenv (in particular rauc) which do
not set the lock file. Using /run by default makes fw_setenv use the
correct lock file in all situations.

* Don't explicitly set lock file location

Since we patch U-Boot tools to use /run by default setting it explicitly
is unnecessary.
This commit is contained in:
Stefan Agner
2020-11-17 15:15:50 +01:00
committed by GitHub
parent 29e92f4231
commit 39debca9fc
2 changed files with 51 additions and 2 deletions

View File

@@ -8,9 +8,9 @@ MACHINE_ID=$(cat /etc/machine-id)
if [ -e /usr/sbin/fw_setenv ]; then
# machine-id
if [ "$(fw_printenv -l /run -n MACHINE_ID)" != "${MACHINE_ID}" ]; then
if [ "$(fw_printenv -n MACHINE_ID)" != "${MACHINE_ID}" ]; then
echo "[INFO] set machine-id to ${MACHINE_ID}"
fw_setenv -l /run MACHINE_ID "${MACHINE_ID}"
fw_setenv MACHINE_ID "${MACHINE_ID}"
else
echo "[INFO] machine-id is okay"
fi