Compare commits
70 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5c633991d8 | ||
|
|
ddd2056b32 | ||
|
|
a940a0f63c | ||
|
|
a90c26ed66 | ||
|
|
c102942de2 | ||
|
|
1e6ea6df1f | ||
|
|
45c2bbe93c | ||
|
|
3d0685ad49 | ||
|
|
67176127f7 | ||
|
|
1daec872df | ||
|
|
9bf991c571 | ||
|
|
35e9a36e52 | ||
| ac371a9a0f | |||
|
|
3b54f72524 | ||
|
|
cc1a63916f | ||
|
|
f50886b60c | ||
|
|
175818c8e1 | ||
|
|
de91729541 | ||
|
|
776b2f8823 | ||
|
|
5a1034bcdc | ||
|
|
1f0f5d5b45 | ||
|
|
5a85ed7536 | ||
|
|
d5dcab08e2 | ||
|
305f99180d |
|||
|
|
63773ac56d | ||
|
|
1f9279f886 | ||
|
|
4907124fd3 | ||
|
|
01909a11de | ||
|
|
5c7ce03175 | ||
|
|
97aa08af62 | ||
|
|
b210e49e05 | ||
|
|
31cec7534a | ||
|
|
186d33b8f1 | ||
| e79fe0396b | |||
|
|
f6d89addd0 | ||
|
|
9f67b01cfc | ||
|
|
17028ce880 | ||
|
|
e1f5a53f2e | ||
|
|
35d35131f9 | ||
|
|
ef008cc828 | ||
|
|
9b61e32be3 | ||
|
|
a46ac137b6 | ||
|
|
e53bbcc55b | ||
|
|
d6dd6869c4 | ||
|
|
414ca79f7a | ||
|
|
5b318e1d06 | ||
|
|
30370f7675 | ||
| 563767d618 | |||
|
|
c423aa22b8 | ||
|
|
62d07c579c | ||
| c6a1471c08 | |||
| fd6dcdfb01 | |||
|
|
ac8da6f49e | ||
|
|
eaa85561dc | ||
|
|
7d08fca89e | ||
|
|
4bc0622a55 | ||
|
|
66ced50550 | ||
|
|
c8c7770c2f | ||
|
|
c557006180 | ||
|
|
3755c9fa63 | ||
|
|
bf3e84a2d2 | ||
|
|
84ffe4e370 | ||
|
|
5af1441296 | ||
|
|
3a5fee8e4f | ||
|
|
8780d75a4d | ||
|
|
fed451c714 | ||
|
|
1aa92b7f85 | ||
|
|
096b5b4319 | ||
|
|
e43424a72e | ||
|
|
14946aced8 |
7 changed files with 1 additions and 289 deletions
|
|
@ -1 +0,0 @@
|
|||
ucarp-1.0.tar.bz2
|
||||
21
Makefile
21
Makefile
|
|
@ -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/Rootx && { 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)
|
||||
143
carp.init
143
carp.init
|
|
@ -1,143 +0,0 @@
|
|||
#!/bin/bash
|
||||
# $Id: carp.init,v 1.1 2004/11/09 02:50:47 cvsextras Exp $
|
||||
#
|
||||
# chkconfig: - 91 09
|
||||
# description: Starts and stops ucarp. \
|
||||
# used to provide common address redundancy.
|
||||
|
||||
# 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 /etc/sysconfig/carp -type f -name 'vip-*.conf' -maxdepth 1 \
|
||||
-printf "%f\n" | LC_COLLATE="C" sort`
|
||||
}
|
||||
|
||||
prog=$"common address redundancy protocol daemon"
|
||||
RETVAL=0
|
||||
|
||||
start() {
|
||||
echo -n $"Starting ${prog}: "
|
||||
|
||||
get_files
|
||||
|
||||
if [ -z "${FILES}" ]; then
|
||||
failure $"no virtual addresses are configured in /etc/sysconfig/carp/"
|
||||
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
|
||||
initlog $INITLOG_ARGS -n carp -s "configuration file name ${FILE} gave us a bad ID of ${ID}:" -e 2
|
||||
RETVAL=1
|
||||
break
|
||||
fi
|
||||
|
||||
# Source ucarp settings
|
||||
. /etc/sysconfig/carp/${FILE}
|
||||
|
||||
# Check that we have the ifcfg-<if> file for the main interface
|
||||
if [ -f /etc/sysconfig/network-scripts/ifcfg-${BIND_INTERFACE} ]; then
|
||||
. /etc/sysconfig/network-scripts/ifcfg-${BIND_INTERFACE}
|
||||
else
|
||||
initlog $INITLOG_ARGS -n carp -s $"no ifcfg-${BIND_INTERFACE} file found for carp ${FILE} configuration:" -e 2
|
||||
RETVAL=1
|
||||
break
|
||||
fi
|
||||
# Check that the ifcfg-<if> file does have an IPADDR
|
||||
BIND_ADDRESS=${IPADDR}
|
||||
if [ -z "${BIND_ADDRESS}" ]; then
|
||||
initlog $INITLOG_ARGS -n carp -s $"no IPADDR found in interface file ifcfg-${BIND_INTERFACE}:" -e 2
|
||||
RETVAL=1
|
||||
break
|
||||
fi
|
||||
|
||||
# Check that we have the ifcfg-<if> file for the virtual interface
|
||||
if [ -f /etc/sysconfig/network-scripts/ifcfg-${VIP_INTERFACE} ]; then
|
||||
. /etc/sysconfig/network-scripts/ifcfg-${VIP_INTERFACE}
|
||||
else
|
||||
initlog $INITLOG_ARGS -n carp -s $"no ifcfg-${VIP_INTERFACE} file found for carp ${FILE} configuration:" -e 2
|
||||
RETVAL=1
|
||||
break
|
||||
fi
|
||||
# Check that the ifcfg-<if> file does have an IPADDR
|
||||
VIP_ADDRESS=${IPADDR}
|
||||
if [ -z "${VIP_ADDRESS}" ]; then
|
||||
initlog $INITLOG_ARGS -n carp -s "no IPADDR found in interface file ifcfg-${VIP_INTERFACE}:" -e 2
|
||||
RETVAL=1
|
||||
break
|
||||
fi
|
||||
|
||||
daemon /usr/sbin/ucarp -v ${ID} -p ${PASSWORD} -s ${BIND_ADDRESS} -a ${VIP_ADDRESS} -i ${VIP_INTERFACE} ${OPTIONS} -B --upscript=/etc/sysconfig/carp/vip-up --downscript=/etc/sysconfig/carp/vip-down
|
||||
LAUNCH_RETVAL=$?
|
||||
[ ${LAUNCH_RETVAL} -ne 0 ] && RETVAL=1
|
||||
done
|
||||
[ "${RETVAL}" -ne 0 ] && failure $"error in one or more of the carp configurations, see above:"
|
||||
fi
|
||||
echo
|
||||
[ "$RETVAL" -eq 0 ] && touch /var/lock/subsys/carp
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n $"Shutting down $prog: "
|
||||
killproc /usr/sbin/ucarp
|
||||
RETVAL=$?
|
||||
|
||||
# We put all interfaces managed by ucarp down when stopping the service
|
||||
# to avoid conflicting "leftovers"
|
||||
|
||||
get_files
|
||||
|
||||
[ ! -z "${FILES}" ] && \
|
||||
for FILE in ${FILES}; do
|
||||
|
||||
# Source ucarp settings
|
||||
. /etc/sysconfig/carp/${FILE}
|
||||
|
||||
# Check that we have the ifcfg-<if> file for the virtual interface
|
||||
if [ -f /etc/sysconfig/network-scripts/ifcfg-${VIP_INTERFACE} ]; then
|
||||
if /sbin/ifconfig ${VIP_INTERFACE} down >/dev/null 2>&1; then
|
||||
initlog $INITLOG_ARGS -n carp -s $"bringing down carp managed interface ${VIP_INTERFACE}:" -e 1
|
||||
else
|
||||
initlog $INITLOG_ARGS -n carp -s $"bringing down carp managed interface ${VIP_INTERFACE}:" -e 2
|
||||
fi
|
||||
fi
|
||||
done
|
||||
echo
|
||||
[ "$RETVAL" -eq 0 ] && rm -f /var/lock/subsys/carp
|
||||
}
|
||||
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
condrestart)
|
||||
if [ -f /var/lock/subsys/carp ]; then
|
||||
stop
|
||||
start
|
||||
fi
|
||||
;;
|
||||
status)
|
||||
status /usr/sbin/ucarp
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
1
dead.package
Normal file
1
dead.package
Normal file
|
|
@ -0,0 +1 @@
|
|||
Dead upstream, old website NSFW
|
||||
1
sources
1
sources
|
|
@ -1 +0,0 @@
|
|||
f40451c2d614e00121cbae0b0cbdb832 ucarp-1.0.tar.bz2
|
||||
103
ucarp.spec
103
ucarp.spec
|
|
@ -1,103 +0,0 @@
|
|||
# $Id: ucarp.spec,v 1.2 2004/11/09 02:50:54 cvsextras Exp $
|
||||
|
||||
Summary: Common Address Redundancy Protocol (CARP) for Unix
|
||||
Name: ucarp
|
||||
Version: 1.0
|
||||
Release: 1.1.fc2.fr
|
||||
License: BSD
|
||||
Group: System Environment/Daemons
|
||||
URL: http://www.ucarp.org/
|
||||
Source: http://www.pureftpd.org/ucarp/ucarp-%{version}.tar.bz2
|
||||
Source1: carp.init
|
||||
Source2: vip-001.conf.example
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
Requires(post): /sbin/chkconfig
|
||||
Requires(preun): /sbin/chkconfig, /sbin/service
|
||||
Requires(postun): /sbin/service
|
||||
BuildRequires: libpcap, gettext
|
||||
|
||||
|
||||
%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
|
||||
|
||||
|
||||
%build
|
||||
%configure
|
||||
%{__make} %{?_smp_mflags}
|
||||
|
||||
|
||||
%install
|
||||
%{__rm} -rf %{buildroot}
|
||||
%makeinstall
|
||||
%find_lang %{name}
|
||||
|
||||
# Install the init script
|
||||
%{__install} -D -m 0755 %{SOURCE1} \
|
||||
%{buildroot}/etc/rc.d/init.d/carp
|
||||
|
||||
# Install the example config file
|
||||
%{__install} -D -m 0600 %{SOURCE2} \
|
||||
%{buildroot}/etc/sysconfig/carp/vip-001.conf.example
|
||||
|
||||
# Install trivial interface up/down scripts
|
||||
%{__cat} << 'EOF' > %{buildroot}/etc/sysconfig/carp/vip-up
|
||||
#!/bin/sh
|
||||
# We could use ifup directly, but it complains if the address is already used
|
||||
#/sbin/ifup $1
|
||||
. /etc/sysconfig/network-scripts/ifcfg-$1
|
||||
#exec /sbin/ip addr add ${IPADDR}/${NETMASK} dev "$1"
|
||||
exec /sbin/ifconfig $1 ${IPADDR} netmask ${NETMASK} up
|
||||
EOF
|
||||
%{__cat} << 'EOF' > %{buildroot}/etc/sysconfig/carp/vip-down
|
||||
#!/bin/sh
|
||||
#. /etc/sysconfig/network-scripts/ifcfg-$1
|
||||
#exec /sbin/ip addr del ${IPADDR}/${NETMASK} dev "$1"
|
||||
exec /sbin/ifconfig $1 down
|
||||
EOF
|
||||
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
|
||||
%post
|
||||
if [ $1 -eq 1 ]; then
|
||||
/sbin/chkconfig --add carp
|
||||
fi
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then
|
||||
/sbin/service carp stop >/dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del carp
|
||||
fi
|
||||
|
||||
%postun
|
||||
if [ $1 -ge 1 ]; then
|
||||
/sbin/service carp condrestart >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
|
||||
%files -f %{name}.lang
|
||||
%defattr(-, root, root, 0755)
|
||||
%doc AUTHORS COPYING ChangeLog NEWS README examples/linux/*.sh
|
||||
/etc/rc.d/init.d/carp
|
||||
/etc/sysconfig/carp/vip-001.conf.example
|
||||
%attr(0700, root, root) %config(noreplace) /etc/sysconfig/carp/vip-up
|
||||
%attr(0700, root, root) %config(noreplace) /etc/sysconfig/carp/vip-down
|
||||
%{_sbindir}/ucarp
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jul 9 2004 Matthias Saou <http://freshrpms.net/> 1.0-1
|
||||
- Initial RPM release.
|
||||
|
||||
|
|
@ -1,20 +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.1 2004/11/09 02:50:47 cvsextras Exp $
|
||||
|
||||
# Set the same password on all mamchines sharing the same virtual IP
|
||||
PASSWORD="love"
|
||||
|
||||
# You are required to have an IPADDR= line in the configuration file for
|
||||
# this interface (so no DHCP allowed)
|
||||
BIND_INTERFACE="eth0"
|
||||
|
||||
# Do *NOT* use a main interface for the virtual IP, use an ethX:Y alias
|
||||
# with the corresponding /etc/sysconfig/network-scripts/ifcfg-ethX:Y file
|
||||
# already configured and ith ONBOOT=no
|
||||
VIP_INTERFACE="eth0:0"
|
||||
|
||||
# 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)
|
||||
OPTIONS="-k 128 -P"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue