Read machine-nr, customer-nr and zone-nr from /mnt/system_data/

rather then the deprecated /etc-directory.
This commit is contained in:
Gerhard Hoffmann 2023-11-29 11:29:52 +01:00
parent a6faf9ce21
commit 0888c1b525

View File

@ -85,6 +85,12 @@ int main(int argc, char *argv[]) {
QString const rtPath = QCoreApplication::applicationDirPath();
int const machineNr = Utils::read1stLineOfFile("/mnt/system_data/machine_nr");
int const customerNr = Utils::read1stLineOfFile("/mnt/system_data/cust_nr");
int const zoneNr = Utils::read1stLineOfFile("/mnt/system_data/zone_nr");
QString const branchName = (zoneNr != 0)
? QString("zg1/zone%1").arg(zoneNr) : "master";
qInfo() << "pwd ......................" << rtPath;
qInfo() << "repositoryUrl ............" << repositoryUrl;
qInfo() << "plugInDir ................" << plugInDir;
@ -99,6 +105,9 @@ int main(int argc, char *argv[]) {
qInfo() << "showExtendedVersion ......" << showExtendedVersion;
qInfo() << "iniFileName .............." << iniFileName;
qInfo() << "extended-version ........." << APP_EXTENDED_VERSION;
qInfo() << "machineNr ................" << machineNr;
qInfo() << "customerNr ..............." << customerNr;
qInfo() << "zoneNr ..................." << zoneNr;
if (showExtendedVersion) {
printf(APP_EXTENDED_VERSION"\n");
@ -113,11 +122,6 @@ int main(int argc, char *argv[]) {
return 0;
}
int machineNr = Utils::read1stLineOfFile("/etc/machine_nr");
int customerNr = Utils::read1stLineOfFile("/etc/cust_nr");
int zoneNr = Utils::read1stLineOfFile("/etc/zone_nr");
QString const branchName = (zoneNr != 0)
? QString("zg1/zone%1").arg(zoneNr) : "master";
QThread::currentThread()->setObjectName("main thread");
qInfo() << "Main thread" << QThread::currentThreadId();