Skip to content

Commit

Permalink
cleanup startup params (commaai#31068)
Browse files Browse the repository at this point in the history
  • Loading branch information
adeebshihadeh authored Jan 19, 2024
1 parent 7a6463b commit b4ebba3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ source ~/.bash_profile
if [ -f /TICI ]; then
source /etc/profile
rm -rf /tmp/tmp*
rm -rf ~/.commacache
if ! systemctl is-active --quiet systemd-resolved; then
Expand Down
10 changes: 6 additions & 4 deletions selfdrive/manager/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ def save_bootlog():
tmp = tempfile.mkdtemp()
shutil.copytree(Params().get_param_path() + "/..", tmp, dirs_exist_ok=True)

env = os.environ.copy()
env['PARAMS_ROOT'] = tmp

t = threading.Thread(target=subprocess.call, args=("./bootlog", ), kwargs={'cwd': os.path.join(BASEDIR, "system/loggerd"), 'env': env})
def fn(tmpdir):
env = os.environ.copy()
env['PARAMS_ROOT'] = tmpdir
subprocess.call("./bootlog", cwd=os.path.join(BASEDIR, "system/loggerd"), env=env)
shutil.rmtree(tmpdir)
t = threading.Thread(target=fn, args=(tmp, ))
t.daemon = True
t.start()

0 comments on commit b4ebba3

Please sign in to comment.