summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Goby2011-03-23 12:59:00 +0100
committerNiklas Goby2011-03-23 12:59:00 +0100
commita656290fbad7f803f965ef81ee734f47d05f6c54 (patch)
treeaa72c3f1d8ff2b1e736c9082e39c91c507e008e5
parentMerge branch 'master' of git.openslx.org:lsfks/master-teamprojekt/fbgui (diff)
downloadfbgui-a656290fbad7f803f965ef81ee734f47d05f6c54.tar.gz
fbgui-a656290fbad7f803f965ef81ee734f47d05f6c54.tar.xz
fbgui-a656290fbad7f803f965ef81ee734f47d05f6c54.zip
can read the serial out of /tmp/serial if this exists
-rw-r--r--src/fbgui.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/fbgui.cpp b/src/fbgui.cpp
index d4b5c82..f6b412a 100644
--- a/src/fbgui.cpp
+++ b/src/fbgui.cpp
@@ -37,12 +37,23 @@ fbgui::fbgui()
//watchDHCP();
// PBS test (working dont delete)
+ QString serial;
QFileInfo fi("/tmp/serial");
if (fi.exists())
+ {
qxtLog->debug() << "Found /tmp/serial !";
+
+ // If the file exists, than read the data
+ QFile file;
+ file.setFileName("/tmp/serial");
+ file.open(QIODevice::ReadOnly);
+ serial = file.readAll();
+ file.close();
+ }
else
qxtLog->debug() << "No file /tmp/serial !";
// TODO append serial number to postData.
+ //QByteArray postData = "mac=d8:d3:85:80:81:8b&hardwarehash=12341234123412341234123412341234&bootisoID=1&serial="+serial;
QNetworkRequest req(baseURL);
QByteArray postData = "mac=d8:d3:85:80:81:8b&hardwarehash=12341234123412341234123412341234&bootisoID=1&serial=";