Compare commits

...
Sign in to create a new pull request.

57 commits

Author SHA1 Message Date
Gwyn Ciesla
5c633991d8 Dead upstream, old website NSFW 2025-05-08 09:31:17 -05:00
Fedora Release Engineering
ddd2056b32 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 13:34:34 +00:00
Gwyn Ciesla
a940a0f63c Require initscripts 2024-11-26 09:29:58 -06:00
Fedora Release Engineering
a90c26ed66 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 08:06:13 +00:00
Software Management Team
c102942de2 Eliminate use of obsolete %patchN syntax (#2283636) 2024-05-30 12:46:49 +02:00
Fedora Release Engineering
1e6ea6df1f Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-27 06:56:49 +00:00
Fedora Release Engineering
45c2bbe93c Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 16:57:35 +00:00
Gwyn Ciesla
3d0685ad49 migrated to SPDX license 2023-03-07 11:38:24 -06:00
Fedora Release Engineering
67176127f7 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-21 05:38:53 +00:00
Fedora Release Engineering
1daec872df Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 11:14:05 +00:00
Fedora Release Engineering
9bf991c571 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-22 03:22:35 +00:00
Fedora Release Engineering
35e9a36e52 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 19:53:33 +00:00
ac371a9a0f Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
2021-03-02 16:12:07 +01:00
Fedora Release Engineering
3b54f72524 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 22:32:18 +00:00
Tom Stellard
cc1a63916f Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-09 00:16:38 +00:00
Fedora Release Engineering
f50886b60c - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 13:08:27 +00:00
Gwyn Ciesla
175818c8e1 Fix FTBFS. 2020-02-10 13:46:07 -06:00
Fedora Release Engineering
de91729541 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-31 02:24:09 +00:00
Fedora Release Engineering
776b2f8823 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-27 02:17:30 +00:00
Fedora Release Engineering
5a1034bcdc - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-03 10:38:19 +00:00
Fedora Release Engineering
1f0f5d5b45 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-14 08:07:29 +00:00
Jason Tibbitts
5a85ed7536 Remove needless use of %defattr 2018-07-10 01:40:30 -05:00
Gwyn Ciesla
d5dcab08e2 Move from PASSWORD to PASSFILE. 2018-02-27 08:23:51 -06:00
305f99180d
Remove %clean section
None of currently supported distributions need that.
Last one was EL5 which is EOL for a while.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-14 09:13:50 +01:00
Fedora Release Engineering
63773ac56d - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-09 19:50:47 +00:00
Gwyn Ciesla
1f9279f886 Unit file fix. 2017-08-08 12:07:57 -05:00
Fedora Release Engineering
4907124fd3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-03 09:41:32 +00:00
Fedora Release Engineering
01909a11de - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-27 20:51:40 +00:00
Jon Ciesla
5c7ce03175 systemd cleanup 2017-03-14 12:52:37 -05:00
Fedora Release Engineering
97aa08af62 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-11 16:35:58 +00:00
Fedora Release Engineering
b210e49e05 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-05 02:13:31 +00:00
Dennis Gilmore
31cec7534a - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-19 01:24:40 +00:00
Kevin Fenzi
186d33b8f1 Rebuild for rpm bug 1131960 2014-08-21 11:53:42 -06:00
e79fe0396b - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-18 06:38:58 +00:00
Dennis Gilmore
f6d89addd0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-07 21:28:05 -05:00
Jon Ciesla
9f67b01cfc Fix FTBFS. 2013-08-05 12:27:44 -05:00
Dennis Gilmore
17028ce880 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild 2013-08-04 00:19:26 -05:00
Dennis Gilmore
e1f5a53f2e - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild 2013-02-14 20:19:50 -06:00
Jon Ciesla
35d35131f9 Add patch. 2012-10-25 09:31:00 -05:00
Jon Ciesla
ef008cc828 Fix crash. 2012-10-25 09:28:56 -05:00
Dennis Gilmore
9b61e32be3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-21 20:16:11 -05:00
Jon Ciesla
a46ac137b6 Add hardened build. 2012-04-13 07:16:33 -05:00
Jon Ciesla
e53bbcc55b Add unit file. 2012-03-14 10:53:57 -05:00
Jon Ciesla
d6dd6869c4 Migrate to systemd. 2012-03-14 10:50:03 -05:00
Dennis Gilmore
414ca79f7a - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild 2012-01-14 01:24:10 -06:00
Dennis Gilmore
5b318e1d06 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild 2011-02-07 17:53:48 -06:00
Fedora Release Engineering
30370f7675 dist-git conversion 2010-07-29 14:36:22 +00:00
563767d618 New upstream, noreplace for vip-up and vip-down. 2010-04-28 18:27:30 +00:00
Bill Nottingham
c423aa22b8 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-25 22:52:45 +00:00
Jesse Keating
62d07c579c - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild 2009-07-27 06:26:06 +00:00
c6a1471c08 1.5.1 2009-07-08 18:39:20 +00:00
fd6dcdfb01 1.5, initscript fix. 2009-04-13 13:56:19 +00:00
Jesse Keating
ac8da6f49e - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild 2009-02-25 22:26:34 +00:00
Matthias Saou
eaa85561dc Add vip-common.conf, missed in the previous commit. 2008-02-03 19:52:36 +00:00
Matthias Saou
7d08fca89e Update to 1.4 and major changes in the configuration (#427495). 2008-02-03 19:51:44 +00:00
Matthias Saou
4bc0622a55 Rebuild for new BuildID feature. 2007-08-23 08:06:06 +00:00
Matthias Saou
66ced50550 Update License field. 2007-08-05 19:59:35 +00:00
12 changed files with 1 additions and 2118 deletions

View file

@ -1 +0,0 @@
ucarp-1.2.tar.bz2

View file

@ -1,21 +0,0 @@
# Makefile for source rpm: ucarp
# $Id$
NAME := ucarp
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

1
dead.package Normal file
View file

@ -0,0 +1 @@
Dead upstream, old website NSFW

View file

@ -1 +0,0 @@
bed7ae84520f2e0faf3e68e9cfe4e1aa ucarp-1.2.tar.bz2

File diff suppressed because it is too large Load diff

View file

@ -1,149 +0,0 @@
#!/bin/bash
# $Id$
#
# chkconfig: - 91 09
# description: Starts and stops the common address redundancy protocol daemon
# Source function library.
. /etc/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
get_files() {
FILES=`find ${CONFDIR} -maxdepth 1 -type f -name 'vip-*.conf' \
-printf "%f\n" | egrep '^vip-[[:digit:]]+\.conf$' | LC_COLLATE="C" sort`
}
prog=$"common address redundancy protocol daemon"
OUR_INITLOG_ARGS="-n ucarp -e 2 -s"
OUR_INITLOG="initlog ${OUR_INITLOG_ARGS}"
CONFDIR=/etc/ucarp
UPSCRIPT=${CONFDIR}/vip-up
DOWNSCRIPT=${CONFDIR}/vip-down
start() {
RETVAL=-1
VIP_RETVAL=0
echo -n $"Starting ${prog}: "
get_files
if [ -z "${FILES}" ]; then
failure $"no virtual addresses are configured in ${CONFDIR}:"
RETVAL=1
else
for FILE in ${FILES}; do
# Check that the file name gives us an ID between 1 and 255
ID=`echo ${FILE}| sed 's/^vip-\(.*\).conf/\1/'`
if [ ${ID} -lt 1 -o ${ID} -gt 255 ]; then
${OUR_INITLOG} $"ID out of range (1-255) for ${FILE}, skipped VIP ID ${ID}:"
continue
fi
unset PASSWORD BIND_INTERFACE BIND_ADDRESS VIP OPTIONS
# Source ucarp settings
. ${CONFDIR}/${FILE}
TMP_RETVAL=0
if [ -z "${PASSWORD}" ]; then
${OUR_INITLOG} $"no PASSWORD found in ${FILE}, skipped VIP ID ${ID}:"
TMP_RETVAL=1
fi
if [ -z "${BIND_ADDRESS}" ]; then
${OUR_INITLOG} $"no BIND_ADDRESS found in ${FILE}, skipped VIP ID ${ID}:"
TMP_RETVAL=1
fi
if [ -z "${VIP_ADDRESS}" ]; then
${OUR_INITLOG} $"no VIP_ADDRESS found in ${FILE}, skipped VIP ID ${ID}:"
TMP_RETVAL=1
fi
# If one of more of the above failed, skip the daemon launch
if [ ${TMP_RETVAL} -ne 0 ]; then
VIP_RETVAL=1
continue
fi
[ ${RETVAL} -eq -1 ] && RETVAL=0
daemon /usr/sbin/ucarp -v ${ID} -m ${ID} -p ${PASSWORD} -s ${BIND_ADDRESS} -a ${VIP_ADDRESS} -i ${BIND_INTERFACE} ${OPTIONS} -B --upscript=$UPSCRIPT --downscript=$DOWNSCRIPT >/dev/null
LAUNCH_RETVAL=$?
[ ${LAUNCH_RETVAL} -ne 0 ] && RETVAL=1
done
# failure/success or warning if launch worked with some vip errors
if [ ${RETVAL} -eq 0 -a ${VIP_RETVAL} -eq 0 ]; then
success $"all ucarp configurations were applied successfully:"
touch /var/lock/subsys/ucarp
elif [ ${RETVAL} -eq 0 -a ${VIP_RETVAL} -eq 1 ]; then
warning $"error in one or more of the ucarp configurations:"
else
failure $"error running one or more of the ucarp daemon instances:"
fi
fi
echo
}
stop() {
echo -n $"Stopping $prog: "
killproc /usr/sbin/ucarp >/dev/null
RETVAL=$?
# We unassign all UCARP-managed VIPs when stopping the service
# to avoid conflicting "leftovers".
get_files
[ ! -z "${FILES}" ] && \
for FILE in ${FILES}; do
ID=`echo ${FILE}| sed 's/^vip-\(.*\).conf/\1/'`
unset PASSWORD BIND_INTERFACE BIND_ADDRESS VIP OPTIONS
# Source ucarp settings
. ${CONFDIR}/${FILE}
$DOWNSCRIPT $BIND_INTERFACE $VIP_ADDRESS ${ID} &>/dev/null
#TMP_RETVAL=$?
#[ ${TMP_RETVAL} -ne 0 ] && VIP_RETVAL=1
done
# failure/success (no warning, too complicated to handle properly)
if [ ${RETVAL} -eq 1 ]; then
failure $"it seems like no ucarp daemon were running:"
else
success $"all ucarp daemons stopped and IP addresses unassigned:"
rm -f /var/lock/subsys/ucarp
fi
echo
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
condrestart)
if [ -f /var/lock/subsys/ucarp ]; then
stop
start
fi
;;
status)
status /usr/sbin/ucarp
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac
exit $RETVAL

View file

@ -1,152 +0,0 @@
Summary: Common Address Redundancy Protocol (CARP) for Unix
Name: ucarp
Version: 1.2
Release: 7%{?dist}
License: BSD
Group: System Environment/Daemons
URL: http://www.ucarp.org/
Source0: http://download.pureftpd.org/pub/ucarp/ucarp-%{version}.tar.bz2
Source1: ucarp.init
Source2: vip-001.conf.example
Source3: vip-001.list.example
Source4: vip-up
Source5: vip-down
Source6: vip-helper.sh
Patch0: ucarp-1.3-pre.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig, /sbin/service
Requires(postun): /sbin/service
BuildRequires: gettext
BuildRequires: autoconf, automake, libtool
BuildRequires: libpcap-devel
%description
UCARP allows a couple of hosts to share common virtual IP addresses in order
to provide automatic failover. It is a portable userland implementation of the
secure and patent-free Common Address Redundancy Protocol (CARP, OpenBSD's
alternative to the patents-bloated VRRP).
Strong points of the CARP protocol are: very low overhead, cryptographically
signed messages, interoperability between different operating systems and no
need for any dedicated extra network link between redundant hosts.
%prep
%setup
%patch -p1
%build
%configure
%{__make} %{?_smp_mflags}
%install
%{__rm} -rf %{buildroot}
%{__make} install DESTDIR=%{buildroot}
%find_lang %{name}
# Install the init script
%{__install} -D -p -m 0755 %{SOURCE1} \
%{buildroot}/etc/rc.d/init.d/ucarp
%{__mkdir_p} %{buildroot}/etc/ucarp
# Install the example config files
%{__install} -D -p -m 0600 %{SOURCE2} %{SOURCE3} \
%{buildroot}/etc/ucarp/
# Install helper scripts
%{__install} -D -p -m 0700 %{SOURCE4} %{SOURCE5} %{SOURCE6} \
%{buildroot}/etc/ucarp/
%clean
%{__rm} -rf %{buildroot}
%pre
# Legacy, in case we update from an older package where the service was "carp"
if [ -f /etc/rc.d/init.d/carp ]; then
/sbin/service carp stop &>/dev/null || :
/sbin/chkconfig --del carp
fi
%post
/sbin/chkconfig --add ucarp
%preun
if [ $1 -eq 0 ]; then
/sbin/service ucarp stop &>/dev/null || :
/sbin/chkconfig --del ucarp
fi
%postun
if [ $1 -ge 1 ]; then
/sbin/service ucarp condrestart &>/dev/null || :
fi
%files -f %{name}.lang
%defattr(-, root, root, 0755)
%doc AUTHORS COPYING ChangeLog NEWS README
/etc/rc.d/init.d/ucarp
%attr(0700, root, root) %dir /etc/ucarp/
/etc/ucarp/vip-001.conf.example
/etc/ucarp/vip-001.list.example
/etc/ucarp/vip-up
/etc/ucarp/vip-down
/etc/ucarp/vip-helper.sh
%{_sbindir}/ucarp
%changelog
* Fri Feb 2 2007 Matthias Saou <http://freshrpms.net/> 1.2-7
- Rename service from carp to ucarp, to be more consistent.
- Move /etc/sysconfig/carp to /etc/ucarp since it has become a config directory
of its own.
* Wed Nov 29 2006 Matthias Saou <http://freshrpms.net/> 1.2-6
- Rebuild against new libpcap.
* Mon Nov 13 2006 Matthias Saou <http://freshrpms.net/> 1.2-5
- Include all improvements from Denis Ovsienko (#200395).
* Mon Aug 28 2006 Matthias Saou <http://freshrpms.net/> 1.2-4
- FC6 rebuild.
* Tue Aug 22 2006 Matthias Saou <http://freshrpms.net/> 1.2-3
- Update to 1.3 snapshot, which includes the ARP fix, as well as fixes for the
segfaults reported in #200400 and #201596.
- Add autoconf, automake and libtool build reqs for the 1.3 patch.
* Thu Jul 27 2006 Matthias Saou <http://freshrpms.net/> 1.2-3
- Fix init script for recent find versions (#200395).
* Thu Jun 22 2006 Matthias Saou <http://freshrpms.net/> 1.2-2
- Include ARP patch backported from 1.3 snapshot (#196095).
- Make libpcap build requirement conditional to be able to share spec file.
* Wed Jun 21 2006 Matthias Saou <http://freshrpms.net/> 1.2-1
- Update to 1.2.
- BuildRequire libpcap-devel instead of libpcap now that it has been split.
* Mon Mar 6 2006 Matthias Saou <http://freshrpms.net/> 1.1-5
- FC5 rebuild.
* Thu Feb 9 2006 Matthias Saou <http://freshrpms.net/> 1.1-4
- Rebuild for new gcc/glibc.
* Thu Nov 17 2005 Matthias Saou <http://freshrpms.net/> 1.1-3
- Rebuild against new libpcap library.
* Fri Apr 1 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.1-2
- Add %%dir entry for /etc/sysconfig/carp directory.
* Thu Jan 13 2005 Matthias Saou <http://freshrpms.net/> 1.1-1
- Update to 1.1.
- Update source location.
* Fri Jul 9 2004 Matthias Saou <http://freshrpms.net/> 1.0-1
- Initial RPM release.

View file

@ -1,47 +0,0 @@
# Virtual IP configuration file for UCARP
# The number (from 001 to 255) in the name of the file is the identifier
# $Id: vip-001.conf.example,v 1.3 2006/11/29 12:00:11 thias Exp $
# Set the same password on all machines sharing the same virtual router ID.
PASSWORD="love"
# UCARP daemon by default uses the first PCAP-capable interface as returned by
# pcap_lookupdev(), this is often "eth0". This option allows you to change
# this behaviour.
BIND_INTERFACE="eth0"
# This is a mandatory option. UCARP daemon will use this IP address for its
# announces regardless of the addresses actually assigned to the interface.
#BIND_ADDRESS="10.0.0.2"
# There is a simple and an advanced way to configure UCARP. In both ways you
# have two physical routers with distinct IP addresses on the same IP network.
# In the simple scenario, you want a single virtual IP address from the _same_
# network to be taken over by one of the routers. You configure this VIP right
# here then:
#VIP_ADDRESS="10.10.10.10"
# In the complex scenario, your virtual router consists of more than one IP
# address. For example, you might want to assign to the virtual router not only
# the address which is used as the default gateway on the LAN, but also the only
# real IP address, which you got from your ISP. Your configuration would have
# two steps then:
# 1. Configure the VIP_ADDRESS to "255.255.255.255"
# 2. Create a file in the same directory which holds vip-XXX.conf, with a name
# vip-XXX.list. For example, if the .conf file is named vip-001.conf, the .list
# file would be vip-001.list. Each meaningful line of this file will be used as
# an argument for "ip address add" and "ip address del" commands. This way you
# can control, which IP addresses will be assigned to which interfaces.
#VIP_ADDRESS="255.255.255.255"
# If you have extra options to add, see "ucarp --help" output
# (the lower the "-k <val>" the higher priority and "-P" to become master ASAP)
# Please note you can use only the following options here:
# --preempt (-P): becomes a master as soon as possible
# --neutral (-n): don't run downscript at start if backup
# --advbase=<seconds> (-b <seconds>): advertisement frequency
# --advskew=<skew> (-k <skew>): advertisement skew (0-255)
# The rest of options list is built up by the UCARP initscript.
OPTIONS="-k 128 -P"

View file

@ -1,11 +0,0 @@
# Comments are filtered out automatically...
10.0.0.254/24 dev eth0
# ... and empty lines too.
192.168.1.254/24 dev eth1
# You can assign as many VIPs to a single virtual router, as you need.
172.16.2.32/24 dev eth2
172.16.3.67/24 dev eth2
172.16.4.88/24 dev eth2

View file

@ -1,26 +0,0 @@
#!/bin/sh
usage()
{
echo "This script is intended to be run by the UCARP daemon."
echo "Usage: $0 <network interface> <IP address> <anything>"
echo "Usage: $0 <anything> <255.255.255.255> <virtual router ID>"
exit 1
}
[ $# -eq 3 ] || usage
case $2 in
255.255.255.255)
# New-style invocation. Process the the list of addresses
# specific to this virtual router.
MYDIR=`dirname $0`
$MYDIR/vip-helper.sh $3 del
;;
*)
# Old-style invocation. Just add a single address to the same
# interface UCARP daemon is working on.
ip address del $2/32 dev $1
;;
esac

View file

@ -1,28 +0,0 @@
#!/bin/sh
usage()
{
echo "This script is intended to be invoked by vip-up.sh or vip-down.sh"
exit 1
}
[ $# -eq 2 ] || usage
VRID=$1
OP=$2
MYDIR=`dirname $0`
if [ "$VRID" -lt "1" -o "$VRID" -gt 255 ]; then
echo "VRID must be in the 1 to 255 range."
exit 2
fi
LISTFILE="$MYDIR/vip-$VRID.list"
if ! [ -s "$LISTFILE" ]; then
echo "$LISTFILE is missing or empty, no action taken."
exit 1
fi
egrep ^[^#] $LISTFILE | sed -e 's/^ *\(.*\) *$/\1/' \
| xargs --max-lines=1 ip address $OP &>/dev/null

26
vip-up
View file

@ -1,26 +0,0 @@
#!/bin/sh
usage()
{
echo "This script is intended to be run by the UCARP daemon."
echo "Usage: $0 <network interface> <IP address> <anything>"
echo "Usage: $0 <anything> <255.255.255.255> <virtual router ID>"
exit 1
}
[ $# -eq 3 ] || usage
case $2 in
255.255.255.255)
# New-style invocation. Process the the list of addresses
# specific to this virtual router.
MYDIR=`dirname $0`
$MYDIR/vip-helper.sh $3 add
;;
*)
# Old-style invocation. Just add a single address to the same
# interface the UCARP daemon is working on.
ip address add $2/32 dev $1
;;
esac