Compare commits
No commits in common. "c8" and "c10s" have entirely different histories.
7
.gitignore
vendored
7
.gitignore
vendored
@ -1 +1,6 @@
|
|||||||
SOURCES/ipvsadm-1.31.tar.gz
|
ipvsadm-1.25.tar.gz
|
||||||
|
/ipvsadm-1.26.tar.gz
|
||||||
|
/ipvsadm-1.27.tar.gz
|
||||||
|
/ipvsadm-1.28.tar.gz
|
||||||
|
/ipvsadm-1.29.tar.gz
|
||||||
|
/ipvsadm-1.31.tar.gz
|
||||||
|
@ -1 +0,0 @@
|
|||||||
2d6fa5fe01f8aa9dd4fc272855c8fc12aea3c06b SOURCES/ipvsadm-1.31.tar.gz
|
|
189
ipvsadm.init
Normal file
189
ipvsadm.init
Normal file
@ -0,0 +1,189 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Startup script handle the initialisation of LVS
|
||||||
|
# chkconfig: - 28 72
|
||||||
|
# description: Initialise the Linux Virtual Server
|
||||||
|
# config: /etc/sysconfig/ipvsadm
|
||||||
|
#
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: ipvsadm
|
||||||
|
# Required-Start: $local_fs $network $named
|
||||||
|
# Required-Stop: $local_fs $remote_fs $network
|
||||||
|
# Short-Description: Initialise the Linux Virtual Server
|
||||||
|
# Description: The Linux Virtual Server is a highly scalable and highly
|
||||||
|
# available server built on a cluster of real servers, with the load
|
||||||
|
# balancer running on Linux.
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
# Source function library
|
||||||
|
. /etc/rc.d/init.d/functions
|
||||||
|
|
||||||
|
IPVSADM=ipvsadm
|
||||||
|
IPVSADMRESTORE=${IPVSADM}-restore
|
||||||
|
IPVSADMSAVE=${IPVSADM}-save
|
||||||
|
# Saved IPVS data
|
||||||
|
IPVSADM_DATA=/etc/sysconfig/$IPVSADM
|
||||||
|
# Configuration
|
||||||
|
IPVSADM_CONFIG=/etc/sysconfig/${IPVSADM}-config
|
||||||
|
IPVS=ip_vs
|
||||||
|
PROC_IPVS=/proc/net/$IPVS
|
||||||
|
VAR_SUBSYS_IPVSADM=/var/lock/subsys/$IPVSADM
|
||||||
|
|
||||||
|
if [ ! -x /sbin/$IPVSADM ]; then
|
||||||
|
echo -n $"${IPVSADM}: /sbin/$IPVSADM does not exist."; warning; echo
|
||||||
|
exit 5
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Old or new modutils
|
||||||
|
/sbin/modprobe --version 2>&1 | grep -q module-init-tools \
|
||||||
|
&& NEW_MODUTILS=1 \
|
||||||
|
|| NEW_MODUTILS=0
|
||||||
|
|
||||||
|
# Default IPVSADM configuration:
|
||||||
|
IPVS_MODULES_UNLOAD="yes"
|
||||||
|
IPVS_SAVE_ON_STOP="no"
|
||||||
|
IPVS_SAVE_ON_RESTART="no"
|
||||||
|
IPVS_STATUS_NUMERIC="yes"
|
||||||
|
|
||||||
|
# Load IPVSADM configuration.
|
||||||
|
[ -f "$IPVSADM_CONFIG" ] && . "$IPVSADM_CONFIG"
|
||||||
|
|
||||||
|
rmmod_r() {
|
||||||
|
# Unload module with all referring modules.
|
||||||
|
# At first all referring modules will be unloaded, then the module itself.
|
||||||
|
local mod=$1
|
||||||
|
local ret=0
|
||||||
|
local ref=
|
||||||
|
|
||||||
|
# Get referring modules.
|
||||||
|
# New modutils have another output format.
|
||||||
|
[ $NEW_MODUTILS = 1 ] \
|
||||||
|
&& ref=$(lsmod | awk "/^${mod}[[:space:]]/ { print \$4; }" | tr ',' ' ') \
|
||||||
|
|| ref=$(lsmod | grep ^${mod} | cut -d "[" -s -f 2 | cut -d "]" -s -f 1)
|
||||||
|
|
||||||
|
# recursive call for all referring modules
|
||||||
|
for i in $ref; do
|
||||||
|
rmmod_r $i
|
||||||
|
let ret+=$?;
|
||||||
|
done
|
||||||
|
|
||||||
|
# Unload module.
|
||||||
|
# The extra test is for 2.6: The module might have autocleaned,
|
||||||
|
# after all referring modules are unloaded.
|
||||||
|
if grep -q "^${mod}" /proc/modules ; then
|
||||||
|
modprobe -r $mod > /dev/null 2>&1
|
||||||
|
res=$?
|
||||||
|
[ $res -eq 0 ] || echo -n " $mod"
|
||||||
|
let ret+=$res;
|
||||||
|
fi
|
||||||
|
|
||||||
|
return $ret
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
# Do not start if there is no config file.
|
||||||
|
[ ! -f "$IPVSADM_DATA" ] && return 6
|
||||||
|
|
||||||
|
# If we don't clear these first, we might be adding to pre-existing rules.
|
||||||
|
action $"${IPVSADM}: Clearing the current IPVS table:" $IPVSADM -C
|
||||||
|
|
||||||
|
echo -n $"${IPVSADM}: Applying IPVS configuration: "
|
||||||
|
$IPVSADMRESTORE < ${IPVSADM_DATA}
|
||||||
|
if [ $? -eq 0 ];then success; echo; else failure; echo; return 1;fi
|
||||||
|
|
||||||
|
touch $VAR_SUBSYS_IPVSADM
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
# Do not stop if ipvs module is not loaded.
|
||||||
|
[ ! -e "$PROC_IPVS" ] && return 0
|
||||||
|
|
||||||
|
action $"${IPVSADM}: Clearing the current IPVS table:" $IPVSADM -C
|
||||||
|
|
||||||
|
ret=0
|
||||||
|
|
||||||
|
if [ "x$IPVS_MODULES_UNLOAD" = "xyes" ]; then
|
||||||
|
action $"${IPVSADM}: Unloading modules:" rmmod_r $IPVS
|
||||||
|
[ $? -ne 0 ] && ret=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f $VAR_SUBSYS_IPVSADM
|
||||||
|
|
||||||
|
return $ret
|
||||||
|
}
|
||||||
|
|
||||||
|
status() {
|
||||||
|
# Do not print status if lockfile is missing and ipvs modules are not
|
||||||
|
# loaded.
|
||||||
|
if [ ! -f "$VAR_SUBSYS_IPVSADM" -a ! -e "$PROC_IPVS" ]; then
|
||||||
|
echo $"${IPVSADM}: IPVS is not running."
|
||||||
|
return 3
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Do show status if ipvs module is not loaded.
|
||||||
|
if [ ! -e "$PROC_IPVS" ];then
|
||||||
|
echo $"${IPVSADM}: IPVS module is not loaded."
|
||||||
|
return 3
|
||||||
|
fi
|
||||||
|
|
||||||
|
NUM=""
|
||||||
|
[ "x$IPVS_STATUS_NUMERIC" = "xyes" ] && NUM="-n"
|
||||||
|
|
||||||
|
$IPVSADM -L $NUM && echo
|
||||||
|
}
|
||||||
|
|
||||||
|
save() {
|
||||||
|
# Check if module is loaded
|
||||||
|
[ ! -e "$PROC_IPVS" ] && return 0
|
||||||
|
|
||||||
|
echo -n $"${IPVSADM}: Saving IPVS table to ${IPVSADM_DATA}: "
|
||||||
|
$IPVSADMSAVE -n > ${IPVSADM_DATA} 2>/dev/null
|
||||||
|
if [ $? -eq 0 ];then success; echo; else failure; echo; return 1;fi
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
restart() {
|
||||||
|
[ "x$IPVS_SAVE_ON_RESTART" = "xyes" ] && save
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
}
|
||||||
|
|
||||||
|
# See how we were called.
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
[ -f "$VAR_SUBSYS_IPVSADM" ] && exit 0
|
||||||
|
|
||||||
|
# If we have no configuration, save the current one
|
||||||
|
[ -f ${IPVSADM_DATA} ] || save
|
||||||
|
start
|
||||||
|
RETVAL=$?
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
[ "x$IPVS_SAVE_ON_STOP" = "xyes" ] && save
|
||||||
|
stop
|
||||||
|
RETVAL=$?
|
||||||
|
;;
|
||||||
|
restart|force-reload)
|
||||||
|
restart
|
||||||
|
RETVAL=$?
|
||||||
|
;;
|
||||||
|
reload)
|
||||||
|
# Start will flush everything, so it counts as a reload
|
||||||
|
start
|
||||||
|
RETVAL=$?
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
status
|
||||||
|
RETVAL=$?
|
||||||
|
;;
|
||||||
|
save)
|
||||||
|
save
|
||||||
|
RETVAL=$?
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop|restart|force-reload|reload|status|save}"
|
||||||
|
RETVAL=2
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $RETVAL
|
@ -1,20 +1,21 @@
|
|||||||
Name: ipvsadm
|
Name: ipvsadm
|
||||||
Summary: Utility to administer the Linux Virtual Server
|
Summary: Utility to administer the Linux Virtual Server
|
||||||
Version: 1.31
|
Version: 1.31
|
||||||
Release: 1%{?dist}
|
Release: 15%{?dist}
|
||||||
License: GPLv2+
|
License: GPL-2.0-or-later
|
||||||
URL: https://kernel.org/pub/linux/utils/kernel/ipvsadm/
|
URL: https://kernel.org/pub/linux/utils/kernel/ipvsadm/
|
||||||
|
|
||||||
Source0: https://kernel.org/pub/linux/utils/kernel/ipvsadm/%{name}-%{version}.tar.gz
|
Source0: https://kernel.org/pub/linux/utils/kernel/ipvsadm/%{name}-%{version}.tar.gz
|
||||||
Source1: ipvsadm.service
|
Source1: ipvsadm.service
|
||||||
Source2: ipvsadm-config
|
Source2: ipvsadm-config
|
||||||
|
|
||||||
Patch3: 0003-ipvsadm-use-CFLAGS-and-LDFLAGS-environment-variables.patch
|
Patch0: 0003-ipvsadm-use-CFLAGS-and-LDFLAGS-environment-variables.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
Buildrequires: libnl3-devel
|
Buildrequires: libnl3-devel
|
||||||
Buildrequires: popt-devel
|
Buildrequires: popt-devel
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
|
BuildRequires: make
|
||||||
|
|
||||||
Requires(post): systemd
|
Requires(post): systemd
|
||||||
Requires(preun): systemd
|
Requires(preun): systemd
|
||||||
@ -36,7 +37,7 @@ services. Supported Features include:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch3 -p1
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%set_build_flags
|
%set_build_flags
|
||||||
@ -61,7 +62,6 @@ services. Supported Features include:
|
|||||||
%systemd_postun_with_restart %{name}.service
|
%systemd_postun_with_restart %{name}.service
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%doc MAINTAINERS README
|
%doc MAINTAINERS README
|
||||||
%{_unitdir}/%{name}.service
|
%{_unitdir}/%{name}.service
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}-config
|
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}-config
|
||||||
@ -73,14 +73,61 @@ services. Supported Features include:
|
|||||||
%{_mandir}/man8/%{name}-save.8*
|
%{_mandir}/man8/%{name}-save.8*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Jan 06 2020 Ryan O'Hara <rohara@redhat.com> - 1.31-1
|
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.31-15
|
||||||
- Update to 1.31 (#1777995)
|
- Bump release for October 2024 mass rebuild:
|
||||||
|
Resolves: RHEL-64018
|
||||||
|
|
||||||
* Tue Dec 03 2019 Ryan O'Hara <rohara@redhat.com> - 1.30-1
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.31-14
|
||||||
- Update to 1.30 (#1777995)
|
- Bump release for June 2024 mass rebuild
|
||||||
|
|
||||||
* Mon Oct 21 2019 Ryan O'Hara <rohara@redhat.com> - 1.29-9
|
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.31-13
|
||||||
- Add gating tests (#1682107)
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Jan 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.31-12
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Aug 04 2023 Ryan O'Hara <rohara@redhat.com> - 1.31-11
|
||||||
|
- Migrate to SPDX license
|
||||||
|
|
||||||
|
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.31-10
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.31-9
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.31-8
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.31-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.31-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.31-5
|
||||||
|
- Rebuilt for updated systemd-rpm-macros
|
||||||
|
See https://pagure.io/fesco/issue/2583.
|
||||||
|
|
||||||
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.31-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.31-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.31-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jan 02 2020 Ryan O'Hara <rohara@redhat.com> - 1.31-1
|
||||||
|
- Update to 1.31 (#1726210)
|
||||||
|
|
||||||
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.29-11
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.29-10
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.29-9
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
* Tue Feb 27 2018 Ryan O'Hara <rohara@redhat.com> - 1.29-8
|
* Tue Feb 27 2018 Ryan O'Hara <rohara@redhat.com> - 1.29-8
|
||||||
- Use CFLAGS and LDFLAGS environment variables (#1543790)
|
- Use CFLAGS and LDFLAGS environment variables (#1543790)
|
Loading…
Reference in New Issue
Block a user