Tim Lee aeb40f1166 tools: env: use /run to store lockfile
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>
2023-04-06 19:10:05 -04:00
..
2023-04-03 16:45:41 -04:00
2023-04-04 14:50:47 -04:00
2023-02-04 18:19:00 +01:00
2023-03-08 13:15:14 -08:00
2023-03-14 16:08:52 -06:00
2019-07-29 00:20:31 +02:00
2021-01-13 02:38:00 +01:00
2023-03-14 16:08:52 -06:00
2022-12-08 09:29:02 -05:00
2022-01-19 18:11:34 +01:00
2023-01-27 12:51:26 -05:00
2022-01-28 17:58:41 -05:00
2023-03-14 16:08:52 -06:00
2023-02-07 14:33:48 -05:00
2022-01-19 18:11:34 +01:00
2019-11-04 18:15:32 -07:00