From a656290fbad7f803f965ef81ee734f47d05f6c54 Mon Sep 17 00:00:00 2001 From: Niklas Goby Date: Wed, 23 Mar 2011 12:59:00 +0100 Subject: can read the serial out of /tmp/serial if this exists --- src/fbgui.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) 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="; -- cgit v1.2.3-55-g7522