rpms/ipvsadm/devel ipvsadm.init,NONE,1.1 ipvsadm.spec,1.17,1.18
Matthias Saou
thias at fedoraproject.org
Wed Dec 24 15:30:08 UTC 2008
Author: thias
Update of /cvs/extras/rpms/ipvsadm/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31185
Modified Files:
ipvsadm.spec
Added Files:
ipvsadm.init
Log Message:
Fork the included init script to be (mostly) LSB compliant (#246955).
--- NEW FILE ipvsadm.init ---
#!/bin/sh
#
# Startup script handle the initialisation of LVS
# chkconfig: - 08 92
# 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
# set the configuration file
IPVSADM_CONFIG="/etc/sysconfig/ipvsadm"
# Source function library
. /etc/rc.d/init.d/functions
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
}
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
}
# See how we were called.
case "$1" in
start)
# If we have no configuration, save the current one
[ -f ${IPVSADM_CONFIG} ] || save
start
;;
stop)
stop
;;
reload|force-reload|restart)
# Start will flush everything, so it counts as a restart
start
;;
status)
ipvsadm -L -n
;;
save)
save
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload|status|save}"
exit 3
esac
exit 0
Index: ipvsadm.spec
===================================================================
RCS file: /cvs/extras/rpms/ipvsadm/devel/ipvsadm.spec,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- ipvsadm.spec 22 Dec 2008 19:08:04 -0000 1.17
+++ ipvsadm.spec 24 Dec 2008 15:29:37 -0000 1.18
@@ -1,11 +1,12 @@
Summary: Utility to administer the Linux Virtual Server
Name: ipvsadm
Version: 1.25
-Release: 1
+Release: 2
License: GPLv2+
Group: Applications/System
URL: http://www.linuxvirtualserver.org/software/ipvs.html
-Source: http://www.linuxvirtualserver.org/software/kernel-2.6/ipvsadm-%{version}.tar.gz
+Source0: http://www.linuxvirtualserver.org/software/kernel-2.6/ipvsadm-%{version}.tar.gz
+Source1: ipvsadm.init
Patch0: ipvsadm-1.24-Makefile.patch
Patch1: ipvsadm-1.25-popt.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@@ -26,7 +27,7 @@
%build
-# Don't use _smp_mflags as it makes to build fail (1.2.4)
+# Don't use _smp_mflags as it makes the build fail (1.2.4)
CFLAGS="%{optflags}" make
@@ -34,6 +35,8 @@
rm -rf %{buildroot}
mkdir -p %{buildroot}/etc/rc.d/init.d
make install BUILD_ROOT=%{buildroot} MANDIR=%{_mandir}
+# Overwrite the provided init script with our own (mostly) LSB compliant one
+install -p -m 0755 %{SOURCE1} %{buildroot}/etc/rc.d/init.d/ipvsadm
%clean
@@ -62,6 +65,9 @@
%changelog
+* Wed Dec 24 2008 Matthias Saou <http://freshrpms.net/> 1.25-2
+- Fork the included init script to be (mostly) LSB compliant (#246955).
+
* Mon Dec 22 2008 Matthias Saou <http://freshrpms.net/> 1.25-1
- Prepare update to 1.25 for when devel will update to kernel 2.6.28.
- Build require libnl-devel and popt-devel (+ patch to fix popt detection).
More information about the fedora-extras-commits
mailing list