diff options
author | slioch <slioch@eng-140.vyatta.com> | 2009-07-07 14:33:15 -0700 |
---|---|---|
committer | slioch <slioch@eng-140.vyatta.com> | 2009-07-07 14:33:15 -0700 |
commit | 4000b742f9eb731d40d22d6e73daef466a0e34ee (patch) | |
tree | 53a57bbb91b1f2b9b5b33f0acf2b8a35a240cb9f /src/lbdatafactory.cc | |
parent | 45760b0cc60d9f1f307fa3db5d420876f833a38d (diff) | |
download | vyatta-wanloadbalance-4000b742f9eb731d40d22d6e73daef466a0e34ee.tar.gz vyatta-wanloadbalance-4000b742f9eb731d40d22d6e73daef466a0e34ee.zip |
added configuration hook to execute script on interface state change. configurable via conf mode. environment variables identify interface and new state.
Diffstat (limited to 'src/lbdatafactory.cc')
-rw-r--r-- | src/lbdatafactory.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lbdatafactory.cc b/src/lbdatafactory.cc index a6c117c..c1b77ed 100644 --- a/src/lbdatafactory.cc +++ b/src/lbdatafactory.cc @@ -130,6 +130,9 @@ LBDataFactory::process(const vector<string> &path, int depth, const string &key, if (l_key == "interface") { process_health(l_key,l_value); } + else if (l_key == "hook") { + process_health_hook(l_key,l_value); + } else { process_health_interface(l_key,l_value); } @@ -190,6 +193,14 @@ LBDataFactory::process_health(const string &key, const string &value) } } +void +LBDataFactory::process_health_hook(const string &key, const string &value) +{ + if (value.empty() == false) { + _lb_data._hook = value; + } +} + void LBDataFactory::process_health_interface(const string &key, const string &value) |