Corrected some reboot functions

This commit is contained in:
Nicolas Mailloux 2021-06-22 08:22:27 -04:00
parent 3a2c90794d
commit f8decc2a5d

View file

@ -147,11 +147,7 @@ void generalDialog::on_okBtn_clicked()
// We set a custom boot flag and reboot silently in Diagnostics // We set a custom boot flag and reboot silently in Diagnostics
string_writeconfig("/external_root/boot/flags/DIAGS_BOOT", "true"); string_writeconfig("/external_root/boot/flags/DIAGS_BOOT", "true");
string_writeconfig("/external_root/boot/flags/DO_SOFT_RESET", "true"); string_writeconfig("/external_root/boot/flags/DO_SOFT_RESET", "true");
QString prog ("/sbin/reboot"); reboot(false);
QStringList args;
QProcess *proc = new QProcess();
proc->start(prog, args);
proc->waitForFinished();
} }
else { else {
// Restore default settings, we're not on InkBox OS // Restore default settings, we're not on InkBox OS
@ -172,11 +168,7 @@ void generalDialog::on_okBtn_clicked()
string_writeconfig("/mnt/onboard/onboard/.inkbox/can_really_update", "true"); string_writeconfig("/mnt/onboard/onboard/.inkbox/can_really_update", "true");
string_writeconfig("/external_root/opt/update/will_update", "true"); string_writeconfig("/external_root/opt/update/will_update", "true");
string_writeconfig("/external_root/boot/flags/WILL_UPDATE", "true"); string_writeconfig("/external_root/boot/flags/WILL_UPDATE", "true");
QString prog ("reboot"); reboot(true);
QStringList args;
QProcess *proc = new QProcess();
proc->start(prog, args);
proc->waitForFinished();
} }
if(usbmsDialog == true) { if(usbmsDialog == true) {
global::usbms::usbmsDialog = false; global::usbms::usbmsDialog = false;