Changeset 11043 for trunk


Ignore:
Timestamp:
06/16/11 21:26:48 (13 years ago)
Author:
tbretz
Message:
Added the --exec command.
Location:
trunk/FACT++/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/drivectrl.cc

    r10997 r11043  
    932932    // boost::thread t(boost::bind(&StateMachineDrive<S>::Run, &io_service));
    933933
     934    if (conf.Has("exec"))
     935    {
     936        const vector<string> v = conf.Get<vector<string>>("exec");
     937        for (vector<string>::const_iterator it=v.begin(); it!=v.end(); it++)
     938            shell.Execute(*it);
     939    }
     940
    934941    shell.Run();                 // Run the shell
    935942    io_service.Stop();           // Signal Loop-thread to stop
     
    954961        ("no-dim,d",  po_switch(),    "Disable dim services")
    955962        ("console,c", var<int>(),     "Use console (0=shell, 1=simple buffered, X=simple unbuffered)")
     963        ("exec,e",    vars<strings>(),"Execute one or more scrips at startup")
    956964        ;
    957965
  • trunk/FACT++/src/fadctrl.cc

    r11032 r11043  
    14631463    //boost::thread t(boost::bind(&StateMachineFAD<S>::Run, &io_service));
    14641464
     1465    if (conf.Has("exec"))
     1466    {
     1467        const vector<string> v = conf.Get<vector<string>>("exec");
     1468        for (vector<string>::const_iterator it=v.begin(); it!=v.end(); it++)
     1469            shell.Execute(*it);
     1470    }
     1471
    14651472    shell.Run();                 // Run the shell
    14661473    io_service.Stop();           // Signal Loop-thread to stop
     
    14841491        ("no-dim,d",  po_switch(),    "Disable dim services")
    14851492        ("console,c", var<int>(),     "Use console (0=shell, 1=simple buffered, X=simple unbuffered)")
     1493        ("exec,e",    vars<string>(), "Execute one or more scrips at startup")
    14861494        ;
    14871495
  • trunk/FACT++/src/fscctrl.cc

    r11034 r11043  
    516516    // boost::thread t(boost::bind(&StateMachineFSC<S>::Run, &io_service));
    517517
     518    if (conf.Has("exec"))
     519    {
     520        const vector<string> v = conf.Get<vector<string>>("exec");
     521        for (vector<string>::const_iterator it=v.begin(); it!=v.end(); it++)
     522            shell.Execute(*it);
     523    }
     524
    518525    shell.Run();                 // Run the shell
    519526    io_service.Stop();           // Signal Loop-thread to stop
     
    538545        ("no-dim,d",  po_bool(),      "Disable dim services")
    539546        ("console,c", var<int>(),     "Use console (0=shell, 1=simple buffered, X=simple unbuffered)")
     547        ("exec,e",    vars<string>(), "Execute one or more scrips at startup")
    540548        ;
    541549
  • trunk/FACT++/src/ftmctrl.cc

    r10997 r11043  
    18441844    // boost::thread t(boost::bind(&StateMachineFTM<S>::Run, &io_service));
    18451845
     1846    if (conf.Has("exec"))
     1847    {
     1848        const vector<string> v = conf.Get<vector<string>>("exec");
     1849        for (vector<string>::const_iterator it=v.begin(); it!=v.end(); it++)
     1850            shell.Execute(*it);
     1851    }
     1852
    18461853    shell.Run();                 // Run the shell
    18471854    io_service.Stop();           // Signal Loop-thread to stop
     
    18661873        ("no-dim,d",  po_bool(),      "Disable dim services")
    18671874        ("console,c", var<int>(),     "Use console (0=shell, 1=simple buffered, X=simple unbuffered)")
     1875        ("exec,e",    vars<string>(), "Execute one or more scrips at startup")
    18681876        ;
    18691877
  • trunk/FACT++/src/scheduler.cc

    r11030 r11043  
    783783
    784784    //io_service.SetReady();
     785    if (conf.Has("exec"))
     786    {
     787        const vector<string> v = conf.Get<vector<string>>("exec");
     788        for (vector<string>::const_iterator it=v.begin(); it!=v.end(); it++)
     789            shell.Execute(*it);
     790    }
    785791
    786792    shell.Run();                 // Run the shell
     
    804810    po::options_description config("Configuration");
    805811    config.add_options()
    806         ("dns",               var<string>("localhost"),  "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)")
    807         ("log,l",             var<string>(n), "Write log-file")
    808         ("no-dim,d",          po_switch(),    "Disable dim services")
    809         ("console,c",         var<int>(),     "Use console (0=shell, 1=simple buffered, X=simple unbuffered)")
     812        ("dns",       var<string>("localhost"),  "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)")
     813        ("log,l",     var<string>(n), "Write log-file")
     814        ("no-dim,d",  po_switch(),    "Disable dim services")
     815        ("console,c", var<int>(),     "Use console (0=shell, 1=simple buffered, X=simple unbuffered)")
     816        ("exec,e",    vars<string>(), "Execute one or more scrips at startup");
     817
     818    po::options_description control("Scheduler options");
     819    control.add_options()
    810820        ("schedule-database", var<string>()
    811821#if BOOST_VERSION >= 104200
     
    836846    conf.AddEnv("dns", "DIM_DNS_NODE");
    837847    conf.AddOptions(config);
     848    conf.AddOptions(control);
    838849    conf.SetArgumentPositions(p);
    839850}
Note: See TracChangeset for help on using the changeset viewer.