summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2012-01-25 15:48:48 +0100
committerJonathan Bauer2012-01-25 15:48:48 +0100
commit9a8769bf66197cf5de835a7e0d931d6219fc95d6 (patch)
treedc4afe6bdf459ab97ff6b0d093e8fd8040ce99bd
parentfix for QT 4.8: setting header for POST (diff)
downloadfbgui-9a8769bf66197cf5de835a7e0d931d6219fc95d6.tar.gz
fbgui-9a8769bf66197cf5de835a7e0d931d6219fc95d6.tar.xz
fbgui-9a8769bf66197cf5de835a7e0d931d6219fc95d6.zip
removed cdhcpcd path from config, now through testApp. Added root check if ND is activated
-rw-r--r--fbgui.conf1
-rw-r--r--fbgui.logging.conf5
-rw-r--r--src/fbgui/main.cpp2
-rwxr-xr-xtestApp.sh16
4 files changed, 20 insertions, 4 deletions
diff --git a/fbgui.conf b/fbgui.conf
index 7618847..29aabdd 100644
--- a/fbgui.conf
+++ b/fbgui.conf
@@ -8,5 +8,4 @@ ip_config=/tmp/ip_config
log_file=/tmp/fbgui.log
server=209.85.148.105
autoup=true
-pathtoexe=~/fbgui/build/src/customdhcpcd/cdhcpcd
serverSocket=/var/tmp/qt_c_socket_custom
diff --git a/fbgui.logging.conf b/fbgui.logging.conf
index b305de2..ba768ad 100644
--- a/fbgui.logging.conf
+++ b/fbgui.logging.conf
@@ -1,3 +1,7 @@
+
+log4j.rootLogger=DEBUG, FA, SLA
+
+
log4j.appender.SLA=SyslogAppender
log4j.appender.SLA.layout=PatternLayout
log4j.appender.SLA.layout.ConversionPattern=-4r -5p c{2} M.L x - m
@@ -10,5 +14,4 @@ log4j.appender.FA.layout=TTCCLayout
log4j.appender.FA.layout.ContextPrinting=disabled
log4j.appender.FA.layout.DateFormat=ISO8601
-log4j.rootLogger=DEBUG, SLA, FA
diff --git a/src/fbgui/main.cpp b/src/fbgui/main.cpp
index e7f9fae..6284054 100644
--- a/src/fbgui/main.cpp
+++ b/src/fbgui/main.cpp
@@ -80,7 +80,7 @@ int main(int argc, char *argv[]) {
// parse command line arguments using getopt
QMap<QString, QString> clOpts;
int longIndex = 0;
- static const char *optString = "c:u:d:s:t:D:hl:n";
+ static const char *optString = "c:u:d:s:t:D:hl:nS:p:e:";
static const struct option longOpts[] = { { "config", required_argument,
NULL, 'c' }, { "url", required_argument, NULL, 'u' }, { "download",
required_argument, NULL, 'd' }, { "serial", required_argument, NULL,
diff --git a/testApp.sh b/testApp.sh
index ae9038e..13effff 100755
--- a/testApp.sh
+++ b/testApp.sh
@@ -11,7 +11,21 @@
# -s <path>, --serial=<path> sets path to serial number file
#
# Note: all path are expected to be absolute.
+#
+# Adapt these to your own system.
QT_VERSION=Qt-4.7.2
+PATH_TO_FBGUI_BUILD=/home/joe/workspace/fbgui
+
+# check if network discovery is activated and if running as root
+for ARG in $*
+do
+if [ "x$ARG" = "x-n" ]; then
+ if [ $(whoami) != "root" ]; then
+ echo "Network Discovery activated, you need to be root."
+ exit 1;
+ fi
+fi
+done
# clean /tmp/fbgui
[ -d /tmp/fbgui ] && rm -rf /tmp/fbgui
@@ -31,6 +45,6 @@ display_id=$(grep -n $(whoami) /etc/passwd| head -n 1|awk -F : '{print $1}')
# quick sleep to wait for qvfb loading
sleep 0.2
# Start fbgui connecting to QVFb with display_id from above.
-$working_path/build/src/fbgui/fbgui -display QVFb:$display_id $@
+$PATH_TO_FBGUI_BUILD/src/fbgui/fbgui -display QVFb:$display_id $@ -e $PATH_TO_FBGUI_BUILD/src/customdhcpcd/cdhcpcd
# kill qvfb since fbgui stopped
killall qvfb