[-]
[+]
|
Deleted |
keepalived.spec
|
@@ -1,185 +0,0 @@
-# needsrootforbuild
-Name: keepalived
-Summary: HA monitor built upon LVS, VRRP and services poller
-Version: 1.1.20
-Release: 1
-Source0: http://www.keepalived.org/software/%{name}-%{version}.tar.gz
-Source1: %{name}.init
-Patch0: %{name}-initdir.diff
-Patch1: %{name}-%{version}-fixes.patch
-License: GPL
-Group: Applications/System
-BuildRoot: /tmp/%{name}-%{version}.build
-
-BuildRequires: openssl-devel ipvsadm
-%if 0%{?suse_version}
-BuildRequires: kernel-source popt-devel
-%endif
-%if 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora_version}
-BuildRequires: kernel-devel popt
-%if 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 6 || 0%{?sl_version} >= 600
-BuildRequires: popt-devel
-%endif
-%define kdir %(echo `find /usr/src/kernels -maxdepth 1 -type d |grep "2.6"`)
-%endif
-Requires: ipvsadm
-
-%description
-The main goal of the keepalived project is to add a strong & robust keepalive facility to the Linux Virtual Server project. This project is written in C with multilayer TCP/IP stack checks. Keepalived implements a framework based on three family checks : Layer3, Layer4 & Layer5. This framework gives the daemon the ability of checking a LVS server pool states. When one of the server of the LVS server pool is down, keepalived informs the linux kernel via a setsockopt call to remove this server entrie from the LVS topology. In addition keepalived implements a VRRPv2 stack to handle director failover. So in short keepalived is a userspace daemon for LVS cluster nodes healthchecks and LVS directors failover.
-
-%prep
-rm -rf %{buildroot}
-%setup -q
-%patch0 -p1
-%patch1 -p1
-
-%build
-export CFLAGS=-D__KERNGLUE__
-# the setting of mandir should be %{buildroot}/usr/share/man, but the
-# makefile adds "man" itself.
-./configure --prefix=%{_prefix} \
- --exec-prefix=%{_prefix} \
- --sysconfdir=%{_sysconfdir} \
- %if 0%{?suse_version}
- --with-kernel-dir=/usr/src/linux \
- %endif
- %if 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora_version}
- --with-kernel-dir=%{kdir} \
- %endif
- --mandir=%{_prefix}/share/man \
- --enable-syncd || cat config.log
-
-%{__make}
-
-%install
-rm -rf %{buildroot}
-%makeinstall
-cd $RPM_BUILD_ROOT/%{_sbindir}
-%if 0%{?suse_version}
-cp %{S:1} %{buildroot}/etc/init.d/keepalived
-# move sysconfig file
-mkdir -p %{buildroot}/var/adm/fillup-templates
-mv %{buildroot}/etc/sysconfig/%{name} %{buildroot}/var/adm/fillup-templates/sysconfig.%{name}
-%endif
-ln -sf ../../etc/init.d/keepalived rckeepalived
-rm -rf %{buildroot}/etc/keepalived/samples
-
-%clean
-rm -rf %{buildroot}
-
-%post
-%if 0%{?suse_version}
-%fillup_and_insserv %{name}
-%endif
-
-%preun
-%if 0%{?suse_version}
-%stop_on_removal %{name}
-%endif
-
-%postun
-%if 0%{?suse_version}
-%restart_on_update %{name}
-%{insserv_cleanup}
-%endif
-
-%files
-%defattr(-,root,root)
-%{_bindir}/genhash
-%{_sbindir}/keepalived
-%{_sbindir}/rckeepalived
-%{_sysconfdir}/init.d/keepalived
-%if 0%{?suse_version}
-/var/adm/fillup-templates/sysconfig.%{name}
-%else
-%config %{_sysconfdir}/sysconfig/keepalived
-%endif
-%dir %{_sysconfdir}/keepalived/
-%config(noreplace) %{_sysconfdir}/keepalived/keepalived.conf
-%doc %{_mandir}/man5/keepalived.conf.5*
-%doc %{_mandir}/man1/genhash.1*
-%doc %{_mandir}/man8/keepalived.8*
-%doc doc
-%doc AUTHOR CONTRIBUTORS TODO COPYING README INSTALL VERSION ChangeLog
-
-%changelog
-* Sat Nov 20 2010 Carsten Schoene <cs@linux-administrator.com> - 1.1.20-2
-- added fixes patch for 1.1.20 from git
- (http://cgit.luffy.cx/keepalived/log/?h=fixes)
-
-* Thu May 27 2010 Carsten Schoene <cs@linux-administrator.com> - 1.1.20-1
-- update to release 1.1.20
- - Extend ip and route framework to support existing entries
- - Fix broadcast display
- - Fix genhash parsing issue
- - destroy old signal pipes on reload
- - Fix SMTP checker issue
- - handle non-existant default interface in VIP definition
- - Remove alive realserver when quorum is lost
- - Fix a segfault issue if virtual_server is empty
- - Keep previous effective VRRP priority on reload
- - Fix VRRP script handling
- - On reload keep VRRP scripts status
- - Remove IPVS Kernel 2.2 support
-
-* Thu Oct 01 2009 Carsten Schoene <cs@linux-administrator.com> - 1.1.19-1
-- update to release 1.1.19
- - Fixed segfault issue while parsing virtual_server
- - Fixed SIGCHLD handling upton reload
- - Fixed VRRP nopreempt from FAULT state
-
-* Thu Sep 24 2009 Carsten Schoene <cs@linux-administrator.com> - 1.1.18-1
-- update to release 1.1.18
- - Fixed reloading issues
- - Fixed a VRRP multicast group leave issue
- - Fixed initial value of quorum state
- - Fixed sorry server removal to take care of quorum state
- - Fixed a signal handling issue while reloading
- - Fixed PID handling
- - Updated media link failure detection strategy
- - Misc cosmetics fixes
- - Added support to delayed VRRP script launching
-
-* Sat Jul 18 2009 Carsten Schoene <cs@linux-administrator.com> - 1.1.17-2
-- pre/post macros added
-- do sysconfig installation with fillup_and_insserv on SuSE systems
-
-* Sun Mar 08 2009 Carsten Schoene <cs@linux-administrator.com>
-- update to release 1.1.17
- - Fixed a regression brought by previous release during low-level scheduler timer computation.
- - Fixed VRRP MII code to properly test BMSR.
- - Optimized VRRP script initialization.
-
-* Mon Feb 16 2009 Carsten Schoene <cs@linux-administrator.com>
-- update to release 1.1.16
-
-* Wed Sep 03 2008 Carsten Schoene <cs@linux-administrator.com>
-- build for CentOS 5 & hopefully for other RH based distributions
-
-* Wed Jul 30 2008 Carsten Schoene <cs@linux-administrator.com>
-- build for RHEL 5
-
-* Thu Nov 01 2007 Carsten Schoene <cs@linux-administrator.com>
-- add new init script for SuSE environments
-
-* Fri Sep 21 2007 Carsten Schoene <cs@linux-administrator.com>
-- version changed to 1.1.15
- - Fixed genshash makefile.
- - Removed http healthchecker buffer minimization causing crash.
- - Fixed parser include directive to support multi-level configuration includes.
- - Extended SSL checker for better handling of SSL handshake.
- - Fixed http healthcheker issue while processing MD5SUM.
- - Fixed missing notifications upon VRRP state transition.
- - Add support for VRRP virtual_routes to route metric.
- - Add a patch for init_dir setting
-
-* Sat Sep 15 2007 Carsten Schoene <cs@linux-administrator.com>
-- version changed to 1.1.14
- - Extended parsing framework to support include directives and error logging.
- - Merged patches from rpmforge.
- - Add script goodies directory.
- - Fixed compilation issue in VRRP code.
- - Fixed VRRP negative weights in script.
- - Extended VRRP framework to support Old-style Linux aliases.
- - Add support to VRRP script logging
-
|
[-]
[+]
|
Deleted |
keepalived-1.1.20-fixes.patch
^
|
@@ -1,633 +0,0 @@
-diff -uNr keepalived-1.1.20/doc/man/man5/keepalived.conf.5 keepalived-fixes/doc/man/man5/keepalived.conf.5
---- keepalived-1.1.20/doc/man/man5/keepalived.conf.5 2009-09-28 12:56:54.000000000 +0200
-+++ keepalived-fixes/doc/man/man5/keepalived.conf.5 2010-11-12 17:16:39.000000000 +0100
-@@ -45,45 +45,24 @@
-
- .SH Static routes/addresses
- .PP
--keepalived can configure static addresses and routes
--with
--.I ip
--(ie if addresses are not already on the machine). These addresses are
-+keepalived can configure static addresses and routes. These addresses are
- .B NOT
- moved by vrrpd, they stay on the machine.
- If you already have IPs and routes on your machines and
- your machines can ping each other, you don't need this section.
- .PP
--The whole string is fed to
--.I ip addr add.
--You can truncate the string anywhere you like and let
--.I ip addr add
--use defaults for the rest of the string. If you just
--feed the string "192.168.1.1", the IP will be 192.168.1.1/32,
--which you probably don't want.
--This is different to
--.I ifconfig
--which will configure the IP with the standard class, here
--192.168.1.1/24.
--The minimum string then would be the IP/netmask, eg 192.168.1.1/24
-+The syntax is the same as for virtual addresses and virtual routes.
- .PP
- static_ipaddress
- {
-- 192.168.1.1/24 brd + dev eth0 scope global
-+ 192.168.1.1/24 dev eth0 scope global
- ...
- }
- .PP
--The whole string is fed to
--.I ip route add.
--You can truncate the string allowing
--.I ip route add
--to use defaults.
--.PP
- static_routes
- {
-- src $SRC_IP to $DST_IP dev $SRC_DEVICE
-+ 192.168.2.0/24 via 192.168.1.100 dev eth0
- ...
-- src $SRC_IP to $DST_IP via $GW dev $SRC_DEVICE
- }
- .PP
- .SH VRRPD CONFIGURATION
-@@ -218,11 +197,13 @@
- }
- # routes add|del when changing to MASTER, to BACKUP
- virtual_routes {
-- # src <IPADDR> [to] <IPADDR>/<MASK> via|gw <IPADDR> dev <STRING> scope <SCOPE> tab
-+ # src <IPADDR> [to] <IPADDR>/<MASK> via|gw <IPADDR> [or <IPADDR>] dev <STRING> scope <SCOPE> tab
- src 192.168.100.1 to 192.168.109.0/24 via 192.168.200.254 dev eth1
- 192.168.110.0/24 via 192.168.200.254 dev eth1
- 192.168.111.0/24 dev eth2
- 192.168.112.0/24 via 192.168.100.254
-+ 192.168.113.0/24 via 192.168.200.254 or 192.168.100.254 dev eth1
-+ blackhole 192.168.114.0/24
- }
-
- # VRRP will normally preempt a lower priority
-diff -uNr keepalived-1.1.20/goodies/arpreset.pl keepalived-fixes/goodies/arpreset.pl
---- keepalived-1.1.20/goodies/arpreset.pl 1970-01-01 01:00:00.000000000 +0100
-+++ keepalived-fixes/goodies/arpreset.pl 2010-11-12 17:16:39.000000000 +0100
-@@ -0,0 +1,97 @@
-+#!/usr/bin/perl -w
-+
-+###################################################################
-+# arpreset 0.2
-+# Copyright (C) 2005 Steve Milton (milton AT isomedia.com)
-+#
-+# Utility for deleting a single ARP entry from a cisco router.
-+# Script adapted from description on Cisco tech article.
-+# http://www.cisco.com/warp/public/477/SNMP/clear_arp.shtml
-+#
-+# The Cisco router needs to have a read/write community setup
-+# for the utility to work. I recommend using the following
-+# IOS commands to setup a restricted community that can only
-+# work with the MAC table. You will need ENABLE level access
-+# to the router to execute these commands.
-+#
-+# access-list 50 permit 123.123.123.123
-+# access-list 50 permit 123.123.123.124
-+# access-list 50 deny any
-+# snmp-server view arpchange ipNetToMediaEntry.4 included
-+# snmp-server community blahblah view arpchange RW 50
-+#
-+# Set the access-list permit to the IP addresses of the systems
-+# you want to be able to make changes to the MAC table. Set
-+# the community name (above blahblah) to something random and
-+# password-like.
-+###################################################################
-+# This program is free software; you can redistribute it and/or
-+# modify it under the terms of the GNU General Public License
-+# as published by the Free Software Foundation; either version 2
-+# of the License, or (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+# GNU General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-+# 02110-1301, USA.
-+###################################################################
-+
-+use strict;
-+use Getopt::Long;
-+&Getopt::Long::config('auto_abbrev');
-+
-+my ($router,$community,$address,$help,$check);
-+$router=$community=$address=$help=$check="";
-+
-+my $status = GetOptions("router:s" => \$router,
-+ "community:s" => \$community,
-+ "address:s" => \$address,
-+ "help" => \$help,
-+ "check" => \$check);
-+
-+if (($status == 0) or $help) {
-+ &PrintUsage;
-+ exit 1;
-+}
-+
-+if (!$router or !$community or !$address) {
-+ &PrintUsage;
-+ exit 1;
-+}
-+
-+# OID for the ARP table entries
-+my $ciscoOID = ".1.3.6.1.2.1.4.22.1.4";
-+my $target = "";
-+
-+# Walk the SNMP ARP table on the router to locate the target address
-+open(GET, "/usr/bin/snmpwalk -v1 -c $community $router $ciscoOID |");
-+while(<GET>) {
-+ if (/^(.*?\.$address)\s/) {
-+ $target = $1;
-+ print $_;
-+ }
-+}
-+close(GET);
-+if ($target and !$check) {
-+ print "-- changed to --\n";
-+ # set the target address to "invalid"
-+ system("/usr/bin/snmpset -v1 -c $community $router $target i 2");
-+} elsif (!$check) {
-+ print "No target OID located.";
-+ exit 1;
-+}
-+exit;
-+
-+sub PrintUsage {
-+ print "arpreset 0.2\nCopyright (c) 2005 by Steve Milton\narpreset comes with ABSOLUTELY NO WARRANTY\n\n";
-+ print "Usage: arpreset --router=routeraddress --community=rwcommunity --address=ipaddress\n";
-+ print " arpreset --help\n";
-+ print "\nWhere ipaddress is the IP address in the Cisco router that you want to invalidate\nfrom the MAC address cache.\n";
-+ print "\nYou can add --check to the command to make it NOT update the router, but check for\nthe entry only.\n";
-+ exit;
-+}
-diff -uNr keepalived-1.1.20/.indent.pro keepalived-fixes/.indent.pro
---- keepalived-1.1.20/.indent.pro 1970-01-01 01:00:00.000000000 +0100
-+++ keepalived-fixes/.indent.pro 2010-11-12 17:16:39.000000000 +0100
-@@ -0,0 +1,8 @@
-+-kr
-+-i8
-+-ts8
-+-sob
-+-l80
-+-ss
-+-bs
-+-psl
-diff -uNr keepalived-1.1.20/keepalived/check/check_daemon.c keepalived-fixes/keepalived/check/check_daemon.c
---- keepalived-1.1.20/keepalived/check/check_daemon.c 2010-05-06 17:48:15.000000000 +0200
-+++ keepalived-fixes/keepalived/check/check_daemon.c 2010-11-12 17:16:39.000000000 +0100
-@@ -217,7 +217,7 @@
- }
-
- /* We catch a SIGCHLD, handle it */
-- log_message(LOG_INFO, "Healthcheck child process(%d) died: Respawning", pid);
-+ log_message(LOG_ALERT, "Healthcheck child process(%d) died: Respawning", pid);
- start_check_child();
- return 0;
- }
-diff -uNr keepalived-1.1.20/keepalived/check/check_data.c keepalived-fixes/keepalived/check/check_data.c
---- keepalived-1.1.20/keepalived/check/check_data.c 2010-05-06 17:48:22.000000000 +0200
-+++ keepalived-fixes/keepalived/check/check_data.c 2010-11-12 17:16:39.000000000 +0100
-@@ -261,6 +261,7 @@
-
- vs->s_svr = (real_server *) MALLOC(sizeof (real_server));
|
[-]
[+]
|
Deleted |
keepalived-initdir.diff
^
|
@@ -1,11 +0,0 @@
---- keepalived-1.1.15/keepalived/Makefile.in.orig 2007-09-21 11:05:35.000000000 +0200
-+++ keepalived-1.1.15/keepalived/Makefile.in 2007-09-21 11:05:44.000000000 +0200
-@@ -15,7 +15,7 @@
- sbindir = @sbindir@
- sysconfdir = @sysconfdir@
- mandir = @mandir@
--init_dir = $(sysconfdir)/rc.d/init.d
-+init_dir = $(sysconfdir)/init.d
- conf_dir = $(sysconfdir)/keepalived
- sysconf_dir = $(sysconfdir)/sysconfig
-
|
[-]
[+]
|
Deleted |
keepalived-older_kernel_ipvs_compat.patch
^
|
@@ -1,44 +0,0 @@
---- keepalived/include/check_data.h.orig 2009-09-24 16:56:31.000000000 +0200
-+++ keepalived/include/check_data.h 2009-09-24 17:12:00.000000000 +0200
-@@ -41,7 +41,7 @@
- #else
- #define SCHED_MAX_LENGTH IP_VS_SCHEDNAME_MAXLEN
- #endif
--#include <linux/ip_vs.h>
-+#include <net/ip_vs.h>
- #else
- #define SCHED_MAX_LENGTH 1
- #endif
---- keepalived/include/ipvswrapper.h.orig 2009-09-24 17:10:42.000000000 +0200
-+++ keepalived/include/ipvswrapper.h 2009-09-24 17:12:45.000000000 +0200
-@@ -48,7 +48,7 @@
- #elif _KRNL_2_6_
- #include "../libipvs-2.6/libipvs.h"
- #endif
-- #include <linux/ip_vs.h>
-+ #include <net/ip_vs.h>
- #endif
-
- #ifndef IP_VS_TEMPLATE_TIMEOUT
---- keepalived/libipvs-2.4/libipvs.h.orig 2009-09-24 17:13:28.000000000 +0200
-+++ keepalived/libipvs-2.4/libipvs.h 2009-09-24 17:13:43.000000000 +0200
-@@ -10,7 +10,7 @@
- #ifndef _LIBIPVS_H
- #define _LIBIPVS_H
-
--#include <linux/ip_vs.h>
-+#include <net/ip_vs.h>
-
- /*
- * The default IPVS_SVC_PERSISTENT_TIMEOUT is a little larger than average
---- keepalived/libipvs-2.6/libipvs.h.orig 2009-09-24 17:11:10.000000000 +0200
-+++ keepalived/libipvs-2.6/libipvs.h 2009-09-24 17:12:59.000000000 +0200
-@@ -10,7 +10,7 @@
- #ifndef _LIBIPVS_H
- #define _LIBIPVS_H
-
--#include <linux/ip_vs.h>
-+#include <net/ip_vs.h>
-
- #define MINIMUM_IPVS_VERSION_MAJOR 1
- #define MINIMUM_IPVS_VERSION_MINOR 1
|
|
Deleted |
keepalived-1.1.20.tar.gz
^
|
|
Deleted |
keepalived-fixes.tar.gz
^
|
[-]
[+]
|
Deleted |
keepalived.init
^
|
@@ -1,271 +0,0 @@
-#! /bin/sh
-#
-# /etc/init.d/keepalived
-# and its symbolic link
-# /(usr/)sbin/rckeepalived
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# Template system startup script for some example service/daemon keepalived
-#
-# LSB compatible service control script; see http://www.linuxbase.org/spec/
-#
-# Note: This template uses functions rc_XXX defined in /etc/rc.status on
-# UnitedLinux (UL) based Linux distributions. If you want to base your
-# script on this template and ensure that it works on non UL based LSB
-# compliant Linux distributions, you either have to provide the rc.status
-# functions from UL or change the script to work without them.
-#
-### BEGIN INIT INFO
-# Provides: keepalived
-# Required-Start: $syslog $remote_fs
-# Required-Stop: $null
-# Default-Start: 3 5
-# Default-Stop: 0 1 2 6
-# Short-Description: keepalived XYZ daemon providing ZYX
-# Description: Start keepalived to allow XY and provide YZ
-### END INIT INFO
-#
-# Any extensions to the keywords given above should be preceeded by
-# X-VendorTag- (X-UnitedLinux- X-SuSE- for us) according to LSB.
-#
-# Notes on Required-Start/Should-Start:
-# * There are two different issues that are solved by Required-Start
-# and Should-Start
-# (a) Hard dependencies: This is used by the runlevel editor to determine
-# which services absolutely need to be started to make the start of
-# this service make sense. Example: nfsserver should have
-# Required-Start: $portmap
-# Also, required services are started before the dependent ones.
-# The runlevel editor will warn about such missing hard dependencies
-# and suggest enabling. During system startup, you may expect an error,
-# if the dependency is not fulfilled.
-# (b) Specifying the init script ordering, not real (hard) dependencies.
-# This is needed by insserv to determine which service should be
-# started first (and at a later stage what services can be started
-# in parallel). The tag Should-Start: is used for this.
-# It tells, that if a service is available, it should be started
-# before. If not, never mind.
-# * When specifying hard dependencies or ordering requirements, you can
-# use names of services (contents of their Provides: section)
-# or pseudo names starting with a $. The following ones are available
-# according to LSB (1.1):
-# $local_fs all local file systems are mounted
-# (most services should need this!)
-# $remote_fs all remote file systems are mounted
-# (note that /usr may be remote, so
-# many services should Require this!)
-# $syslog system logging facility up
-# $network low level networking (eth card, ...)
-# $named hostname resolution available
-# $netdaemons all network daemons are running
-# The $netdaemons pseudo service has been removed in LSB 1.2.
-# For now, we still offer it for backward compatibility.
-# These are new (LSB 1.2):
-# $time the system time has been set correctly
-# $portmap SunRPC portmapping service available
-# UnitedLinux extensions:
-# $ALL indicates that a script should be inserted
-# at the end
-# * The services specified in the stop tags
-# (Required-Stop/Should-Stop)
-# specify which services need to be still running when this service
-# is shut down. Often the entries there are just copies or a subset
-# from the respective start tag.
-# * Should-Start/Stop are now part of LSB as of 2.0,
-# formerly SUSE/Unitedlinux used X-UnitedLinux-Should-Start/-Stop.
-# insserv does support both variants.
-# * X-UnitedLinux-Default-Enabled: yes/no is used at installation time
-# (%fillup_and_insserv macro in %post of many RPMs) to specify whether
-# a startup script should default to be enabled after installation.
-# It's not used by insserv.
-#
-# Note on runlevels:
-# 0 - halt/poweroff 6 - reboot
-# 1 - single user 2 - multiuser without network exported
-# 3 - multiuser w/ network (text mode) 5 - multiuser w/ network and X11 (xdm)
-#
-# Note on script names:
-# http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/scrptnames.html
-# A registry has been set up to manage the init script namespace.
-# http://www.lanana.org/
-# Please use the names already registered or register one or use a
-# vendor prefix.
-
-
-# Check for missing binaries (stale symlinks should not happen)
-# Note: Special treatment of stop for LSB conformance
-KEEPALIVED_BIN=/usr/sbin/keepalived
-test -x $KEEPALIVED_BIN || { echo "$KEEPALIVED_BIN not installed";
- if [ "$1" = "stop" ]; then exit 0;
- else exit 5; fi; }
-
-# Check for existence of needed config file and read it
-KEEPALIVED_CONFIG=/etc/sysconfig/keepalived
-test -r $KEEPALIVED_CONFIG || { echo "$KEEPALIVED_CONFIG not existing";
- if [ "$1" = "stop" ]; then exit 0;
- else exit 6; fi; }
-#
-# Read config
-. $KEEPALIVED_CONFIG
-
-# Source LSB init functions
-# providing start_daemon, killproc, pidofproc,
-# log_success_msg, log_failure_msg and log_warning_msg.
-# This is currently not used by UnitedLinux based distributions and
-# not needed for init scripts for UnitedLinux only. If it is used,
-# the functions from rc.status should not be sourced or used.
-#. /lib/lsb/init-functions
-
-# Shell functions sourced from /etc/rc.status:
-# rc_check check and set local and overall rc status
-# rc_status check and set local and overall rc status
-# rc_status -v be verbose in local rc status and clear it afterwards
-# rc_status -v -r ditto and clear both the local and overall rc status
-# rc_status -s display "skipped" and exit with status 3
-# rc_status -u display "unused" and exit with status 3
-# rc_failed set local and overall rc status to failed
-# rc_failed <num> set local and overall rc status to <num>
-# rc_reset clear both the local and overall rc status
-# rc_exit exit appropriate to overall rc status
-# rc_active checks whether a service is activated by symlinks
-. /etc/rc.status
-
-# Reset status of this service
-rc_reset
-
-# Return values acc. to LSB for all commands but status:
-# 0 - success
-# 1 - generic or unspecified error
-# 2 - invalid or excess argument(s)
-# 3 - unimplemented feature (e.g. "reload")
-# 4 - user had insufficient privileges
-# 5 - program is not installed
-# 6 - program is not configured
-# 7 - program is not running
-# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
-#
-# Note that starting an already running service, stopping
-# or restarting a not-running service as well as the restart
-# with force-reload (in case signaling is not supported) are
-# considered a success.
-
-case "$1" in
- start)
- echo -n "Starting keepalived "
- ## Start daemon with startproc(8). If this fails
- ## the return value is set appropriately by startproc.
- /sbin/startproc $KEEPALIVED_BIN $KEEPALIVED_OPTIONS
-
- # Remember status and be verbose
- rc_status -v
- ;;
- stop)
- echo -n "Shutting down keepalived "
- ## Stop daemon with killproc(8) and if this fails
- ## killproc sets the return value according to LSB.
-
- /sbin/killproc -TERM $KEEPALIVED_BIN
-
- # Remember status and be verbose
- rc_status -v
- ;;
- try-restart|condrestart)
- ## Do a restart only if the service was active before.
- ## Note: try-restart is now part of LSB (as of 1.9).
- ## RH has a similar command named condrestart.
- if test "$1" = "condrestart"; then
- echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
- fi
- $0 status
- if test $? = 0; then
- $0 restart
- else
- rc_reset # Not running is not a failure.
- fi
- # Remember status and be quiet
- rc_status
|