]> git.corax.cc Git - toolbox/commitdiff
include/inst: Move instance root to /tmp
authorMatthias Kruk <m@m10k.eu>
Sat, 19 Nov 2022 04:34:26 +0000 (13:34 +0900)
committerMatthias Kruk <m@m10k.eu>
Sat, 19 Nov 2022 04:34:26 +0000 (13:34 +0900)
Instance data is currently kept in the user's home directory, which
has the side-effect that data from crashed instances is not removed
when the machine reboots. Such instances will be shown by `--list',
and prevent singleton instances to be started.

This commit addresses the issue by moving the instance root to /tmp,
which *should* be a non-persistent filesystem.

include/inst.sh

index 68b406fed47a26bcc5ca3e0636c22103564875b8..fe0f9caaa3cdb9082fa6866f1b8e3c49ff67588c 100644 (file)
@@ -31,7 +31,7 @@ __init() {
        fi
 
        declare -xgr __inst_name="$name"
-       declare -xgr __inst_root="$TOOLBOX_HOME/inst"
+       declare -xgr __inst_root="/tmp/$USER/toolbox/inst"
        declare -xgr __inst_path="$__inst_root/$__inst_name"
 
        if ! mkdir -p "$__inst_path"; then