Index: /trunk/FACT++/src/dclient5.cc
===================================================================
--- /trunk/FACT++/src/dclient5.cc	(revision 10220)
+++ /trunk/FACT++/src/dclient5.cc	(revision 10221)
@@ -466,18 +466,19 @@
     const string n = conf.GetName()+".log";
 
-    po::options_description config("Configuration");
+    po::options_description config("Program options");
     config.add_options()
+        ("dns",       var<string>("localhost"),  "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)")
         ("log,l",     var<string>(n), "Write log-file")
-        ("no-dim,d",  po_switch(), "Disable dim services")
-        ("console,c", var<int>(),    "Use console (0=shell, 1=simple buffered, X=simple unbuffered)")
+        ("no-dim,d",  po_switch(),    "Disable dim services")
+        ("console,c", var<int>(),     "Use console (0=shell, 1=simple buffered, X=simple unbuffered)")
         ;
 
-    conf.AddOptionsCommandline(config);
+    conf.AddEnv("dns", "DIM_DNS_NODE");
+
+    conf.AddOptions(config);
 }
 
 int main(int argc, char* argv[])
 {
-    setenv("DIM_DNS_NODE", "localhost", 0);
-
     Configuration conf(argv[0]);
     SetupConfiguration(conf);
@@ -503,4 +504,7 @@
         return -1;
 
+    // To allow overwriting of DIM_DNS_NODE set 0 to 1
+    setenv("DIM_DNS_NODE", conf.Get<string>("dns").c_str(), 1);
+
     try
     {
Index: /trunk/FACT++/src/test3.cc
===================================================================
--- /trunk/FACT++/src/test3.cc	(revision 10220)
+++ /trunk/FACT++/src/test3.cc	(revision 10221)
@@ -36,11 +36,14 @@
     const string n = conf.GetName()+".log";
 
-    po::options_description config("Configuration");
+    po::options_description config("Program options");
     config.add_options()
+        ("dns",       var<string>("localhost"), "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)")
         ("log,l",     var<string>(n), "Write log-file")
         ("console,c", var<int>(),     "Use console (0=shell, 1=simple buffered, X=simple unbuffered)")
         ;
 
-    conf.AddOptionsCommandline(config);
+    conf.AddEnv("dns", "DIM_DNS_NODE");
+
+    conf.AddOptions(config);
 }
 
@@ -48,7 +51,4 @@
 {
     cout << "Starting " << argv[0] << "..." << endl;
-
-    // We could use putenv to make the Configure class change the value...
-    setenv("DIM_DNS_NODE", "localhost", 0);
 
     Configuration conf(argv[0]);
@@ -75,4 +75,7 @@
         return -1;
 
+    // To allow overwriting of DIM_DNS_NODE set 0 to 1
+    setenv("DIM_DNS_NODE", conf.Get<string>("dns").c_str(), 1);
+
     if (conf.Get<int>("console")==0)
         RunShell<RemoteShell>(conf);
