mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-28 08:37:22 -08:00
Install developer key if one is found
This commit is contained in:
parent
81f179af49
commit
482d90f910
1 changed files with 13 additions and 6 deletions
|
@ -493,13 +493,20 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write current running version to a file for utility purposes
|
// If the DEVKEY file is present, install a developer key
|
||||||
{
|
if(QFile::exists("/mnt/onboard/onboard/.inkbox/DEVKEY") == true && QFile::exists("/mnt/onboard/onboard/.inkbox/DEVKEY.dgst")) {
|
||||||
string_checkconfig_ro("/external_root/opt/isa/version");
|
string_checkconfig_ro("/mnt/onboard/onboard/.inkbox/DEVKEY");
|
||||||
std::string inkbox_version = checkconfig_str_val.toStdString();
|
QString developerKey = checkconfig_str_val.left(256);
|
||||||
string_writeconfig("/opt/version", inkbox_version);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
setDefaultWorkDir();
|
||||||
|
QString prog ("sh");
|
||||||
|
QStringList args;
|
||||||
|
args << "install_developer-key.sh" << developerKey << "/mnt/onboard/onboard/.inkbox/DEVKEY.dgst";
|
||||||
|
QProcess *proc = new QProcess();
|
||||||
|
proc->start(prog, args);
|
||||||
|
|
||||||
|
reboot(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
|
|
Loading…
Reference in a new issue