
On Fri, Feb 10, 2023 at 05:05:39PM +0800, Tim Lee wrote:
According this issue https://github.com/ppp-project/ppp/issues/339. Eventually, the dt-utils changed lock directory to fix missing /var/lock directory error then make dt-utils can run normally.
We also have a similar issue with these two utilities fw_printenv and fw_setenv will failed when the directory /var/lock is non-existent.
We have a custom linux distribution built with yocto (OpenBMC) that use systemd and it deprecated the /var/lock directory. More discussion in systemd/systemd#15668.
Thus, we sync with community's solution for uboot/tools/env utilities: The current location /var/lock is considered legacy (at least by systemd). Just use /run to store the lockfile and append the usual .lock suffix.
Tested: Verified /run/lock is now present and fw_printenv can work in OpenBMC.
Signed-off-by: Tim Lee timlee660101@gmail.com Reviewed-by: Tom Rini trini@konsulko.com Reviewed-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!