diff --git a/board/myna-player-odyssey/rootfs_patches/dt-utils/0002-barebox-state-hardcode-lock-file-to-run-barebox-state.patch b/board/myna-player-odyssey/rootfs_patches/dt-utils/0002-barebox-state-hardcode-lock-file-to-run-barebox-state.patch new file mode 100644 index 0000000..c634962 --- /dev/null +++ b/board/myna-player-odyssey/rootfs_patches/dt-utils/0002-barebox-state-hardcode-lock-file-to-run-barebox-state.patch @@ -0,0 +1,37 @@ +From f28f46a3094dc19d78b574741c3f024336752c6a Mon Sep 17 00:00:00 2001 +From: Xogium +Date: Thu, 31 Dec 2020 07:09:16 -0500 +Subject: [PATCH] barebox-state: hardcode lock file to /run/barebox-state + instead + +This is required on newest systemd where sysvinit compatibility is disabled. Directories like /var/run/lock, /var/lock and /run/lock don't get created anymore, so we work around this. +--- + src/barebox-state.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/barebox-state.c b/src/barebox-state.c +index 946a8db..f7bebd7 100644 +--- a/src/barebox-state.c ++++ b/src/barebox-state.c +@@ -505,15 +505,15 @@ int main(int argc, char *argv[]) + ++nr_states; + } + +- lock_fd = open("/var/lock/barebox-state", O_CREAT | O_RDWR, 0600); ++ lock_fd = open("/run/barebox-state", O_CREAT | O_RDWR, 0600); + if (lock_fd < 0) { +- pr_err("Failed to open lock-file /var/lock/barebox-state\n"); ++ pr_err("Failed to open lock-file /run/barebox-state\n"); + exit(1); + } + + ret = flock(lock_fd, LOCK_EX); + if (ret < 0) { +- pr_err("Failed to lock /var/lock/barebox-state: %m\n"); ++ pr_err("Failed to lock /run/barebox-state: %m\n"); + close(lock_fd); + exit(1); + } +-- +2.29.2 +