mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-07-08 06:22:03 +08:00
cleanup startup params (#31068)
This commit is contained in:
Vendored
+1
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user