update to 1.27 [release 1.27-1mamba;Sat Sep 14 2013]

This commit is contained in:
Automatic Build System 2024-01-05 23:58:07 +01:00
parent 2aa41f3100
commit 9710faa87e
4 changed files with 206 additions and 0 deletions

View File

@ -1,2 +1,5 @@
# ipvsadm
IPVS (IP Virtual Server) implements transport-layer load balancing inside the Linux kernel, so called Layer-4 switching. IPVS running on a host acts as a load balancer before a cluster of real servers, it can direct requests for TCP/UDP based services to the real servers, and makes services of the real servers to appear as a virtual service on a single IP address.
This package contains the user space tools for IPVS.

106
ipvsadm-initscript Normal file
View File

@ -0,0 +1,106 @@
#!/bin/sh
#
# Startup script handle the initialisation of LVS
#
# chkconfig: 2345 08 92
#
# description: Initialise the Linux Virtual Server
# http://www.linuxvirtualserver.org/
#
# Script Author: Horms <horms@vergenet.net>
#
# Based on init script for ipchains by Joshua Jensen <joshua@redhat.com>
#
# Changes:
# Wenzhuo Zhang : fixed the typo of failure function
#
# 04-28-2004: modified by Silvan Calarco for the QiLinux distrubition
#
# config: /etc/sysconfig/ipvsadm
# config: /etc/ipvsadm.rules
# set the configuration file
if [ -f "/etc/sysconfig/ipvsadm" ]; then
IPVSADM_CONFIG="/etc/sysconfig/ipvsadm"
elif [ -f "/etc/ipvsadm.rules" ]; then
IPVSADM_CONFIG="/etc/ipvsadm.rules"
else
IPVSADM_CONFIG="/etc/sysconfig/ipvsadm"
fi
# Use the funtions provided by Red Hat or use our own
if [ -f /etc/rc.d/init.d/functions ]
then
. /etc/rc.d/init.d/functions
else
function action {
echo "$1"
shift
$@
}
function success {
echo -n "Success"
}
function failure {
echo -n "Failed"
}
fi
# Check for ipvsadm in both /sbin and /usr/sbin
# The default install puts it in /sbin, as it is analogos to commands such
# as route and ipchains that live in /sbin. Some vendors, most notibly
# Red Hat insist on moving it to /usr/sbin
if [ ! -x /sbin/ipvsadm -a ! -x /usr/sbin/ipvsadm ]; then
exit 0
fi
case "$1" in
start)
# If we don't clear these first, we might be adding to
# pre-existing rules.
action "Clearing the current IPVS table:" ipvsadm -C
echo -n "Applying IPVS configuration: "
ipvsadm-restore < "$IPVSADM_CONFIG" && \
success "Applying IPVS configuration" || \
failure "Applying IPVS configuration"
echo
touch /var/lock/subsys/ipvsadm
;;
stop)
action "Clearing the current IPVS table:" ipvsadm -C
rm -f /var/lock/subsys/ipvsadm
;;
reload|reload-force|restart)
#Start should flush everything
$0 start
;;
panic)
# I'm not sure what panic does but in the case of IPVS
# it makes sense just to clear everything
action "Clearing the current IPVS table:" ipvsadm -C
;;
status)
ipvsadm -L -n
;;
save)
echo -n "Saving IPVS table to $IPVSADM_CONFIG: "
ipvsadm-save -n > $IPVSADM_CONFIG 2>/dev/null && \
success "Saving IPVS table to $IPVSADM_CONFIG" || \
failure "Saving IPVS table to $IPVSADM_CONFIG"
echo
;;
*)
echo "Usage: ipvsadm
{start|stop|restart|status|panic|save|reload|reload-force}"
exit 1
esac
exit 0

9
ipvsadm-sysconfig Normal file
View File

@ -0,0 +1,9 @@
#
# ipvsadm configuration file
#
#ipvsadm -C
#ipvsadm -A -t 172.16.1.1:80 -s wrr
#ipvsadm -a -t 172.16.1.1:80 -r 192.168.6.235:80 -m -w 1
#ipvsadm -a -t 172.16.1.1:80 -r 192.168.1.161:80 -m -w 1
#ipvsadm -a -t 172.16.1.1:80 -r 192.168.1.167:80 -m -w 1

88
ipvsadm.spec Normal file
View File

@ -0,0 +1,88 @@
Name: ipvsadm
Version: 1.27
Release: 1mamba
Summary: User space tools for IPVS (IP Virtual Server)
Group: Applications/Networking
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.linuxvirtualserver.org
Source: https://www.kernel.org/pub/linux/utils/kernel/ipvsadm/ipvsadm-%{version}.tar.xz
Source1: ipvsadm-initscript
Source2: ipvsadm-sysconfig
License: GPL
BuildRequires: kernelsource
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
IPVS (IP Virtual Server) implements transport-layer load balancing inside the Linux kernel, so called Layer-4 switching. IPVS running on a host acts as a load balancer before a cluster of real servers, it can direct requests for TCP/UDP based services to the real servers, and makes services of the real servers to appear as a virtual service on a single IP address.
This package contains the user space tools for IPVS.
%prep
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%setup -q
%build
make MANDIR=%{_mandir} INCLUDE="-I/usr/src/linux-`uname -r`/include -I.. -I."
%install
make install BUILD_ROOT=%{buildroot} MANDIR=%{_mandir}
mkdir -p %{buildroot}%{_initrddir}
install -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/ipvsadm
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/ipvsadm
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
/sbin/*
%{_mandir}/man8/*
%{_initrddir}/ipvsadm
%config(noreplace) %{_sysconfdir}/sysconfig/ipvsadm
%preun
if [ $1 -eq 0 ]; then
#erase
chkconfig ipvsadm
if test $? -eq 0; then
%{_initrddir}/ipvsadm stop
chkconfig --del ipvsadm
fi
fi
%postun
if [ $1 -eq 1 ]; then
#update
chkconfig ipvsadm
test $? -eq 0 && %{_initrddir}/ipvsadm restart
fi
%changelog
* Sat Sep 14 2013 Automatic Build System <autodist@mambasoft.it> 1.27-1mamba
- update to 1.27
* Mon Feb 14 2011 Automatic Build System <autodist@mambasoft.it> 1.26-1mamba
- automatic update by autodist
* Fri Feb 05 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 1.25-2mamba
- rebuilt to remove executable requirements
* Mon Jan 05 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 1.25-1mamba
- automatic update by autodist
* Mon Jul 16 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 1.24-1mamba
- update to 1.24
* Wed Apr 28 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 1.21-2qilnx
- fixed initscript for chkconfig
* Wed Apr 28 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 1.21-2qilnx
- added initscript
* Tue Apr 27 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 1.21-1qilnx
- first build