From 5938e836cffa9da92d9631f41cf6f0bc00f8aa59 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Mon, 26 Jul 2021 17:13:48 -0700 Subject: [PATCH] installer: hang around after done (#21728) old-commit-hash: a2bd5e002e616e2cef30459120f3a8ad57a13060 --- selfdrive/ui/qt/setup/installer.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/selfdrive/ui/qt/setup/installer.cc b/selfdrive/ui/qt/setup/installer.cc index e1e90d4555..d08827e575 100644 --- a/selfdrive/ui/qt/setup/installer.cc +++ b/selfdrive/ui/qt/setup/installer.cc @@ -150,10 +150,15 @@ void Installer::cloneFinished(int exitCode, QProcess::ExitStatus exitStatus) { #endif // write continue.sh - err = std::system("cp /data/openpilot/installer/continue_openpilot.sh " CONTINUE_PATH); + err = std::system("cp /data/openpilot/installer/continue_openpilot.sh /data/continue.sh.new"); + assert(err == 0); + err = std::system("chmod +x /data/continue.sh.new"); + assert(err == 0); + std::system("mv /data/continue.sh.new " CONTINUE_PATH); assert(err == 0); - QCoreApplication::exit(0); + // wait for the installed software's UI to take over + QTimer::singleShot(60 * 1000, &QCoreApplication::quit); } int main(int argc, char *argv[]) {