Fork the init script to be (mostly for now) LSB compliant (#246966).
This commit is contained in:
parent
82524dc937
commit
8cb068987e
85
keepalived.init
Executable file
85
keepalived.init
Executable file
@ -0,0 +1,85 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Startup script for the Keepalived daemon
|
||||
# chkconfig: - 21 79
|
||||
# description: HA monitor built upon LVS, VRRP and service pollers
|
||||
# processname: keepalived
|
||||
# config: /etc/keepalived/keepalived.conf
|
||||
# config: /etc/sysconfig/keepalived
|
||||
# pidfile: /var/run/keepalived.pid
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: keepalived
|
||||
# Required-Start: $local_fs $network $named
|
||||
# Required-Stop: $local_fs $remote_fs $network
|
||||
# Short-Description: HA monitor built upon LVS, VRRP and service pollers
|
||||
# Description: Robust keepalive facility to the Linux Virtual Server project
|
||||
# with multilayer TCP/IP stack checks.
|
||||
### END INIT INFO
|
||||
|
||||
# Source function library
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
# Source configuration file (we set KEEPALIVED_OPTIONS there)
|
||||
. /etc/sysconfig/keepalived
|
||||
|
||||
RETVAL=0
|
||||
|
||||
prog="keepalived"
|
||||
|
||||
start() {
|
||||
echo -n $"Starting $prog: "
|
||||
daemon keepalived ${KEEPALIVED_OPTIONS}
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n $"Stopping $prog: "
|
||||
killproc keepalived
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
|
||||
}
|
||||
|
||||
reload() {
|
||||
echo -n $"Reloading $prog: "
|
||||
killproc keepalived -1
|
||||
RETVAL=$?
|
||||
echo
|
||||
}
|
||||
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
reload|force-reload)
|
||||
reload
|
||||
;;
|
||||
restart)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
condrestart|try-restart)
|
||||
if [ -f /var/lock/subsys/$prog ]; then
|
||||
stop
|
||||
start
|
||||
else
|
||||
echo $"Service $prog not running."
|
||||
exit 7
|
||||
fi
|
||||
;;
|
||||
status)
|
||||
status keepalived
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|reload|force-reload|restart|try-restart|status}"
|
||||
exit 3
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
@ -4,11 +4,12 @@
|
||||
Summary: HA monitor built upon LVS, VRRP and service pollers
|
||||
Name: keepalived
|
||||
Version: 1.1.15
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
License: GPLv2+
|
||||
Group: Applications/System
|
||||
URL: http://www.keepalived.org/
|
||||
Source: http://www.keepalived.org/software/keepalived-%{version}.tar.gz
|
||||
Source0: http://www.keepalived.org/software/keepalived-%{version}.tar.gz
|
||||
Source1: keepalived.init
|
||||
Patch0: keepalived-1.1.14-installmodes.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
Requires(post): /sbin/chkconfig
|
||||
@ -56,6 +57,9 @@ KERNELDIR=$(ls -1d /lib/modules/%{kernel}*/build | head -1)
|
||||
%{__make} install DESTDIR=%{buildroot}
|
||||
# Remove "samples", as we include them in %%doc
|
||||
%{__rm} -rf %{buildroot}%{_sysconfdir}/keepalived/samples/
|
||||
# Overwrite the init script with our (mostly) LSB compliant one
|
||||
%{__install} -p -m 0755 %{SOURCE1} \
|
||||
%{buildroot}%{_sysconfdir}/rc.d/init.d/keepalived
|
||||
|
||||
|
||||
%check
|
||||
@ -102,6 +106,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Dec 22 2008 Matthias Saou <http://freshrpms.net/> 1.1.15-6
|
||||
- Fork the init script to be (mostly for now) LSB compliant (#246966).
|
||||
|
||||
* Thu Apr 24 2008 Matthias Saou <http://freshrpms.net/> 1.1.15-5
|
||||
- Add glob to the kerneldir location, since it contains the arch for F9+.
|
||||
|
||||
@ -109,7 +116,7 @@ fi
|
||||
- Autorebuild for GCC 4.3
|
||||
|
||||
* Wed Dec 05 2007 Release Engineering <rel-eng at fedoraproject dot org>
|
||||
- Rebuild for deps
|
||||
- Rebuild for deps
|
||||
|
||||
* Mon Oct 22 2007 Matthias Saou <http://freshrpms.net/> 1.1.15-2
|
||||
- Update to latest upstream sources, identical except for the included spec.
|
||||
|
Loading…
Reference in New Issue
Block a user