summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/ChangeLog1
-rw-r--r--noncore/net/wellenreiter/gui/main.cpp21
2 files changed, 20 insertions, 2 deletions
diff --git a/noncore/net/wellenreiter/ChangeLog b/noncore/net/wellenreiter/ChangeLog
index 55e13fc..755ed76 100644
--- a/noncore/net/wellenreiter/ChangeLog
+++ b/noncore/net/wellenreiter/ChangeLog
@@ -1,5 +1,6 @@
2004-??-?? Michael Lauer <mickey@Vanille.de>
+ * Added command line option "-nocheck" to skip non-root and dhcp tests
* Improved the speed reading the manufacturer list
* GPS coordinates are now presented in the DMS (as opposed to decimal) format
diff --git a/noncore/net/wellenreiter/gui/main.cpp b/noncore/net/wellenreiter/gui/main.cpp
index 55a5260..dd757b5 100644
--- a/noncore/net/wellenreiter/gui/main.cpp
+++ b/noncore/net/wellenreiter/gui/main.cpp
@@ -52,7 +52,21 @@ int main( int argc, char **argv )
a.processEvents(); // show the window before doing the safety checks
int result = -1;
+ static int killed = false;
+ bool check = true;
+ for ( int i = 1; i < argc; ++i )
+ {
+ if ( !strcmp( "-nocheck", argv[i] ) )
+ {
+ qDebug( "-nocheck found" );
+ check = false;
+ break;
+ }
+ }
+
+ if ( check )
+ {
// root check
if ( getuid() )
{
@@ -66,8 +80,6 @@ int main( int argc, char **argv )
// dhcp check - NOT HERE! This really belongs as a static member to OProcess
// and I want to call it like that: if ( OProcess::isRunning( QString& ) ) ...
- static int killed = false;
-
QString line;
QDir d = QDir( "/proc" );
QStringList dirs = d.entryList( QDir::Dirs );
@@ -97,9 +109,13 @@ int main( int argc, char **argv )
killed = true;
}
}
+ }
a.exec();
+ if ( check )
+ {
+
if ( killed )
{
result = QMessageBox::warning( w, " - Wellenreiter II - (dhcp)", QObject::tr( "Restart your dhcp client?" ), QMessageBox::Yes, QMessageBox::No );
@@ -110,5 +126,6 @@ int main( int argc, char **argv )
}
delete w;
+ }
return 0;
}