Changeset 11403
- Timestamp:
- 07/14/11 09:01:17 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/dimctrl.cc
r11327 r11403 18 18 win << kRed << "ERROR - Couldn't open log-file " << conf.Get<string>("log") << ": " << strerror(errno) << endl; 19 19 20 if (conf.Has("cmd")) 21 { 22 const vector<string> v = conf.Get<vector<string>>("cmd"); 23 for (vector<string>::const_iterator it=v.begin(); it!=v.end(); it++) 24 shell.ProcessLine(*it); 25 } 20 const vector<string> v1 = conf.Vec<string>("cmd"); 21 for (vector<string>::const_iterator it=v1.begin(); it!=v1.end(); it++) 22 shell.ProcessLine(*it); 26 23 27 if (conf.Has("exec")) 28 { 29 const vector<string> v = conf.Get<vector<string>>("exec"); 30 for (vector<string>::const_iterator it=v.begin(); it!=v.end(); it++) 31 shell.Execute(*it); 32 } 24 const vector<string> v2 = conf.Vec<string>("exec"); 25 for (vector<string>::const_iterator it=v2.begin(); it!=v2.end(); it++) 26 shell.Execute(*it); 33 27 34 28 if (conf.Get<bool>("quit")) … … 48 42 ("dns", var<string>("localhost"), "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)") 49 43 ("log,l", var<string>(n), "Write log-file") 50 ("console,c", var<int>( ),"Use console (0=shell, 1=simple buffered, X=simple unbuffered)")44 ("console,c", var<int>(0), "Use console (0=shell, 1=simple buffered, X=simple unbuffered)") 51 45 ("cmd", vars<string>(), "Execute one or more commands at startup") 52 46 ("exec,e", vars<string>(), "Execute one or more scrips at startup") … … 122 116 123 117 if (conf.Get<int>("console")==0) 118 //Main<RemoteShell, DummyService>(conf); 124 119 RunShell<RemoteShell>(conf); 125 120 else 121 //Main<RemoteConsole, DummyService>(conf); 126 122 RunShell<RemoteConsole>(conf); 127 123
Note:
See TracChangeset
for help on using the changeset viewer.