Closed sysrich closed 2 years ago
FWIW, I like this change quite a bit, and I think it's a big improvement in the toolbox experience (and I'm also using toolbox as my main environment since, well, more than a year).
I also would be in favor of making it the default behavior, at least for user (i.e., the -u
ones) toolboxes, but it's indeed best to do things in steps.
Background
I'm using MicroOS Desktop as my daily driver and so am running toolbox pretty much as my main 'work shell' for all my day to day ops, with a custom image based on the official toolbox image with just a few extras I need (osc, zsh, etc)
My daily workflow has been as follows
Start at least 2 copies of
gnome-terminal
Runtoolbox -u
in each gnome-terminalsudo zsh
in at least one of those toolboxesThe
sudo zsh
(insidetoolbox -u
) shell ends up being myosc
environment for staging/Factory release management, using different OBS auth than my regulartoolbox -u
shellThe problem is, if I exit ANY of my
toolbox -u
sessions, they all die, because the container gets stopped on exit as part of the cleanup trap.This is really annoying, and so, I wanted a fix
TL;DR / The Fix This PR introduces a
-n / --nostop
switch fortoolbox
which prevents the container from getting cleaned up on exit.The tmp_user_setup script cleanup still happens, but the container remains running
This means
toolbox -u -n
can be called repeatedly, at the same time, and all of those sessions will remain valid and work even as they are closed down.Personally, I'd like this behaviour as the default, but figured I'd start with this change and see how it's accepted.
This has been tested..it's the code I'm actually running myself for my daily work with toolbox.