diff options
author | Leah Rowe <leah@libreboot.org> | 2025-09-09 11:51:27 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-09-09 11:56:36 +0100 |
commit | 269fa65b93adc74d61c7e610aa7d75f74897cd68 (patch) | |
tree | 3682e47c5f45b8a02460d79b7a347f40b8d7f319 /include/init.sh | |
parent | dea587a16f9629ceb8e73b3114ba578da7b2be46 (diff) |
init.sh: write-protect the lock file on startup
you can still remove it with the -f flag on rm, but
xbmk only does that on exit from the main parent
instance, or after each build stage in release.sh
because of this, the user could still manually override
the lock file; this would cause running instances of lbmk
to restart wrongly as parent instances.
there's no way to fix any of this, but users don't normally
put -f in their rm commands.
however, this is also a preventative bug fix. if a bug
is ever caused in the future, where the lock file is
created erroneously, the write protection will prevent that,
so long as *it* is still done.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/init.sh')
-rw-r--r-- | include/init.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/init.sh b/include/init.sh index 9b39919d..d2ec4f16 100644 --- a/include/init.sh +++ b/include/init.sh @@ -84,6 +84,7 @@ xbmk_set_env() xbmk_parent_check_tmp printf "%s\n" "$xbtmp" > "$xbmklock" || \ err "cannot create '$xbmklock'"; : + x_ chmod -w "$xbmklock" xbmk_parent_set_export xbmk_set_version |