diff options
author | Alex Harpin <development@landsofshadow.co.uk> | 2015-02-08 14:34:32 +0000 |
---|---|---|
committer | Alex Harpin <development@landsofshadow.co.uk> | 2015-02-08 14:34:32 +0000 |
commit | 7363488860d3d597c83bc26c43bc0961f4429863 (patch) | |
tree | 7c439c40794dab2363ed7b81e97625d85d852a92 | |
parent | b9eb029a46cc7d233979dd90457e26a0de921c9f (diff) | |
download | vyatta-wanloadbalance-7363488860d3d597c83bc26c43bc0961f4429863.tar.gz vyatta-wanloadbalance-7363488860d3d597c83bc26c43bc0961f4429863.zip |
vyatta-wanloadbalance: remove legacy load balancing code and tidy up
Remove legacy load balancing code left over from previous versions that
is no longer used, and tidy up a few of the scripts.
Bug #441 http://bugzilla.vyos.net/show_bug.cgi?id=441
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | debian/vyatta-wanloadbalance.postinst.in | 1 | ||||
-rw-r--r-- | etc/init.d/vyatta-wanloadbalance | 44 | ||||
-rw-r--r-- | etc/loadbalance.conf | 50 | ||||
-rwxr-xr-x | scripts/vyatta-wanloadbalance.init | 2 | ||||
-rwxr-xr-x | scripts/vyatta-wanloadbalance.init.in | 30 | ||||
-rwxr-xr-x | scripts/vyatta-wlb-status | 1 | ||||
-rw-r--r-- | src/loadbalance.conf | 50 |
9 files changed, 1 insertions, 184 deletions
diff --git a/Makefile.am b/Makefile.am index 25321b8..b1dedce 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,9 +6,6 @@ opdir = $(datadir)/vyatta-op/templates bin_sudo_usersdir = $(bindir)/sudo-users curverdir = $(sysconfdir)/config-migrate/current -initddir = /etc/init.d -etcdir = /etc - AM_CPPFLAGS = -I src -Wall -DDEBUG CLEANFILES = src/main.o src/lbdata.o src/lbdatafactory.o src/loadbalance.o src/rl_str_proc.o src/lbpathtest.o src/lbtest_icmp.o src/lbtest_ttl.o src/lboutput.o src/lbtest.o @@ -50,5 +47,3 @@ install-exec-hook: cd templates; $(cpiop) $(DESTDIR)$(cfgdir) mkdir -p $(DESTDIR)$(opdir) cd templates-op; $(cpiop) $(DESTDIR)$(opdir) - mkdir -p $(DESTDIR)/etc - cd etc; $(cpiop) $(DESTDIR)/etc diff --git a/configure.ac b/configure.ac index 956119d..7c3bca8 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ m4_define([VERSION_ID], [m4_esyscmd([ else echo -n 2.4 fi])]) -AC_INIT([vyatta-wanloadbalance], VERSION_ID, [vyatta-support@vyatta.com]) +AC_INIT([vyatta-wanloadbalance], VERSION_ID, [maintainers@vyos.net]) test -n "$VYATTA_VERSION" || VYATTA_VERSION=$PACKAGE_VERSION diff --git a/debian/vyatta-wanloadbalance.postinst.in b/debian/vyatta-wanloadbalance.postinst.in index 7195bc8..80f5895 100644 --- a/debian/vyatta-wanloadbalance.postinst.in +++ b/debian/vyatta-wanloadbalance.postinst.in @@ -2,7 +2,6 @@ LOADBALANCE_DIR=/var/run/load-balance - prefix=/opt/vyatta mkdir -p $LOADBALANCE_DIR diff --git a/etc/init.d/vyatta-wanloadbalance b/etc/init.d/vyatta-wanloadbalance deleted file mode 100644 index 214ea8e..0000000 --- a/etc/init.d/vyatta-wanloadbalance +++ /dev/null @@ -1,44 +0,0 @@ -#! /bin/bash - -### BEGIN INIT INFO -# Provides: vyatta-wanloadbalnce -# Required-Start: $network $remote_fs $syslog -# Required-Stop: $network $remote_fs $syslog -# Default-Start: -# Default-Stop: -# Short-Description: Vyatta WAN loadbalance service -### END INIT INFO - -declare progname=${0##*/} -declare action=$1; shift - -conf=$1; shift -pid=/var/run/vyatta/wlb.pid - -test -x $bb || exit 0 - -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/run/load-balance/wlb.conf -d -i $pid 2>/dev/null - fi -} - -stop () -{ - if [ -f $pid ] - then - kill -s SIGTERM $( cat $pid ) 2>/dev/null - fi -} - -case "$action" in - start) start;; - stop) stop;; - force-reload) stop; sleep 1; start;; - restart) stop; sleep 1; start;; - *) echo "Usage: $progname {start|stop|restart}" - exit 1 -esac diff --git a/etc/loadbalance.conf b/etc/loadbalance.conf deleted file mode 100644 index 85e6c5d..0000000 --- a/etc/loadbalance.conf +++ /dev/null @@ -1,50 +0,0 @@ -# -# Sample vyatta load balance configuration file. -# - -health { - interface eth1 { - target 10.0.0.1 - success-ct 2 - failure-ct 1 - ping-resp 100 - } - - interface eth2 { - target 10.0.0.1 - success-ct 1 - failure-ct 1 - ping-resp 1000 - } -} - -rule 1 { - protocol udp - interface eth1 { - weight 1 - } - interface eth2 { - weight 2 - } -} - -rule 2 { - protocol tcp - source { - address 1.1.1.1 - port-number 2222 - } - interface eth1 { - weight 1 - } - interface eth2 { - weight 3 - } -} - -#default rule w/o protocol specified -rule 10 { - interface eth2 { - weight 1 - } -}
\ No newline at end of file diff --git a/scripts/vyatta-wanloadbalance.init b/scripts/vyatta-wanloadbalance.init index eeccc32..2f61284 100755 --- a/scripts/vyatta-wanloadbalance.init +++ b/scripts/vyatta-wanloadbalance.init @@ -10,7 +10,6 @@ test -x $bb || exit 0 start () { -# /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 } @@ -30,4 +29,3 @@ case "$action" in *) echo "Usage: $progname {start|stop|restart}" exit 1 esac - diff --git a/scripts/vyatta-wanloadbalance.init.in b/scripts/vyatta-wanloadbalance.init.in deleted file mode 100755 index decb811..0000000 --- a/scripts/vyatta-wanloadbalance.init.in +++ /dev/null @@ -1,30 +0,0 @@ -#! /bin/bash - -declare progname=${0##*/} -declare action=$1; shift - -conf=$1; shift -pid=/var/run/vyatta/wlb.pid - -test -x $bb || exit 0 - -start () -{ - /opt/vyatta/sbin/wan_lb -f $conf -d -i $pid -} - -stop () -{ - if [ -f $pid ] - then - kill -s SIGTERM $( cat $pid ) 2>/dev/null - fi -} - -case "$action" in - start) start;; - stop) stop;; - restart) stop; sleep 1; start;; - *) echo "Usage: $progname {start|stop|restart}" - exit 1 -esac diff --git a/scripts/vyatta-wlb-status b/scripts/vyatta-wlb-status index 325b3b1..f86cc5b 100755 --- a/scripts/vyatta-wlb-status +++ b/scripts/vyatta-wlb-status @@ -1,5 +1,4 @@ #!/bin/sh - iptables $1 -L WANLOADBALANCE_PRE -t mangle -v diff --git a/src/loadbalance.conf b/src/loadbalance.conf deleted file mode 100644 index 85e6c5d..0000000 --- a/src/loadbalance.conf +++ /dev/null @@ -1,50 +0,0 @@ -# -# Sample vyatta load balance configuration file. -# - -health { - interface eth1 { - target 10.0.0.1 - success-ct 2 - failure-ct 1 - ping-resp 100 - } - - interface eth2 { - target 10.0.0.1 - success-ct 1 - failure-ct 1 - ping-resp 1000 - } -} - -rule 1 { - protocol udp - interface eth1 { - weight 1 - } - interface eth2 { - weight 2 - } -} - -rule 2 { - protocol tcp - source { - address 1.1.1.1 - port-number 2222 - } - interface eth1 { - weight 1 - } - interface eth2 { - weight 3 - } -} - -#default rule w/o protocol specified -rule 10 { - interface eth2 { - weight 1 - } -}
\ No newline at end of file |