diff options
author | Michael Larson <mike@vyatta.com> | 2011-01-04 10:39:49 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2011-01-05 11:50:53 -0800 |
commit | 5932b3640418ef157ef443a1cb62a1c8e666215e (patch) | |
tree | 853c0b2f3ba38a0dff6edb51bd2db2ffc47a9da4 | |
parent | 179e84deac2d92feb68348240b8ffa2d10780b07 (diff) | |
download | vyatta-wanloadbalance-5932b3640418ef157ef443a1cb62a1c8e666215e.tar.gz vyatta-wanloadbalance-5932b3640418ef157ef443a1cb62a1c8e666215e.zip |
convert wlb runtime directory to /var/run/load-balance from /var/load-balance. fix for bug 6630
(cherry picked from commit cf1754c28af9dc17f5dea4995049823dc7687a63)
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | debian/vyatta-wanloadbalance.postinst.in | 2 | ||||
-rw-r--r-- | etc/init.d/vyatta-wanloadbalance | 2 | ||||
-rw-r--r-- | scripts/ppp/ppp-wanlb | 2 | ||||
-rwxr-xr-x | scripts/vyatta-wanloadbalance.init | 4 | ||||
-rw-r--r-- | scripts/vyatta-wanloadbalance.pl | 4 | ||||
-rw-r--r-- | scripts/vyatta-wlb-connection.pl | 4 | ||||
-rw-r--r-- | src/lbdata.cc | 2 | ||||
-rw-r--r-- | src/main.cc | 2 | ||||
-rw-r--r-- | templates-op/restart/wan-load-balance/node.def | 4 | ||||
-rw-r--r-- | templates-op/show/wan-load-balance/connection/node.def | 2 | ||||
-rw-r--r-- | templates-op/show/wan-load-balance/node.def | 4 | ||||
-rw-r--r-- | templates-op/show/wan-load-balance/status/node.def | 2 | ||||
-rw-r--r-- | templates-op/show/wan-load-balance/status/with-dns/node.def | 2 | ||||
-rw-r--r-- | templates/load-balancing/wan/node.def | 2 |
15 files changed, 20 insertions, 20 deletions
diff --git a/Makefile.am b/Makefile.am index 0d726c4..9cc2101 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ dhcphookdir = /etc/dhcp3/dhclient-exit-hooks.d ppphookdir = /etc/ppp/ip-up.d -pppwanlbdir = /var/load-balance/ppp +pppwanlbdir = /var/run/load-balance/ppp cfgdir = $(datadir)/vyatta-cfg/templates opdir = $(datadir)/vyatta-op/templates bin_sudo_usersdir = $(bindir)/sudo-users diff --git a/debian/vyatta-wanloadbalance.postinst.in b/debian/vyatta-wanloadbalance.postinst.in index 2895ad3..7195bc8 100644 --- a/debian/vyatta-wanloadbalance.postinst.in +++ b/debian/vyatta-wanloadbalance.postinst.in @@ -1,6 +1,6 @@ #!/bin/bash -LOADBALANCE_DIR=/var/load-balance +LOADBALANCE_DIR=/var/run/load-balance prefix=/opt/vyatta diff --git a/etc/init.d/vyatta-wanloadbalance b/etc/init.d/vyatta-wanloadbalance index 5f93dd5..214ea8e 100644 --- a/etc/init.d/vyatta-wanloadbalance +++ b/etc/init.d/vyatta-wanloadbalance @@ -22,7 +22,7 @@ start () if [ -n "$conf" ] ; then /opt/vyatta/sbin/wan_lb -f $conf -d -i $pid 2>/dev/null else - /opt/vyatta/sbin/wan_lb -f /var/load-balance/wlb.conf -d -i $pid 2>/dev/null + /opt/vyatta/sbin/wan_lb -f /var/run/load-balance/wlb.conf -d -i $pid 2>/dev/null fi } diff --git a/scripts/ppp/ppp-wanlb b/scripts/ppp/ppp-wanlb index f31e8e2..f76dee0 100644 --- a/scripts/ppp/ppp-wanlb +++ b/scripts/ppp/ppp-wanlb @@ -1,6 +1,6 @@ #! /bin/sh -echo $5 > /var/load-balance/ppp/$6 +echo $5 > /var/run/load-balance/ppp/$6 pid=/var/run/vyatta/wlb.pid if [ -f $pid ]; then diff --git a/scripts/vyatta-wanloadbalance.init b/scripts/vyatta-wanloadbalance.init index 3e0c1e8..eeccc32 100755 --- a/scripts/vyatta-wanloadbalance.init +++ b/scripts/vyatta-wanloadbalance.init @@ -10,8 +10,8 @@ test -x $bb || exit 0 start () { -# /opt/vyatta/sbin/wan_lb -f /var/load-balance/wlb.conf -d -i $pid 1>/dev/null - start-stop-daemon --background --start --quiet --oknodo --exec /opt/vyatta/sbin/wan_lb -- -f /var/load-balance/wlb.conf -d -i $pid +# /opt/vyatta/sbin/wan_lb -f /var/run/load-balance/wlb.conf -d -i $pid 1>/dev/null + start-stop-daemon --background --start --quiet --oknodo --exec /opt/vyatta/sbin/wan_lb -- -f /var/run/load-balance/wlb.conf -d -i $pid } stop () diff --git a/scripts/vyatta-wanloadbalance.pl b/scripts/vyatta-wanloadbalance.pl index 0306653..a3afba4 100644 --- a/scripts/vyatta-wanloadbalance.pl +++ b/scripts/vyatta-wanloadbalance.pl @@ -312,8 +312,8 @@ GetOptions("valid-nexthop=s" => \$nexthop, ) or usage(); ####main -my $conf_file = '/var/load-balance/wlb.conf'; -my $conf_lck_file = '/var/load-balance/wlb.conf.lck'; +my $conf_file = '/var/run/load-balance/wlb.conf'; +my $conf_lck_file = '/var/run/load-balance/wlb.conf.lck'; ####are we just validating? if (defined $nexthop) { diff --git a/scripts/vyatta-wlb-connection.pl b/scripts/vyatta-wlb-connection.pl index 902e0aa..c67e8bf 100644 --- a/scripts/vyatta-wlb-connection.pl +++ b/scripts/vyatta-wlb-connection.pl @@ -25,8 +25,8 @@ use lib "/opt/vyatta/share/perl5/"; -#examine /var/load-balance/wlb.conf for disable-source-nat -if (!open($CONFFILE, "<", "/var/load-balance/wlb.conf")) { +#examine /var/run/load-balance/wlb.conf for disable-source-nat +if (!open($CONFFILE, "<", "/var/run/load-balance/wlb.conf")) { return; } $_ = <$CONFFILE>; diff --git a/src/lbdata.cc b/src/lbdata.cc index 4b0978e..1ef1b73 100644 --- a/src/lbdata.cc +++ b/src/lbdata.cc @@ -349,7 +349,7 @@ LBData::update_dhcp_nexthop() } else { //check if this is a ppp interface - string pppfile("/var/load-balance/ppp/"+h_iter->first); + string pppfile("/var/run/load-balance/ppp/"+h_iter->first); FILE *fp = fopen(pppfile.c_str(),"r"); if (fp) { char str[1025]; diff --git a/src/main.cc b/src/main.cc index b852cfd..05b1fa7 100644 --- a/src/main.cc +++ b/src/main.cc @@ -66,7 +66,7 @@ int main(int argc, char* argv[]) bool debug = false; bool config_debug_mode = false, daemon = false; string pid_path = "/var/run"; - string output_path = "/var/load-balance"; + string output_path = "/var/run/load-balance"; string c_file; //grab inputs diff --git a/templates-op/restart/wan-load-balance/node.def b/templates-op/restart/wan-load-balance/node.def index af6b1f6..ec2697d 100644 --- a/templates-op/restart/wan-load-balance/node.def +++ b/templates-op/restart/wan-load-balance/node.def @@ -1,6 +1,6 @@ help: Restart WAN load balancing -run: if [ -f /var/load-balance/wlb.out ] ; then - sudo /opt/vyatta/sbin/vyatta-wanloadbalance.init restart /var/load-balance/wlb.conf 2>/dev/null +run: if [ -f /var/run/load-balance/wlb.out ] ; then + sudo /opt/vyatta/sbin/vyatta-wanloadbalance.init restart /var/run/load-balance/wlb.conf 2>/dev/null else echo WAN load balancing is not configured fi
\ No newline at end of file diff --git a/templates-op/show/wan-load-balance/connection/node.def b/templates-op/show/wan-load-balance/connection/node.def index d5ec64e..7ef1b40 100644 --- a/templates-op/show/wan-load-balance/connection/node.def +++ b/templates-op/show/wan-load-balance/connection/node.def @@ -1,5 +1,5 @@ help: Show Wide Area Network (WAN) load-balancing flow -run: if [ -f /var/load-balance/wlb.out ] ; then +run: if [ -f /var/run/load-balance/wlb.out ] ; then sudo ${vyatta_bindir}/sudo-users/vyatta-wlb-connection.pl else echo WAN load balancing is not configured diff --git a/templates-op/show/wan-load-balance/node.def b/templates-op/show/wan-load-balance/node.def index 0165620..c95669a 100644 --- a/templates-op/show/wan-load-balance/node.def +++ b/templates-op/show/wan-load-balance/node.def @@ -1,6 +1,6 @@ help: Show Wide Area Network (WAN) load-balancing information -run: if [ -f /var/load-balance/wlb.out ] ; then - cat /var/load-balance/wlb.out +run: if [ -f /var/run/load-balance/wlb.out ] ; then + cat /var/run/load-balance/wlb.out else echo WAN load balancing is not configured fi diff --git a/templates-op/show/wan-load-balance/status/node.def b/templates-op/show/wan-load-balance/status/node.def index aef04ad..a57d6f3 100644 --- a/templates-op/show/wan-load-balance/status/node.def +++ b/templates-op/show/wan-load-balance/status/node.def @@ -1,5 +1,5 @@ help: Show WAN load-balancing statistics -run: if [ -f /var/load-balance/wlb.out ] ; then +run: if [ -f /var/run/load-balance/wlb.out ] ; then sudo ${vyatta_bindir}/sudo-users/vyatta-wlb-status -n else echo WAN load balancing is not configured diff --git a/templates-op/show/wan-load-balance/status/with-dns/node.def b/templates-op/show/wan-load-balance/status/with-dns/node.def index 35fb316..0990dbc 100644 --- a/templates-op/show/wan-load-balance/status/with-dns/node.def +++ b/templates-op/show/wan-load-balance/status/with-dns/node.def @@ -1,5 +1,5 @@ help: Show WAN load-balancing statistics -run: if [ -f /var/load-balance/wlb.out ] ; then +run: if [ -f /var/run/load-balance/wlb.out ] ; then sudo ${vyatta_bindir}/sudo-users/vyatta-wlb-status else echo WAN load balancing is not configured diff --git a/templates/load-balancing/wan/node.def b/templates/load-balancing/wan/node.def index 523dd73..cb2dfd0 100644 --- a/templates/load-balancing/wan/node.def +++ b/templates/load-balancing/wan/node.def @@ -2,5 +2,5 @@ help: Configure Wide Area Network (WAN) load-balancing end: if [ ${COMMIT_ACTION} != 'DELETE' ]; then sudo ${vyatta_sbindir}/vyatta-wanloadbalance.pl; fi; -delete:expression: exec "sudo /etc/init.d/vyatta-wanloadbalance stop;sudo rm -f /var/load-balance/wlb.out" +delete:expression: exec "sudo /etc/init.d/vyatta-wanloadbalance stop;sudo rm -f /var/run/load-balance/wlb.out" |