From 863549e736e59cafff870b4e953522620992d6f1 Mon Sep 17 00:00:00 2001 From: cvsextras Date: Tue, 9 Nov 2004 02:50:47 +0000 Subject: [PATCH 01/72] auto-import changelog data from ucarp-1.0-1.1.fc1.fr.src.rpm //freshrpms.net/> 1.0-1 - Initial RPM release. --- .cvsignore | 1 + carp.init | 143 +++++++++++++++++++++++++++++++++++++++++++ sources | 1 + ucarp.spec | 103 +++++++++++++++++++++++++++++++ vip-001.conf.example | 20 ++++++ 5 files changed, 268 insertions(+) create mode 100755 carp.init create mode 100644 ucarp.spec create mode 100644 vip-001.conf.example diff --git a/.cvsignore b/.cvsignore index e69de29..30f089a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +ucarp-1.0.tar.bz2 diff --git a/carp.init b/carp.init new file mode 100755 index 0000000..e14c95b --- /dev/null +++ b/carp.init @@ -0,0 +1,143 @@ +#!/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- 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- 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- 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- 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- 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 diff --git a/sources b/sources index e69de29..4a4481e 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +f40451c2d614e00121cbae0b0cbdb832 ucarp-1.0.tar.bz2 diff --git a/ucarp.spec b/ucarp.spec new file mode 100644 index 0000000..b43dffa --- /dev/null +++ b/ucarp.spec @@ -0,0 +1,103 @@ +# $Id: ucarp.spec,v 1.1 2004/11/09 02:50:47 cvsextras Exp $ + +Summary: Common Address Redundancy Protocol (CARP) for Unix +Name: ucarp +Version: 1.0 +Release: 1.1.fc1.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 1.0-1 +- Initial RPM release. + diff --git a/vip-001.conf.example b/vip-001.conf.example new file mode 100644 index 0000000..0ce035b --- /dev/null +++ b/vip-001.conf.example @@ -0,0 +1,20 @@ +# 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 " the higher priority and "-P" to become master ASAP) +OPTIONS="-k 128 -P" + From 9b0124d4ddf07a449b8b3862f7c22353a1aaa539 Mon Sep 17 00:00:00 2001 From: cvsextras Date: Tue, 9 Nov 2004 02:50:54 +0000 Subject: [PATCH 02/72] auto-import ucarp-1.0-1.1.fc2.fr from ucarp-1.0-1.1.fc2.fr.src.rpm --- ucarp.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ucarp.spec b/ucarp.spec index b43dffa..237830d 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,9 +1,9 @@ -# $Id: ucarp.spec,v 1.1 2004/11/09 02:50:47 cvsextras Exp $ +# $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.fc1.fr +Release: 1.1.fc2.fr License: BSD Group: System Environment/Daemons URL: http://www.ucarp.org/ From 14946aced84cdb5095c94c7068dfbb6c80db0f58 Mon Sep 17 00:00:00 2001 From: gafton Date: Wed, 24 Nov 2004 05:05:03 +0000 Subject: [PATCH 03/72] Fix braindead typo from the original import --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b81a6ba..503525f 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ 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 +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)) From e43424a72e68ac47a8a2c669953c651394704aef Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Thu, 13 Jan 2005 18:13:20 +0000 Subject: [PATCH 04/72] Update. --- .cvsignore | 2 +- sources | 2 +- ucarp.spec | 13 +++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.cvsignore b/.cvsignore index 30f089a..54d366a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -ucarp-1.0.tar.bz2 +ucarp-1.1.tar.bz2 diff --git a/sources b/sources index 4a4481e..e5fe24b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f40451c2d614e00121cbae0b0cbdb832 ucarp-1.0.tar.bz2 +f907752bd1654a6e8aa42e717aee9774 ucarp-1.1.tar.bz2 diff --git a/ucarp.spec b/ucarp.spec index 237830d..cf2ad5d 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,13 +1,11 @@ -# $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 +Version: 1.1 +Release: 1 License: BSD Group: System Environment/Daemons URL: http://www.ucarp.org/ -Source: http://www.pureftpd.org/ucarp/ucarp-%{version}.tar.bz2 +Source0: ftp://ftp.ucarp.org/pub/ucarp/ucarp-%{version}.tar.bz2 Source1: carp.init Source2: vip-001.conf.example BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -16,7 +14,6 @@ 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 @@ -98,6 +95,10 @@ fi %changelog +* Thu Jan 13 2005 Matthias Saou 1.1-1 +- Update to 1.1. +- Update source location. + * Fri Jul 9 2004 Matthias Saou 1.0-1 - Initial RPM release. From 096b5b431974fd10445ae4a6a51a2c2192e7b6fd Mon Sep 17 00:00:00 2001 From: Michael Schwendt Date: Fri, 1 Apr 2005 16:36:00 +0000 Subject: [PATCH 05/72] second and final batch of fixes for missing directories --- ucarp.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index cf2ad5d..47621ea 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,7 +1,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.1 -Release: 1 +Release: 2 License: BSD Group: System Environment/Daemons URL: http://www.ucarp.org/ @@ -88,6 +88,7 @@ fi %defattr(-, root, root, 0755) %doc AUTHORS COPYING ChangeLog NEWS README examples/linux/*.sh /etc/rc.d/init.d/carp +%dir /etc/sysconfig/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 @@ -95,6 +96,9 @@ fi %changelog +* Fri Apr 1 2005 Michael Schwendt - 1.1-2 +- Add %%dir entry for /etc/sysconfig/carp directory. + * Thu Jan 13 2005 Matthias Saou 1.1-1 - Update to 1.1. - Update source location. From 1aa92b7f851bafd917244a5740bf13238cf2341d Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Thu, 17 Nov 2005 12:40:30 +0000 Subject: [PATCH 06/72] Rebuild against new libpcap library. --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 47621ea..58f1e92 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,7 +1,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.1 -Release: 2 +Release: 3%{?dist} License: BSD Group: System Environment/Daemons URL: http://www.ucarp.org/ @@ -96,6 +96,9 @@ fi %changelog +* Thu Nov 17 2005 Matthias Saou 1.1-3 +- Rebuild against new libpcap library. + * Fri Apr 1 2005 Michael Schwendt - 1.1-2 - Add %%dir entry for /etc/sysconfig/carp directory. From fed451c714fdd009cc94cfd2f77023c3addb89f3 Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Thu, 9 Feb 2006 19:07:30 +0000 Subject: [PATCH 07/72] Rebuild for new gcc/glibc. --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 58f1e92..fda2005 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,7 +1,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.1 -Release: 3%{?dist} +Release: 4%{?dist} License: BSD Group: System Environment/Daemons URL: http://www.ucarp.org/ @@ -96,6 +96,9 @@ fi %changelog +* Thu Feb 9 2006 Matthias Saou 1.1-4 +- Rebuild for new gcc/glibc. + * Thu Nov 17 2005 Matthias Saou 1.1-3 - Rebuild against new libpcap library. From 8780d75a4ddbf33adc14e0a30e7817540093fd7c Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Mon, 6 Mar 2006 15:07:21 +0000 Subject: [PATCH 08/72] FC5 rebuild. --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index fda2005..d851724 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,7 +1,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.1 -Release: 4%{?dist} +Release: 5%{?dist} License: BSD Group: System Environment/Daemons URL: http://www.ucarp.org/ @@ -96,6 +96,9 @@ fi %changelog +* Mon Mar 6 2006 Matthias Saou 1.1-5 +- FC5 rebuild. + * Thu Feb 9 2006 Matthias Saou 1.1-4 - Rebuild for new gcc/glibc. From 3a5fee8e4fd50971c68dcd7e63e598893c387a22 Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Tue, 20 Jun 2006 22:55:39 +0000 Subject: [PATCH 09/72] Update to 1.2 and build require libpcap-devel instead of libpcap now that it has been split. --- .cvsignore | 2 +- sources | 2 +- ucarp.spec | 12 ++++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index 54d366a..7664a05 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -ucarp-1.1.tar.bz2 +ucarp-1.2.tar.bz2 diff --git a/sources b/sources index e5fe24b..f77f191 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f907752bd1654a6e8aa42e717aee9774 ucarp-1.1.tar.bz2 +bed7ae84520f2e0faf3e68e9cfe4e1aa ucarp-1.2.tar.bz2 diff --git a/ucarp.spec b/ucarp.spec index d851724..63403a6 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,18 +1,18 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp -Version: 1.1 -Release: 5%{?dist} +Version: 1.2 +Release: 1%{?dist} License: BSD Group: System Environment/Daemons URL: http://www.ucarp.org/ -Source0: ftp://ftp.ucarp.org/pub/ucarp/ucarp-%{version}.tar.bz2 +Source0: http://download.pureftpd.org/pub/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 +BuildRequires: libpcap-devel, gettext %description UCARP allows a couple of hosts to share common virtual IP addresses in order @@ -96,6 +96,10 @@ fi %changelog +* Wed Jun 21 2006 Matthias Saou 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 1.1-5 - FC5 rebuild. From 5af1441296f85ef2ca0ea6f1a103c1ffc2c917b0 Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Thu, 22 Jun 2006 10:05:17 +0000 Subject: [PATCH 10/72] Include fix for ARP problem (#196095). --- carp.init | 2 +- ucarp-1.2-arp.patch | 57 ++++++++++++++++++++++++++++++++++++++++++++ ucarp.spec | 17 +++++++++++-- vip-001.conf.example | 2 +- 4 files changed, 74 insertions(+), 4 deletions(-) create mode 100644 ucarp-1.2-arp.patch diff --git a/carp.init b/carp.init index e14c95b..aebf331 100755 --- a/carp.init +++ b/carp.init @@ -1,5 +1,5 @@ #!/bin/bash -# $Id: carp.init,v 1.1 2004/11/09 02:50:47 cvsextras Exp $ +# $Id: carp.init,v 1.2 2006/06/22 10:05:17 thias Exp $ # # chkconfig: - 91 09 # description: Starts and stops ucarp. \ diff --git a/ucarp-1.2-arp.patch b/ucarp-1.2-arp.patch new file mode 100644 index 0000000..371d0c8 --- /dev/null +++ b/ucarp-1.2-arp.patch @@ -0,0 +1,57 @@ +diff -Naupr ucarp-1.2.orig/src/carp.c ucarp-1.2/src/carp.c +--- ucarp-1.2.orig/src/carp.c 2006-02-19 00:06:17.000000000 +0100 ++++ ucarp-1.2/src/carp.c 2006-06-22 11:59:46.000000000 +0200 +@@ -637,6 +637,8 @@ int docarp(void) + { + struct bpf_program bpfp; + struct pollfd pfds[1]; ++ struct ifreq iface; ++ int fd; + int nfds; + char errbuf[PCAP_ERRBUF_SIZE]; + +@@ -703,7 +705,33 @@ int docarp(void) + } + carp_setrun(&sc, 0); + ++ if ((fd = socket(PF_INET, SOCK_DGRAM, 0)) == -1) { ++ logfile(LOG_ERR, _("Error opening socket for interface [%s]: %s"), ++ interface == NULL ? "-" : interface, strerror(errno)); ++ return -1; ++ } ++#ifdef SIOCGIFFLAGS ++ if (strlen(interface) >= sizeof iface.ifr_name) { ++ logfile(LOG_ERR, _("Interface name too long")); ++ return -1; ++ } ++ strncpy(iface.ifr_name, interface, sizeof iface.ifr_name); ++#endif + for (;;) { ++#ifdef SIOCGIFFLAGS ++ if (ioctl(fd, SIOCGIFFLAGS, &iface) != 0) { ++ break; ++ } ++ if ((iface.ifr_flags & IFF_RUNNING) == 0) { ++ carp_set_state(&sc, BACKUP); ++ sc.sc_ad_tmo.tv_sec = 0; ++ sc.sc_ad_tmo.tv_usec = 0; ++ sc.sc_md_tmo.tv_sec = 0; ++ sc.sc_md6_tmo.tv_usec = 0; ++ sleep(SECONDS_TO_WAIT_AFTER_INTERFACE_IS_DOWN); ++ continue; ++ } ++#endif + nfds = poll(pfds, (nfds_t) 1, sc.sc_advbase * 1000); + if (nfds == -1 || + (pfds[0].revents & (POLLERR | POLLHUP | POLLNVAL)) != 0) { +diff -Naupr ucarp-1.2.orig/src/ucarp.h ucarp-1.2/src/ucarp.h +--- ucarp-1.2.orig/src/ucarp.h 2004-08-28 18:10:28.000000000 +0200 ++++ ucarp-1.2/src/ucarp.h 2006-06-22 11:59:33.000000000 +0200 +@@ -210,6 +210,7 @@ struct carp_softc { + #define CARP_AUTHLEN 7 + #define DEFAULT_ADVBASE 1U + #define DEFAULT_DEAD_RATIO 3U ++#define SECONDS_TO_WAIT_AFTER_INTERFACE_IS_DOWN 10U + + #define DEFAULT_FACILITY LOG_DAEMON + diff --git a/ucarp.spec b/ucarp.spec index 63403a6..ac4454a 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,18 +1,26 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.2 -Release: 1%{?dist} +Release: 2%{?dist} License: BSD Group: System Environment/Daemons URL: http://www.ucarp.org/ Source0: http://download.pureftpd.org/pub/ucarp/ucarp-%{version}.tar.bz2 Source1: carp.init Source2: vip-001.conf.example +Patch0: ucarp-1.2-arp.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig, /sbin/service Requires(postun): /sbin/service -BuildRequires: libpcap-devel, gettext +BuildRequires: gettext +# Use libpcap up to FC5, and libpcap-devel for FC6+ and non-Fedora +%if %{!?fedora:6}%{?fedora} >= 6 +BuildRequires: libpcap-devel +%else +BuildRequires: libpcap +%endif + %description UCARP allows a couple of hosts to share common virtual IP addresses in order @@ -26,6 +34,7 @@ need for any dedicated extra network link between redundant hosts. %prep %setup +%patch -p1 -b .arp %build @@ -96,6 +105,10 @@ fi %changelog +* Thu Jun 22 2006 Matthias Saou 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 1.2-1 - Update to 1.2. - BuildRequire libpcap-devel instead of libpcap now that it has been split. diff --git a/vip-001.conf.example b/vip-001.conf.example index 0ce035b..de845b1 100644 --- a/vip-001.conf.example +++ b/vip-001.conf.example @@ -1,6 +1,6 @@ # 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 $ +# $Id: vip-001.conf.example,v 1.2 2006/06/22 10:05:17 thias Exp $ # Set the same password on all mamchines sharing the same virtual IP PASSWORD="love" From 84ffe4e370fe0db30ba8095c5127243db8272d08 Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Tue, 22 Aug 2006 13:08:17 +0000 Subject: [PATCH 11/72] Fix segfaults by updating to 1.3 snapshot and fix init script on FC5+. --- carp.init | 4 +- ucarp-1.2-arp.patch | 57 -- ucarp-1.3-pre.patch | 1656 +++++++++++++++++++++++++++++++++++++++++++ ucarp.spec | 15 +- 4 files changed, 1670 insertions(+), 62 deletions(-) delete mode 100644 ucarp-1.2-arp.patch create mode 100644 ucarp-1.3-pre.patch diff --git a/carp.init b/carp.init index aebf331..52e51cc 100755 --- a/carp.init +++ b/carp.init @@ -1,5 +1,5 @@ #!/bin/bash -# $Id: carp.init,v 1.2 2006/06/22 10:05:17 thias Exp $ +# $Id: carp.init,v 1.3 2006/08/22 13:08:17 thias Exp $ # # chkconfig: - 91 09 # description: Starts and stops ucarp. \ @@ -15,7 +15,7 @@ [ ${NETWORKING} = "no" ] && exit 0 get_files() { - FILES=`find /etc/sysconfig/carp -type f -name 'vip-*.conf' -maxdepth 1 \ + FILES=`find /etc/sysconfig/carp -maxdepth 1 -type f -name 'vip-*.conf' \ -printf "%f\n" | LC_COLLATE="C" sort` } diff --git a/ucarp-1.2-arp.patch b/ucarp-1.2-arp.patch deleted file mode 100644 index 371d0c8..0000000 --- a/ucarp-1.2-arp.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff -Naupr ucarp-1.2.orig/src/carp.c ucarp-1.2/src/carp.c ---- ucarp-1.2.orig/src/carp.c 2006-02-19 00:06:17.000000000 +0100 -+++ ucarp-1.2/src/carp.c 2006-06-22 11:59:46.000000000 +0200 -@@ -637,6 +637,8 @@ int docarp(void) - { - struct bpf_program bpfp; - struct pollfd pfds[1]; -+ struct ifreq iface; -+ int fd; - int nfds; - char errbuf[PCAP_ERRBUF_SIZE]; - -@@ -703,7 +705,33 @@ int docarp(void) - } - carp_setrun(&sc, 0); - -+ if ((fd = socket(PF_INET, SOCK_DGRAM, 0)) == -1) { -+ logfile(LOG_ERR, _("Error opening socket for interface [%s]: %s"), -+ interface == NULL ? "-" : interface, strerror(errno)); -+ return -1; -+ } -+#ifdef SIOCGIFFLAGS -+ if (strlen(interface) >= sizeof iface.ifr_name) { -+ logfile(LOG_ERR, _("Interface name too long")); -+ return -1; -+ } -+ strncpy(iface.ifr_name, interface, sizeof iface.ifr_name); -+#endif - for (;;) { -+#ifdef SIOCGIFFLAGS -+ if (ioctl(fd, SIOCGIFFLAGS, &iface) != 0) { -+ break; -+ } -+ if ((iface.ifr_flags & IFF_RUNNING) == 0) { -+ carp_set_state(&sc, BACKUP); -+ sc.sc_ad_tmo.tv_sec = 0; -+ sc.sc_ad_tmo.tv_usec = 0; -+ sc.sc_md_tmo.tv_sec = 0; -+ sc.sc_md6_tmo.tv_usec = 0; -+ sleep(SECONDS_TO_WAIT_AFTER_INTERFACE_IS_DOWN); -+ continue; -+ } -+#endif - nfds = poll(pfds, (nfds_t) 1, sc.sc_advbase * 1000); - if (nfds == -1 || - (pfds[0].revents & (POLLERR | POLLHUP | POLLNVAL)) != 0) { -diff -Naupr ucarp-1.2.orig/src/ucarp.h ucarp-1.2/src/ucarp.h ---- ucarp-1.2.orig/src/ucarp.h 2004-08-28 18:10:28.000000000 +0200 -+++ ucarp-1.2/src/ucarp.h 2006-06-22 11:59:33.000000000 +0200 -@@ -210,6 +210,7 @@ struct carp_softc { - #define CARP_AUTHLEN 7 - #define DEFAULT_ADVBASE 1U - #define DEFAULT_DEAD_RATIO 3U -+#define SECONDS_TO_WAIT_AFTER_INTERFACE_IS_DOWN 10U - - #define DEFAULT_FACILITY LOG_DAEMON - diff --git a/ucarp-1.3-pre.patch b/ucarp-1.3-pre.patch new file mode 100644 index 0000000..c379af6 --- /dev/null +++ b/ucarp-1.3-pre.patch @@ -0,0 +1,1656 @@ +diff -Naupr ucarp-1.2/ChangeLog ucarp-1.3/ChangeLog +--- ucarp-1.2/ChangeLog 2006-02-25 17:32:53.000000000 +0100 ++++ ucarp-1.3/ChangeLog 2006-07-05 00:59:22.000000000 +0200 +@@ -1,3 +1,14 @@ ++* Version 1.3: ++ -n option wasn't properly parsed while --neutral was. Reported by Stefan ++Behte. ++ gratuitous ARP packets should now be properly sent. Thanks to Marcus ++Rueckert for indirectly pointing out that the code was wrong. ++ New -m option, and the virtual IP address is now passed to up/down scripts ++as well. By Fabrice Dulaunoy and Dirk Jagdmann who provided different ++implementations of the same idea. ++ A bogus return statement has been removed, thanks to Alessio Cervellin. ++ All interfaces should now be discovered on Solaris. ++ + * Version 1.2: + fakesnprintf/bsd-getopt_long updates from pure-ftpd 1.0.21. + Avoid processing our own multicasts. Thanks to Gregory McGarry. +diff -Naupr ucarp-1.2/config.guess ucarp-1.3/config.guess +--- ucarp-1.2/config.guess 2006-02-01 20:59:57.000000000 +0100 ++++ ucarp-1.3/config.guess 2006-05-27 23:12:33.000000000 +0200 +@@ -1,9 +1,10 @@ + #! /bin/sh + # Attempt to guess a canonical system name. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, ++# Inc. + +-timestamp='2005-07-08' ++timestamp='2006-05-13' + + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by +@@ -106,7 +107,7 @@ set_cc_for_build=' + trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; + trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; + : ${TMPDIR=/tmp} ; +- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || ++ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +@@ -206,6 +207,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; ++ *:SolidBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} ++ exit ;; + macppc:MirBSD:*:*) + echo powerppc-unknown-mirbsd${UNAME_RELEASE} + exit ;; +@@ -764,7 +768,14 @@ EOF + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) +- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ++ case ${UNAME_MACHINE} in ++ pc98) ++ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ amd64) ++ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ *) ++ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin +@@ -779,8 +790,11 @@ EOF + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; +- x86:Interix*:[34]*) +- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' ++ x86:Interix*:[345]*) ++ echo i586-pc-interix${UNAME_RELEASE} ++ exit ;; ++ EM64T:Interix*:[345]*) ++ echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks +@@ -794,7 +808,7 @@ EOF + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; +- amd64:CYGWIN*:*:*) ++ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) +@@ -851,7 +865,11 @@ EOF + #endif + #endif + EOF +- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` ++ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' ++ /^CPU/{ ++ s: ::g ++ p ++ }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + mips64:Linux:*:*) +@@ -870,9 +888,16 @@ EOF + #endif + #endif + EOF +- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` ++ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' ++ /^CPU/{ ++ s: ::g ++ p ++ }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; ++ or32:Linux:*:*) ++ echo or32-unknown-linux-gnu ++ exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; +@@ -916,6 +941,9 @@ EOF + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; ++ vax:Linux:*:*) ++ echo ${UNAME_MACHINE}-dec-linux-gnu ++ exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; +@@ -961,7 +989,7 @@ EOF + LIBC=gnulibc1 + # endif + #else +- #ifdef __INTEL_COMPILER ++ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + LIBC=gnu + #else + LIBC=gnuaout +@@ -971,7 +999,11 @@ EOF + LIBC=dietlibc + #endif + EOF +- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` ++ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' ++ /^LIBC/{ ++ s: ::g ++ p ++ }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit +@@ -1182,7 +1214,6 @@ EOF + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in +- *86) UNAME_PROCESSOR=i686 ;; + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} +@@ -1261,6 +1292,9 @@ EOF + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; ++ i*86:rdos:*:*) ++ echo ${UNAME_MACHINE}-pc-rdos ++ exit ;; + esac + + #echo '(No uname command or uname output not recognized.)' 1>&2 +diff -Naupr ucarp-1.2/config.sub ucarp-1.3/config.sub +--- ucarp-1.2/config.sub 2006-02-01 20:59:57.000000000 +0100 ++++ ucarp-1.3/config.sub 2006-05-27 23:12:38.000000000 +0200 +@@ -1,9 +1,10 @@ + #! /bin/sh + # Configuration validation subroutine script. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, ++# Inc. + +-timestamp='2005-07-08' ++timestamp='2006-05-13' + + # This file is (in principle) common to ALL GNU software. + # The presence of a machine in this file suggests that SOME GNU software +@@ -119,8 +120,9 @@ esac + # Here we must recognize all the valid KERNEL-OS combinations. + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in +- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ +- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) ++ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ ++ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ ++ storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; +@@ -171,6 +173,10 @@ case $os in + -hiux*) + os=-hiuxwe2 + ;; ++ -sco6) ++ os=-sco5v6 ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` +@@ -187,6 +193,10 @@ case $os in + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; ++ -sco5v6*) ++ # Don't forget version if it is 3.2v4 or newer. ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` +@@ -239,7 +249,8 @@ case $basic_machine in + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ +- | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ ++ | m32c | m32r | m32rle | m68000 | m68k | m88k \ ++ | maxq | mb | microblaze | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ +@@ -257,18 +268,19 @@ case $basic_machine in + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ +- | ms1 \ ++ | mt \ + | msp430 \ ++ | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ +- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ ++ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ +- | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ +- | sparcv8 | sparcv9 | sparcv9b \ +- | strongarm \ ++ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ ++ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ ++ | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ +@@ -276,9 +288,6 @@ case $basic_machine in + | z8k) + basic_machine=$basic_machine-unknown + ;; +- m32c) +- basic_machine=$basic_machine-unknown +- ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown +@@ -286,6 +295,9 @@ case $basic_machine in + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; ++ ms1) ++ basic_machine=mt-unknown ++ ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and +@@ -316,7 +328,7 @@ case $basic_machine in + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ +- | m32r-* | m32rle-* \ ++ | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ +@@ -336,19 +348,20 @@ case $basic_machine in + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ +- | ms1-* \ ++ | mt-* \ + | msp430-* \ ++ | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ +- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ ++ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ +- | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ ++ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ +- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ ++ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ +@@ -359,8 +372,6 @@ case $basic_machine in + | ymp-* \ + | z8k-*) + ;; +- m32c-*) +- ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) +@@ -696,6 +707,9 @@ case $basic_machine in + basic_machine=i386-pc + os=-msdos + ;; ++ ms1-*) ++ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ++ ;; + mvs) + basic_machine=i370-ibm + os=-mvs +@@ -803,6 +817,12 @@ case $basic_machine in + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; ++ pc98) ++ basic_machine=i386-pc ++ ;; ++ pc98-*) ++ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; +@@ -859,6 +879,10 @@ case $basic_machine in + basic_machine=i586-unknown + os=-pw32 + ;; ++ rdos) ++ basic_machine=i386-pc ++ os=-rdos ++ ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff +@@ -1101,7 +1125,7 @@ case $basic_machine in + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; +- sparc | sparcv8 | sparcv9 | sparcv9b) ++ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) +@@ -1174,21 +1198,23 @@ case $os in + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ +- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ ++ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ ++ | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ +- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ ++ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ ++ | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ +- | -skyos* | -haiku*) ++ | -skyos* | -haiku* | -rdos*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) +@@ -1340,6 +1366,9 @@ else + # system, and we'll never get to this point. + + case $basic_machine in ++ spu-*) ++ os=-elf ++ ;; + *-acorn) + os=-riscix1.2 + ;; +@@ -1349,9 +1378,9 @@ case $basic_machine in + arm*-semi) + os=-aout + ;; +- c4x-* | tic4x-*) +- os=-coff +- ;; ++ c4x-* | tic4x-*) ++ os=-coff ++ ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 +diff -Naupr ucarp-1.2/configure ucarp-1.3/configure +--- ucarp-1.2/configure 2006-02-25 17:32:42.000000000 +0100 ++++ ucarp-1.3/configure 2006-05-27 23:14:51.000000000 +0200 +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.59 for ucarp 1.2. ++# Generated by GNU Autoconf 2.59 for ucarp 1.3. + # + # Report bugs to . + # +@@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} + # Identity of this package. + PACKAGE_NAME='ucarp' + PACKAGE_TARNAME='ucarp' +-PACKAGE_VERSION='1.2' +-PACKAGE_STRING='ucarp 1.2' ++PACKAGE_VERSION='1.3' ++PACKAGE_STRING='ucarp 1.3' + PACKAGE_BUGREPORT='bugs@ucarp.org' + + ac_config_libobj_dir=src +@@ -780,7 +780,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures ucarp 1.2 to adapt to many kinds of systems. ++\`configure' configures ucarp 1.3 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -846,7 +846,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of ucarp 1.2:";; ++ short | recursive ) echo "Configuration of ucarp 1.3:";; + esac + cat <<\_ACEOF + +@@ -976,7 +976,7 @@ fi + test -n "$ac_init_help" && exit 0 + if $ac_init_version; then + cat <<\_ACEOF +-ucarp configure 1.2 ++ucarp configure 1.3 + generated by GNU Autoconf 2.59 + + Copyright (C) 2003 Free Software Foundation, Inc. +@@ -990,7 +990,7 @@ cat >&5 <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by ucarp $as_me 1.2, which was ++It was created by ucarp $as_me 1.3, which was + generated by GNU Autoconf 2.59. Invocation command line was + + $ $0 $@ +@@ -1635,7 +1635,7 @@ fi + + # Define the identity of the package. + PACKAGE='ucarp' +- VERSION='1.2' ++ VERSION='1.3' + + + cat >>confdefs.h <<_ACEOF +@@ -12000,7 +12000,7 @@ sysconfdir="$CONFDIR" + CPPFLAGS="$CPPFLAGS -DCONFDIR=\\\"$sysconfdir\\\"" + + +- ac_config_files="$ac_config_files Makefile src/Makefile examples/Makefile po/Makefile.in examples/linux/Makefile examples/bsd/Makefile m4/Makefile" ++ ac_config_files="$ac_config_files Makefile src/Makefile examples/Makefile examples/linux/Makefile examples/bsd/Makefile po/Makefile.in m4/Makefile" + + + cat >confcache <<\_ACEOF +@@ -12379,7 +12379,7 @@ _ASBOX + } >&5 + cat >&5 <<_CSEOF + +-This file was extended by ucarp $as_me 1.2, which was ++This file was extended by ucarp $as_me 1.3, which was + generated by GNU Autoconf 2.59. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -12442,7 +12442,7 @@ _ACEOF + + cat >>$CONFIG_STATUS <<_ACEOF + ac_cs_version="\\ +-ucarp config.status 1.2 ++ucarp config.status 1.3 + configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +@@ -12562,9 +12562,9 @@ do + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; +- "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; + "examples/linux/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/linux/Makefile" ;; + "examples/bsd/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/bsd/Makefile" ;; ++ "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; + "m4/Makefile" ) CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; + "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; +diff -Naupr ucarp-1.2/configure.ac ucarp-1.3/configure.ac +--- ucarp-1.2/configure.ac 2006-02-25 17:25:46.000000000 +0100 ++++ ucarp-1.3/configure.ac 2006-05-27 23:04:41.000000000 +0200 +@@ -1,6 +1,6 @@ + AC_PREREQ(2.59) + +-AC_INIT([ucarp],[1.2],[bugs@ucarp.org]) ++AC_INIT([ucarp],[1.3],[bugs@ucarp.org]) + AC_CONFIG_HEADERS([config.h]) + AM_INIT_AUTOMAKE([1.9 dist-bzip2]) + AC_CONFIG_LIBOBJ_DIR(src) +@@ -259,9 +259,9 @@ CPPFLAGS="$CPPFLAGS -DCONFDIR=\\\"$sysco + + dnl Output + +-AC_CONFIG_FILES(Makefile src/Makefile examples/Makefile po/Makefile.in ++AC_CONFIG_FILES(Makefile src/Makefile examples/Makefile + examples/linux/Makefile examples/bsd/Makefile +- m4/Makefile ) ++ po/Makefile.in m4/Makefile ) + + AC_OUTPUT + +diff -Naupr ucarp-1.2/examples/bsd/vip-down.sh ucarp-1.3/examples/bsd/vip-down.sh +--- ucarp-1.2/examples/bsd/vip-down.sh 2004-08-28 12:16:55.000000000 +0200 ++++ ucarp-1.3/examples/bsd/vip-down.sh 2006-05-27 22:38:40.000000000 +0200 +@@ -1,4 +1,4 @@ + #! /bin/sh + exec 2> /dev/null + +-/sbin/ifconfig "$1" -alias 10.1.1.252 ++/sbin/ifconfig "$1" -alias "$2" +diff -Naupr ucarp-1.2/examples/bsd/vip-up.sh ucarp-1.3/examples/bsd/vip-up.sh +--- ucarp-1.2/examples/bsd/vip-up.sh 2004-08-28 12:16:52.000000000 +0200 ++++ ucarp-1.3/examples/bsd/vip-up.sh 2006-05-27 22:38:34.000000000 +0200 +@@ -1,4 +1,4 @@ + #! /bin/sh + exec 2> /dev/null + +-/sbin/ifconfig "$1" alias 10.1.1.252 netmask 255.255.255.255 ++/sbin/ifconfig "$1" alias "$2" netmask 255.255.255.255 +diff -Naupr ucarp-1.2/examples/linux/vip-down.sh ucarp-1.3/examples/linux/vip-down.sh +--- ucarp-1.2/examples/linux/vip-down.sh 2004-08-28 12:16:49.000000000 +0200 ++++ ucarp-1.3/examples/linux/vip-down.sh 2006-05-27 22:41:37.000000000 +0200 +@@ -1,4 +1,7 @@ + #! /bin/sh + exec 2> /dev/null + +-/sbin/ip addr del 10.1.1.252/24 dev "$1" ++/sbin/ip addr del "$2"/24 dev "$1" ++ ++# or alternatively: ++# /sbin/ifconfig "$1":254 down +diff -Naupr ucarp-1.2/examples/linux/vip-up.sh ucarp-1.3/examples/linux/vip-up.sh +--- ucarp-1.2/examples/linux/vip-up.sh 2004-08-28 12:16:47.000000000 +0200 ++++ ucarp-1.3/examples/linux/vip-up.sh 2006-05-27 22:40:22.000000000 +0200 +@@ -1,4 +1,7 @@ + #! /bin/sh + exec 2> /dev/null + +-/sbin/ip addr add 10.1.1.252/24 dev "$1" ++/sbin/ip addr add "$2"/24 dev "$1" ++ ++# or alternatively: ++# /sbin/ifconfig "$1":254 "$2" netmask 255.255.255.0 +diff -Naupr ucarp-1.2/Makefile.am ucarp-1.3/Makefile.am +--- ucarp-1.2/Makefile.am 2006-02-25 17:22:01.000000000 +0100 ++++ ucarp-1.3/Makefile.am 2006-05-27 23:09:30.000000000 +0200 +@@ -7,4 +7,4 @@ SUBDIRS = \ + ACLOCAL_AMFLAGS = -I m4 + + +-EXTRA_DIST = config.rpath mkinstalldirs ++EXTRA_DIST = config.rpath mkinstalldirs config.rpath mkinstalldirs +diff -Naupr ucarp-1.2/Makefile.in ucarp-1.3/Makefile.in +--- ucarp-1.2/Makefile.in 2006-02-25 17:32:11.000000000 +0100 ++++ ucarp-1.3/Makefile.in 2006-05-27 23:14:12.000000000 +0200 +@@ -178,7 +178,7 @@ SUBDIRS = \ + examples + + ACLOCAL_AMFLAGS = -I m4 +-EXTRA_DIST = config.rpath mkinstalldirs ++EXTRA_DIST = config.rpath mkinstalldirs config.rpath mkinstalldirs + all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +diff -Naupr ucarp-1.2/NEWS ucarp-1.3/NEWS +--- ucarp-1.2/NEWS 2006-02-19 00:15:43.000000000 +0100 ++++ ucarp-1.3/NEWS 2006-04-06 11:50:19.000000000 +0200 +@@ -1,3 +1,5 @@ ++* Version 1.3: ++ + * Version 1.2: + - Neutral mode (--neutral). + - NetBSD compatibility. +diff -Naupr ucarp-1.2/po/en@boldquot.gmo ucarp-1.3/po/en@boldquot.gmo +--- ucarp-1.2/po/en@boldquot.gmo 2006-02-25 17:50:06.000000000 +0100 ++++ ucarp-1.3/po/en@boldquot.gmo 2006-07-05 00:54:58.000000000 +0200 +@@ -1,13 +1,8 @@ +-6I|R +-  +-m- +- +- +- +- +- +- )! DK    7 ' B c t   $ - / "F &i 2 ' # !1Qp!)' #1U+p'&*/G$gV R&y m0D]u)D :7L' $--R/"&2'-#U!y !')I's#+'&.*U$ ,)(' 6&$ % +-+.*  4-2"1#/3 50!* advertisement injected *--interface= (-i ): bind interface ++:O ++ ++m ++5 G +`     ) D V i w  7 '  ) : U n $ - / " &/2V'#!6Qe!)'#+6'b&*-$=U$u V&A mbt+)D> 7'  5Vg$-/ "9&\2'#!$Dc~!)'#$H+c'&* -#Qj$ 1+* ,8)60-/9$"3 ++5 !4(2'% :&7 #.* advertisement injected *--interface= (-i ): bind interface + --srcip= (-s ): source (real) IP address of that host + --vhid= (-v ): virtual IP identifier (1-255) + --pass= (-p ): password +@@ -23,6 +18,7 @@ + --shutdown (-z): call shutdown script at exit + --daemonize (-B): run in background + --facility= (-f): set syslog facility (default=daemon) ++--xparam= (-x): extra parameter to send to up/down scripts + + Sample usage: + +@@ -37,10 +33,10 @@ ucarp --interface=eth0 --srcip=10.1.1.1 + --upscript=/etc/vip-up.sh --downscript=/etc/vip-down.sh + + +-Please report bugs to Bad IP checksumBad TTL: [%u]Bad digest - md2=[%02x%02x%02x%02x...] md=[%02x%02x%02x%02x...] - Check vhid, password and virtual IP addressBad version: [%u]Dead ratio can't be zeroIgnoring vhid: [%u]Interface [%s] not foundInterface name too longInvalid address: [%s]Invalid media / hardware address for [%s]Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]No interface foundOut of memoryOut of memory to create packetPassword too longPreferred master advertised: going back to BACKUP statePutting MASTER DOWN (going to time out)Putting MASTER down - preemptionSpawning [%s %s]Switching to state: BACKUPSwitching to state: INITSwitching to state: MASTERUnable to compile pcap rule: %s [%s]Unable to detach from the current session: %sUnable to detach: /dev/null can't be duplicatedUnable to find MAC address of [%s]Unable to get hardware info about [%s]Unable to get hardware info about an interface: %sUnable to get in background: [fork: %s]Unable to get interface address: %sUnable to open interface [%s]: %sUnable to open raw device: [%s]Unable to spawn the script: %sUnknown hardware type [%u]Unknown state: [%d]Unknown syslog facility: [%s]Using [%s] as a network interfaceWarning: no script called when going downWarning: no script called when going upYou must supply a network interfaceYou must supply a passwordYou must supply a persistent source addressYou must supply a valid virtual host idYou must supply a virtual host addressYou must supply an advertisement time baseioctl SIOCGLIFCONF errorioctl SIOCGLIFNUM errormaster_down event in INIT stateout of memory to send gratuitous ARPwrite() error #%d/%dwrite() has failedProject-Id-Version: ucarp 1.2 ++Please report bugs to Bad IP checksumBad TTL: [%u]Bad digest - md2=[%02x%02x%02x%02x...] md=[%02x%02x%02x%02x...] - Check vhid, password and virtual IP addressBad version: [%u]Dead ratio can't be zeroError opening socket for interface [%s]: %sIgnoring vhid: [%u]Interface [%s] not foundInterface name too longInvalid address: [%s]Invalid media / hardware address for [%s]Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]No interface foundOut of memoryOut of memory to create packetPassword too longPreferred master advertised: going back to BACKUP statePutting MASTER DOWN (going to time out)Putting MASTER down - preemptionSpawning [%s %s]Switching to state: BACKUPSwitching to state: INITSwitching to state: MASTERUnable to compile pcap rule: %s [%s]Unable to detach from the current session: %sUnable to detach: /dev/null can't be duplicatedUnable to find MAC address of [%s]Unable to get hardware info about [%s]Unable to get hardware info about an interface: %sUnable to get in background: [fork: %s]Unable to get interface address: %sUnable to open interface [%s]: %sUnable to open raw device: [%s]Unable to spawn the script: %sUnknown hardware type [%u]Unknown state: [%d]Unknown syslog facility: [%s]Using [%s] as a network interfaceWarning: no script called when going downWarning: no script called when going upYou must supply a network interfaceYou must supply a passwordYou must supply a persistent source addressYou must supply a valid virtual host idYou must supply a virtual host addressYou must supply an advertisement time basegettimeofday() failed: %sinitializing now to gettimeofday() failed: %sioctl SIOCGLIFCONF errorioctl SIOCGLIFNUM errormaster_down event in INIT stateout of memory to send gratuitous ARPpoll() errorwrite() error #%d/%dwrite() has failedProject-Id-Version: ucarp 1.3 + Report-Msgid-Bugs-To: bugs@ucarp.org +-POT-Creation-Date: 2006-02-25 17:49+0100 +-PO-Revision-Date: 2006-02-25 17:49+0100 ++POT-Creation-Date: 2006-07-05 00:54+0200 ++PO-Revision-Date: 2006-07-05 00:54+0200 + Last-Translator: Automatically generated + Language-Team: none + MIME-Version: 1.0 +@@ -63,6 +59,7 @@ Plural-Forms: nplurals=2; plural=(n != 1 + --shutdown (-z): call shutdown script at exit + --daemonize (-B): run in background + --facility= (-f): set syslog facility (default=daemon) ++--xparam= (-x): extra parameter to send to up/down scripts + + Sample usage: + +@@ -77,4 +74,4 @@ ucarp --interface=eth0 --srcip=10.1.1.1 + --upscript=/etc/vip-up.sh --downscript=/etc/vip-down.sh + + +-Please report bugs to Bad IP checksumBad TTL: [%u]Bad digest - md2=[%02x%02x%02x%02x...] md=[%02x%02x%02x%02x...] - Check vhid, password and virtual IP addressBad version: [%u]Dead ratio can't be zeroIgnoring vhid: [%u]Interface [%s] not foundInterface name too longInvalid address: [%s]Invalid media / hardware address for [%s]Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]No interface foundOut of memoryOut of memory to create packetPassword too longPreferred master advertised: going back to BACKUP statePutting MASTER DOWN (going to time out)Putting MASTER down - preemptionSpawning [%s %s]Switching to state: BACKUPSwitching to state: INITSwitching to state: MASTERUnable to compile pcap rule: %s [%s]Unable to detach from the current session: %sUnable to detach: /dev/null can't be duplicatedUnable to find MAC address of [%s]Unable to get hardware info about [%s]Unable to get hardware info about an interface: %sUnable to get in background: [fork: %s]Unable to get interface address: %sUnable to open interface [%s]: %sUnable to open raw device: [%s]Unable to spawn the script: %sUnknown hardware type [%u]Unknown state: [%d]Unknown syslog facility: [%s]Using [%s] as a network interfaceWarning: no script called when going downWarning: no script called when going upYou must supply a network interfaceYou must supply a passwordYou must supply a persistent source addressYou must supply a valid virtual host idYou must supply a virtual host addressYou must supply an advertisement time baseioctl SIOCGLIFCONF errorioctl SIOCGLIFNUM errormaster_down event in INIT stateout of memory to send gratuitous ARPwrite() error #%d/%dwrite() has failed +\ No newline at end of file ++Please report bugs to Bad IP checksumBad TTL: [%u]Bad digest - md2=[%02x%02x%02x%02x...] md=[%02x%02x%02x%02x...] - Check vhid, password and virtual IP addressBad version: [%u]Dead ratio can't be zeroError opening socket for interface [%s]: %sIgnoring vhid: [%u]Interface [%s] not foundInterface name too longInvalid address: [%s]Invalid media / hardware address for [%s]Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]No interface foundOut of memoryOut of memory to create packetPassword too longPreferred master advertised: going back to BACKUP statePutting MASTER DOWN (going to time out)Putting MASTER down - preemptionSpawning [%s %s]Switching to state: BACKUPSwitching to state: INITSwitching to state: MASTERUnable to compile pcap rule: %s [%s]Unable to detach from the current session: %sUnable to detach: /dev/null can't be duplicatedUnable to find MAC address of [%s]Unable to get hardware info about [%s]Unable to get hardware info about an interface: %sUnable to get in background: [fork: %s]Unable to get interface address: %sUnable to open interface [%s]: %sUnable to open raw device: [%s]Unable to spawn the script: %sUnknown hardware type [%u]Unknown state: [%d]Unknown syslog facility: [%s]Using [%s] as a network interfaceWarning: no script called when going downWarning: no script called when going upYou must supply a network interfaceYou must supply a passwordYou must supply a persistent source addressYou must supply a valid virtual host idYou must supply a virtual host addressYou must supply an advertisement time basegettimeofday() failed: %sinitializing now to gettimeofday() failed: %sioctl SIOCGLIFCONF errorioctl SIOCGLIFNUM errormaster_down event in INIT stateout of memory to send gratuitous ARPpoll() errorwrite() error #%d/%dwrite() has failed +\ No newline at end of file +diff -Naupr ucarp-1.2/po/en@boldquot.po ucarp-1.3/po/en@boldquot.po +--- ucarp-1.2/po/en@boldquot.po 2006-02-25 17:50:06.000000000 +0100 ++++ ucarp-1.3/po/en@boldquot.po 2006-07-05 00:54:56.000000000 +0200 +@@ -30,10 +30,10 @@ + # + msgid "" + msgstr "" +-"Project-Id-Version: ucarp 1.2\n" ++"Project-Id-Version: ucarp 1.3\n" + "Report-Msgid-Bugs-To: bugs@ucarp.org\n" +-"POT-Creation-Date: 2006-02-25 17:49+0100\n" +-"PO-Revision-Date: 2006-02-25 17:49+0100\n" ++"POT-Creation-Date: 2006-07-05 00:54+0200\n" ++"PO-Revision-Date: 2006-07-05 00:54+0200\n" + "Last-Translator: Automatically generated\n" + "Language-Team: none\n" + "MIME-Version: 1.0\n" +@@ -119,30 +119,53 @@ msgstr "Putting MASTER down - preemption + msgid "Putting MASTER DOWN (going to time out)" + msgstr "Putting MASTER DOWN (going to time out)" + +-#: src/carp.c:655 ++#: src/carp.c:657 + msgid "Password too long" + msgstr "Password too long" + +-#: src/carp.c:668 ++#: src/carp.c:670 + #, c-format + msgid "Unable to find MAC address of [%s]" + msgstr "Unable to find MAC address of [%s]" + +-#: src/carp.c:672 ++#: src/carp.c:674 + #, c-format + msgid "Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]" + msgstr "Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]" + +-#: src/carp.c:679 ++#: src/carp.c:681 + #, c-format + msgid "Unable to open interface [%s]: %s" + msgstr "Unable to open interface [%s]: %s" + +-#: src/carp.c:685 ++#: src/carp.c:687 + #, c-format + msgid "Unable to compile pcap rule: %s [%s]" + msgstr "Unable to compile pcap rule: %s [%s]" + ++#: src/carp.c:703 ++#, c-format ++msgid "initializing now to gettimeofday() failed: %s" ++msgstr "initializing now to gettimeofday() failed: %s" ++ ++#: src/carp.c:709 ++#, c-format ++msgid "Error opening socket for interface [%s]: %s" ++msgstr "Error opening socket for interface [%s]: %s" ++ ++#: src/carp.c:715 src/fillmac.c:51 ++msgid "Interface name too long" ++msgstr "Interface name too long" ++ ++#: src/carp.c:739 ++msgid "poll() error" ++msgstr "poll() error" ++ ++#: src/carp.c:744 ++#, c-format ++msgid "gettimeofday() failed: %s" ++msgstr "gettimeofday() failed: %s" ++ + #: src/daemonize.c:53 + #, c-format + msgid "Unable to get in background: [fork: %s]" +@@ -162,10 +185,6 @@ msgstr "Unable to detach: /dev/null can' + msgid "Unable to open raw device: [%s]" + msgstr "Unable to open raw device: [%s]" + +-#: src/fillmac.c:51 +-msgid "Interface name too long" +-msgstr "Interface name too long" +- + #: src/fillmac.c:57 + #, c-format + msgid "Unable to get hardware info about an interface: %s" +@@ -198,17 +217,17 @@ msgstr "No interface found" + msgid "ioctl SIOCGLIFCONF error" + msgstr "ioctl SIOCGLIFCONF error" + +-#: src/fillmac.c:140 ++#: src/fillmac.c:135 + #, c-format + msgid "Interface [%s] not found" + msgstr "Interface [%s] not found" + +-#: src/fillmac.c:147 ++#: src/fillmac.c:148 + #, c-format + msgid "Unable to get hardware info about [%s]" + msgstr "Unable to get hardware info about [%s]" + +-#: src/garp.c:36 ++#: src/garp.c:39 + msgid "out of memory to send gratuitous ARP" + msgstr "out of memory to send gratuitous ARP" + +@@ -240,6 +259,7 @@ msgid "" + "--shutdown (-z): call shutdown script at exit\n" + "--daemonize (-B): run in background\n" + "--facility= (-f): set syslog facility (default=daemon)\n" ++"--xparam= (-x): extra parameter to send to up/down scripts\n" + "\n" + "Sample usage:\n" + "\n" +@@ -272,6 +292,7 @@ msgstr "" + "--shutdown (-z): call shutdown script at exit\n" + "--daemonize (-B): run in background\n" + "--facility= (-f): set syslog facility (default=daemon)\n" ++"--xparam= (-x): extra parameter to send to up/down scripts\n" + "\n" + "Sample usage:\n" + "\n" +@@ -288,57 +309,57 @@ msgstr "" + "\n" + "Please report bugs to " + +-#: src/ucarp.c:77 ++#: src/ucarp.c:78 + msgid "Out of memory" + msgstr "Out of memory" + +-#: src/ucarp.c:111 src/ucarp.c:137 ++#: src/ucarp.c:112 src/ucarp.c:139 + #, c-format + msgid "Invalid address: [%s]" + msgstr "Invalid address: [%s]" + +-#: src/ucarp.c:190 ++#: src/ucarp.c:193 + #, c-format + msgid "Unknown syslog facility: [%s]" + msgstr "Unknown syslog facility: [%s]" + +-#: src/ucarp.c:207 ++#: src/ucarp.c:217 + msgid "You must supply a network interface" + msgstr "You must supply a network interface" + +-#: src/ucarp.c:210 ++#: src/ucarp.c:220 + #, c-format + msgid "Using [%s] as a network interface" + msgstr "Using [%s] as a network interface" + +-#: src/ucarp.c:213 ++#: src/ucarp.c:223 + msgid "You must supply a valid virtual host id" + msgstr "You must supply a valid virtual host id" + +-#: src/ucarp.c:217 ++#: src/ucarp.c:227 + msgid "You must supply a password" + msgstr "You must supply a password" + +-#: src/ucarp.c:221 ++#: src/ucarp.c:231 + msgid "You must supply an advertisement time base" + msgstr "You must supply an advertisement time base" + +-#: src/ucarp.c:225 ++#: src/ucarp.c:235 + msgid "You must supply a persistent source address" + msgstr "You must supply a persistent source address" + +-#: src/ucarp.c:229 ++#: src/ucarp.c:239 + msgid "You must supply a virtual host address" + msgstr "You must supply a virtual host address" + +-#: src/ucarp.c:233 ++#: src/ucarp.c:243 + msgid "Warning: no script called when going up" + msgstr "Warning: no script called when going up" + +-#: src/ucarp.c:236 ++#: src/ucarp.c:246 + msgid "Warning: no script called when going down" + msgstr "Warning: no script called when going down" + +-#: src/ucarp.c:239 ++#: src/ucarp.c:249 + msgid "Dead ratio can't be zero" + msgstr "Dead ratio can't be zero" +diff -Naupr ucarp-1.2/po/en@quot.gmo ucarp-1.3/po/en@quot.gmo +--- ucarp-1.2/po/en@quot.gmo 2006-02-25 17:50:06.000000000 +0100 ++++ ucarp-1.3/po/en@quot.gmo 2006-07-05 00:54:58.000000000 +0200 +@@ -1,13 +1,8 @@ +-6I|R +-  +-m- +- +- +- +- +- +- )! DK    7 ' B c t   $ - / "F &i 2 ' # !1Qp!)' #1U+p'&*/G$gV R&y m0D]u)D :7L' $--R/"&2'-#U!y !')I's#+'&.*U$ ,)(' 6&$ % +-+.*  4-2"1#/3 50!* advertisement injected *--interface= (-i ): bind interface ++:O ++ ++m ++5 G +`     ) D V i w  7 '  ) : U n $ - / " &/2V'#!6Qe!)'#+6'b&*-$=U$u V&A mbt+)D> 7'  5Vg$-/ "9&\2'#!$Dc~!)'#$H+c'&* -#Qj$ 1+* ,8)60-/9$"3 ++5 !4(2'% :&7 #.* advertisement injected *--interface= (-i ): bind interface + --srcip= (-s ): source (real) IP address of that host + --vhid= (-v ): virtual IP identifier (1-255) + --pass= (-p ): password +@@ -23,6 +18,7 @@ + --shutdown (-z): call shutdown script at exit + --daemonize (-B): run in background + --facility= (-f): set syslog facility (default=daemon) ++--xparam= (-x): extra parameter to send to up/down scripts + + Sample usage: + +@@ -37,10 +33,10 @@ ucarp --interface=eth0 --srcip=10.1.1.1 + --upscript=/etc/vip-up.sh --downscript=/etc/vip-down.sh + + +-Please report bugs to Bad IP checksumBad TTL: [%u]Bad digest - md2=[%02x%02x%02x%02x...] md=[%02x%02x%02x%02x...] - Check vhid, password and virtual IP addressBad version: [%u]Dead ratio can't be zeroIgnoring vhid: [%u]Interface [%s] not foundInterface name too longInvalid address: [%s]Invalid media / hardware address for [%s]Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]No interface foundOut of memoryOut of memory to create packetPassword too longPreferred master advertised: going back to BACKUP statePutting MASTER DOWN (going to time out)Putting MASTER down - preemptionSpawning [%s %s]Switching to state: BACKUPSwitching to state: INITSwitching to state: MASTERUnable to compile pcap rule: %s [%s]Unable to detach from the current session: %sUnable to detach: /dev/null can't be duplicatedUnable to find MAC address of [%s]Unable to get hardware info about [%s]Unable to get hardware info about an interface: %sUnable to get in background: [fork: %s]Unable to get interface address: %sUnable to open interface [%s]: %sUnable to open raw device: [%s]Unable to spawn the script: %sUnknown hardware type [%u]Unknown state: [%d]Unknown syslog facility: [%s]Using [%s] as a network interfaceWarning: no script called when going downWarning: no script called when going upYou must supply a network interfaceYou must supply a passwordYou must supply a persistent source addressYou must supply a valid virtual host idYou must supply a virtual host addressYou must supply an advertisement time baseioctl SIOCGLIFCONF errorioctl SIOCGLIFNUM errormaster_down event in INIT stateout of memory to send gratuitous ARPwrite() error #%d/%dwrite() has failedProject-Id-Version: ucarp 1.2 ++Please report bugs to Bad IP checksumBad TTL: [%u]Bad digest - md2=[%02x%02x%02x%02x...] md=[%02x%02x%02x%02x...] - Check vhid, password and virtual IP addressBad version: [%u]Dead ratio can't be zeroError opening socket for interface [%s]: %sIgnoring vhid: [%u]Interface [%s] not foundInterface name too longInvalid address: [%s]Invalid media / hardware address for [%s]Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]No interface foundOut of memoryOut of memory to create packetPassword too longPreferred master advertised: going back to BACKUP statePutting MASTER DOWN (going to time out)Putting MASTER down - preemptionSpawning [%s %s]Switching to state: BACKUPSwitching to state: INITSwitching to state: MASTERUnable to compile pcap rule: %s [%s]Unable to detach from the current session: %sUnable to detach: /dev/null can't be duplicatedUnable to find MAC address of [%s]Unable to get hardware info about [%s]Unable to get hardware info about an interface: %sUnable to get in background: [fork: %s]Unable to get interface address: %sUnable to open interface [%s]: %sUnable to open raw device: [%s]Unable to spawn the script: %sUnknown hardware type [%u]Unknown state: [%d]Unknown syslog facility: [%s]Using [%s] as a network interfaceWarning: no script called when going downWarning: no script called when going upYou must supply a network interfaceYou must supply a passwordYou must supply a persistent source addressYou must supply a valid virtual host idYou must supply a virtual host addressYou must supply an advertisement time basegettimeofday() failed: %sinitializing now to gettimeofday() failed: %sioctl SIOCGLIFCONF errorioctl SIOCGLIFNUM errormaster_down event in INIT stateout of memory to send gratuitous ARPpoll() errorwrite() error #%d/%dwrite() has failedProject-Id-Version: ucarp 1.3 + Report-Msgid-Bugs-To: bugs@ucarp.org +-POT-Creation-Date: 2006-02-25 17:49+0100 +-PO-Revision-Date: 2006-02-25 17:49+0100 ++POT-Creation-Date: 2006-07-05 00:54+0200 ++PO-Revision-Date: 2006-07-05 00:54+0200 + Last-Translator: Automatically generated + Language-Team: none + MIME-Version: 1.0 +@@ -63,6 +59,7 @@ Plural-Forms: nplurals=2; plural=(n != 1 + --shutdown (-z): call shutdown script at exit + --daemonize (-B): run in background + --facility= (-f): set syslog facility (default=daemon) ++--xparam= (-x): extra parameter to send to up/down scripts + + Sample usage: + +@@ -77,4 +74,4 @@ ucarp --interface=eth0 --srcip=10.1.1.1 + --upscript=/etc/vip-up.sh --downscript=/etc/vip-down.sh + + +-Please report bugs to Bad IP checksumBad TTL: [%u]Bad digest - md2=[%02x%02x%02x%02x...] md=[%02x%02x%02x%02x...] - Check vhid, password and virtual IP addressBad version: [%u]Dead ratio can't be zeroIgnoring vhid: [%u]Interface [%s] not foundInterface name too longInvalid address: [%s]Invalid media / hardware address for [%s]Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]No interface foundOut of memoryOut of memory to create packetPassword too longPreferred master advertised: going back to BACKUP statePutting MASTER DOWN (going to time out)Putting MASTER down - preemptionSpawning [%s %s]Switching to state: BACKUPSwitching to state: INITSwitching to state: MASTERUnable to compile pcap rule: %s [%s]Unable to detach from the current session: %sUnable to detach: /dev/null can't be duplicatedUnable to find MAC address of [%s]Unable to get hardware info about [%s]Unable to get hardware info about an interface: %sUnable to get in background: [fork: %s]Unable to get interface address: %sUnable to open interface [%s]: %sUnable to open raw device: [%s]Unable to spawn the script: %sUnknown hardware type [%u]Unknown state: [%d]Unknown syslog facility: [%s]Using [%s] as a network interfaceWarning: no script called when going downWarning: no script called when going upYou must supply a network interfaceYou must supply a passwordYou must supply a persistent source addressYou must supply a valid virtual host idYou must supply a virtual host addressYou must supply an advertisement time baseioctl SIOCGLIFCONF errorioctl SIOCGLIFNUM errormaster_down event in INIT stateout of memory to send gratuitous ARPwrite() error #%d/%dwrite() has failed +\ No newline at end of file ++Please report bugs to Bad IP checksumBad TTL: [%u]Bad digest - md2=[%02x%02x%02x%02x...] md=[%02x%02x%02x%02x...] - Check vhid, password and virtual IP addressBad version: [%u]Dead ratio can't be zeroError opening socket for interface [%s]: %sIgnoring vhid: [%u]Interface [%s] not foundInterface name too longInvalid address: [%s]Invalid media / hardware address for [%s]Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]No interface foundOut of memoryOut of memory to create packetPassword too longPreferred master advertised: going back to BACKUP statePutting MASTER DOWN (going to time out)Putting MASTER down - preemptionSpawning [%s %s]Switching to state: BACKUPSwitching to state: INITSwitching to state: MASTERUnable to compile pcap rule: %s [%s]Unable to detach from the current session: %sUnable to detach: /dev/null can't be duplicatedUnable to find MAC address of [%s]Unable to get hardware info about [%s]Unable to get hardware info about an interface: %sUnable to get in background: [fork: %s]Unable to get interface address: %sUnable to open interface [%s]: %sUnable to open raw device: [%s]Unable to spawn the script: %sUnknown hardware type [%u]Unknown state: [%d]Unknown syslog facility: [%s]Using [%s] as a network interfaceWarning: no script called when going downWarning: no script called when going upYou must supply a network interfaceYou must supply a passwordYou must supply a persistent source addressYou must supply a valid virtual host idYou must supply a virtual host addressYou must supply an advertisement time basegettimeofday() failed: %sinitializing now to gettimeofday() failed: %sioctl SIOCGLIFCONF errorioctl SIOCGLIFNUM errormaster_down event in INIT stateout of memory to send gratuitous ARPpoll() errorwrite() error #%d/%dwrite() has failed +\ No newline at end of file +diff -Naupr ucarp-1.2/po/en@quot.po ucarp-1.3/po/en@quot.po +--- ucarp-1.2/po/en@quot.po 2006-02-25 17:50:01.000000000 +0100 ++++ ucarp-1.3/po/en@quot.po 2006-07-05 00:54:51.000000000 +0200 +@@ -27,10 +27,10 @@ + # + msgid "" + msgstr "" +-"Project-Id-Version: ucarp 1.2\n" ++"Project-Id-Version: ucarp 1.3\n" + "Report-Msgid-Bugs-To: bugs@ucarp.org\n" +-"POT-Creation-Date: 2006-02-25 17:49+0100\n" +-"PO-Revision-Date: 2006-02-25 17:49+0100\n" ++"POT-Creation-Date: 2006-07-05 00:54+0200\n" ++"PO-Revision-Date: 2006-07-05 00:54+0200\n" + "Last-Translator: Automatically generated\n" + "Language-Team: none\n" + "MIME-Version: 1.0\n" +@@ -116,30 +116,53 @@ msgstr "Putting MASTER down - preemption + msgid "Putting MASTER DOWN (going to time out)" + msgstr "Putting MASTER DOWN (going to time out)" + +-#: src/carp.c:655 ++#: src/carp.c:657 + msgid "Password too long" + msgstr "Password too long" + +-#: src/carp.c:668 ++#: src/carp.c:670 + #, c-format + msgid "Unable to find MAC address of [%s]" + msgstr "Unable to find MAC address of [%s]" + +-#: src/carp.c:672 ++#: src/carp.c:674 + #, c-format + msgid "Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]" + msgstr "Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]" + +-#: src/carp.c:679 ++#: src/carp.c:681 + #, c-format + msgid "Unable to open interface [%s]: %s" + msgstr "Unable to open interface [%s]: %s" + +-#: src/carp.c:685 ++#: src/carp.c:687 + #, c-format + msgid "Unable to compile pcap rule: %s [%s]" + msgstr "Unable to compile pcap rule: %s [%s]" + ++#: src/carp.c:703 ++#, c-format ++msgid "initializing now to gettimeofday() failed: %s" ++msgstr "initializing now to gettimeofday() failed: %s" ++ ++#: src/carp.c:709 ++#, c-format ++msgid "Error opening socket for interface [%s]: %s" ++msgstr "Error opening socket for interface [%s]: %s" ++ ++#: src/carp.c:715 src/fillmac.c:51 ++msgid "Interface name too long" ++msgstr "Interface name too long" ++ ++#: src/carp.c:739 ++msgid "poll() error" ++msgstr "poll() error" ++ ++#: src/carp.c:744 ++#, c-format ++msgid "gettimeofday() failed: %s" ++msgstr "gettimeofday() failed: %s" ++ + #: src/daemonize.c:53 + #, c-format + msgid "Unable to get in background: [fork: %s]" +@@ -159,10 +182,6 @@ msgstr "Unable to detach: /dev/null can' + msgid "Unable to open raw device: [%s]" + msgstr "Unable to open raw device: [%s]" + +-#: src/fillmac.c:51 +-msgid "Interface name too long" +-msgstr "Interface name too long" +- + #: src/fillmac.c:57 + #, c-format + msgid "Unable to get hardware info about an interface: %s" +@@ -195,17 +214,17 @@ msgstr "No interface found" + msgid "ioctl SIOCGLIFCONF error" + msgstr "ioctl SIOCGLIFCONF error" + +-#: src/fillmac.c:140 ++#: src/fillmac.c:135 + #, c-format + msgid "Interface [%s] not found" + msgstr "Interface [%s] not found" + +-#: src/fillmac.c:147 ++#: src/fillmac.c:148 + #, c-format + msgid "Unable to get hardware info about [%s]" + msgstr "Unable to get hardware info about [%s]" + +-#: src/garp.c:36 ++#: src/garp.c:39 + msgid "out of memory to send gratuitous ARP" + msgstr "out of memory to send gratuitous ARP" + +@@ -237,6 +256,7 @@ msgid "" + "--shutdown (-z): call shutdown script at exit\n" + "--daemonize (-B): run in background\n" + "--facility= (-f): set syslog facility (default=daemon)\n" ++"--xparam= (-x): extra parameter to send to up/down scripts\n" + "\n" + "Sample usage:\n" + "\n" +@@ -269,6 +289,7 @@ msgstr "" + "--shutdown (-z): call shutdown script at exit\n" + "--daemonize (-B): run in background\n" + "--facility= (-f): set syslog facility (default=daemon)\n" ++"--xparam= (-x): extra parameter to send to up/down scripts\n" + "\n" + "Sample usage:\n" + "\n" +@@ -285,57 +306,57 @@ msgstr "" + "\n" + "Please report bugs to " + +-#: src/ucarp.c:77 ++#: src/ucarp.c:78 + msgid "Out of memory" + msgstr "Out of memory" + +-#: src/ucarp.c:111 src/ucarp.c:137 ++#: src/ucarp.c:112 src/ucarp.c:139 + #, c-format + msgid "Invalid address: [%s]" + msgstr "Invalid address: [%s]" + +-#: src/ucarp.c:190 ++#: src/ucarp.c:193 + #, c-format + msgid "Unknown syslog facility: [%s]" + msgstr "Unknown syslog facility: [%s]" + +-#: src/ucarp.c:207 ++#: src/ucarp.c:217 + msgid "You must supply a network interface" + msgstr "You must supply a network interface" + +-#: src/ucarp.c:210 ++#: src/ucarp.c:220 + #, c-format + msgid "Using [%s] as a network interface" + msgstr "Using [%s] as a network interface" + +-#: src/ucarp.c:213 ++#: src/ucarp.c:223 + msgid "You must supply a valid virtual host id" + msgstr "You must supply a valid virtual host id" + +-#: src/ucarp.c:217 ++#: src/ucarp.c:227 + msgid "You must supply a password" + msgstr "You must supply a password" + +-#: src/ucarp.c:221 ++#: src/ucarp.c:231 + msgid "You must supply an advertisement time base" + msgstr "You must supply an advertisement time base" + +-#: src/ucarp.c:225 ++#: src/ucarp.c:235 + msgid "You must supply a persistent source address" + msgstr "You must supply a persistent source address" + +-#: src/ucarp.c:229 ++#: src/ucarp.c:239 + msgid "You must supply a virtual host address" + msgstr "You must supply a virtual host address" + +-#: src/ucarp.c:233 ++#: src/ucarp.c:243 + msgid "Warning: no script called when going up" + msgstr "Warning: no script called when going up" + +-#: src/ucarp.c:236 ++#: src/ucarp.c:246 + msgid "Warning: no script called when going down" + msgstr "Warning: no script called when going down" + +-#: src/ucarp.c:239 ++#: src/ucarp.c:249 + msgid "Dead ratio can't be zero" + msgstr "Dead ratio can't be zero" +diff -Naupr ucarp-1.2/po/ucarp.pot ucarp-1.3/po/ucarp.pot +--- ucarp-1.2/po/ucarp.pot 2006-02-25 17:49:38.000000000 +0100 ++++ ucarp-1.3/po/ucarp.pot 2006-07-05 00:54:46.000000000 +0200 +@@ -8,7 +8,7 @@ msgid "" + msgstr "" + "Project-Id-Version: PACKAGE VERSION\n" + "Report-Msgid-Bugs-To: bugs@ucarp.org\n" +-"POT-Creation-Date: 2006-02-25 17:49+0100\n" ++"POT-Creation-Date: 2006-07-05 00:54+0200\n" + "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" + "Last-Translator: FULL NAME \n" + "Language-Team: LANGUAGE \n" +@@ -92,30 +92,53 @@ msgstr "" + msgid "Putting MASTER DOWN (going to time out)" + msgstr "" + +-#: src/carp.c:655 ++#: src/carp.c:657 + msgid "Password too long" + msgstr "" + +-#: src/carp.c:668 ++#: src/carp.c:670 + #, c-format + msgid "Unable to find MAC address of [%s]" + msgstr "" + +-#: src/carp.c:672 ++#: src/carp.c:674 + #, c-format + msgid "Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]" + msgstr "" + +-#: src/carp.c:679 ++#: src/carp.c:681 + #, c-format + msgid "Unable to open interface [%s]: %s" + msgstr "" + +-#: src/carp.c:685 ++#: src/carp.c:687 + #, c-format + msgid "Unable to compile pcap rule: %s [%s]" + msgstr "" + ++#: src/carp.c:703 ++#, c-format ++msgid "initializing now to gettimeofday() failed: %s" ++msgstr "" ++ ++#: src/carp.c:709 ++#, c-format ++msgid "Error opening socket for interface [%s]: %s" ++msgstr "" ++ ++#: src/carp.c:715 src/fillmac.c:51 ++msgid "Interface name too long" ++msgstr "" ++ ++#: src/carp.c:739 ++msgid "poll() error" ++msgstr "" ++ ++#: src/carp.c:744 ++#, c-format ++msgid "gettimeofday() failed: %s" ++msgstr "" ++ + #: src/daemonize.c:53 + #, c-format + msgid "Unable to get in background: [fork: %s]" +@@ -135,10 +158,6 @@ msgstr "" + msgid "Unable to open raw device: [%s]" + msgstr "" + +-#: src/fillmac.c:51 +-msgid "Interface name too long" +-msgstr "" +- + #: src/fillmac.c:57 + #, c-format + msgid "Unable to get hardware info about an interface: %s" +@@ -171,17 +190,17 @@ msgstr "" + msgid "ioctl SIOCGLIFCONF error" + msgstr "" + +-#: src/fillmac.c:140 ++#: src/fillmac.c:135 + #, c-format + msgid "Interface [%s] not found" + msgstr "" + +-#: src/fillmac.c:147 ++#: src/fillmac.c:148 + #, c-format + msgid "Unable to get hardware info about [%s]" + msgstr "" + +-#: src/garp.c:36 ++#: src/garp.c:39 + msgid "out of memory to send gratuitous ARP" + msgstr "" + +@@ -213,6 +232,7 @@ msgid "" + "--shutdown (-z): call shutdown script at exit\n" + "--daemonize (-B): run in background\n" + "--facility= (-f): set syslog facility (default=daemon)\n" ++"--xparam= (-x): extra parameter to send to up/down scripts\n" + "\n" + "Sample usage:\n" + "\n" +@@ -230,57 +250,57 @@ msgid "" + "Please report bugs to " + msgstr "" + +-#: src/ucarp.c:77 ++#: src/ucarp.c:78 + msgid "Out of memory" + msgstr "" + +-#: src/ucarp.c:111 src/ucarp.c:137 ++#: src/ucarp.c:112 src/ucarp.c:139 + #, c-format + msgid "Invalid address: [%s]" + msgstr "" + +-#: src/ucarp.c:190 ++#: src/ucarp.c:193 + #, c-format + msgid "Unknown syslog facility: [%s]" + msgstr "" + +-#: src/ucarp.c:207 ++#: src/ucarp.c:217 + msgid "You must supply a network interface" + msgstr "" + +-#: src/ucarp.c:210 ++#: src/ucarp.c:220 + #, c-format + msgid "Using [%s] as a network interface" + msgstr "" + +-#: src/ucarp.c:213 ++#: src/ucarp.c:223 + msgid "You must supply a valid virtual host id" + msgstr "" + +-#: src/ucarp.c:217 ++#: src/ucarp.c:227 + msgid "You must supply a password" + msgstr "" + +-#: src/ucarp.c:221 ++#: src/ucarp.c:231 + msgid "You must supply an advertisement time base" + msgstr "" + +-#: src/ucarp.c:225 ++#: src/ucarp.c:235 + msgid "You must supply a persistent source address" + msgstr "" + +-#: src/ucarp.c:229 ++#: src/ucarp.c:239 + msgid "You must supply a virtual host address" + msgstr "" + +-#: src/ucarp.c:233 ++#: src/ucarp.c:243 + msgid "Warning: no script called when going up" + msgstr "" + +-#: src/ucarp.c:236 ++#: src/ucarp.c:246 + msgid "Warning: no script called when going down" + msgstr "" + +-#: src/ucarp.c:239 ++#: src/ucarp.c:249 + msgid "Dead ratio can't be zero" + msgstr "" +diff -Naupr ucarp-1.2/README ucarp-1.3/README +--- ucarp-1.2/README 2006-02-18 23:31:10.000000000 +0100 ++++ ucarp-1.3/README 2006-05-27 22:37:38.000000000 +0200 +@@ -1,6 +1,6 @@ + + .:. UCARP .:. +- Documentation for version 1.2 ++ Documentation for version 1.3 + + + ------------------------ BLURB ------------------------ +@@ -97,8 +97,15 @@ routes, to add something to log files or + least, you can use a script that will connect to your switches and flush their + ARP cache. Some users reported that transitions were way faster when also + switching MAC addresses. +-The interface name is passed as an argument to the called scripts, so feel +-free to replace "eth0" with "$1" in the previous examples. ++ ++The called scripts are passed arguments, in this order: ++ ++ ++ ++For instance, as the is passed as the first argument to the called scripts, ++feel free to replace "eth0" with "$1" and 10.1.1.252 by "$2" in the previous ++examples. ++ + + Don't forget to make those files executable : + +diff -Naupr ucarp-1.2/src/carp.c ucarp-1.3/src/carp.c +--- ucarp-1.2/src/carp.c 2006-02-19 00:06:17.000000000 +0100 ++++ ucarp-1.3/src/carp.c 2006-06-27 01:00:35.000000000 +0200 +@@ -303,7 +303,7 @@ static void carp_send_ad(struct carp_sof + } + + static void carp_send_ad_all(struct carp_softc *sc) { +- return carp_send_ad(sc); ++ carp_send_ad(sc); + } + + static void carp_setrun(struct carp_softc *sc, sa_family_t af) +@@ -635,10 +635,12 @@ char *build_bpf_rule(void) + + int docarp(void) + { ++ char errbuf[PCAP_ERRBUF_SIZE]; + struct bpf_program bpfp; + struct pollfd pfds[1]; ++ struct ifreq iface; ++ int fd; + int nfds; +- char errbuf[PCAP_ERRBUF_SIZE]; + + sc.sc_vhid = vhid; + sc.sc_advbase = advbase; +@@ -666,7 +668,7 @@ int docarp(void) + + if (fill_mac_address() != 0) { + logfile(LOG_ERR, _("Unable to find MAC address of [%s]"), +- interface); ++ interface == NULL ? "-" : interface); + return -1; + } + logfile(LOG_INFO, _("Local advertised ethernet address is " +@@ -677,13 +679,13 @@ int docarp(void) + if ((dev_desc = pcap_open_live(interface, ETHERNET_MTU, 0, + CAPTURE_TIMEOUT, errbuf)) == NULL) { + logfile(LOG_ERR, _("Unable to open interface [%s]: %s"), +- interface, errbuf); ++ interface == NULL ? "-" : interface, errbuf); + return -1; + } + if (pcap_compile(dev_desc, &bpfp, build_bpf_rule(), + 1, (bpf_u_int32) 0) != 0) { + logfile(LOG_ERR, _("Unable to compile pcap rule: %s [%s]"), +- errbuf, interface); ++ errbuf, interface == NULL ? "-" : interface); + return -1; + } + pcap_setfilter(dev_desc, &bpfp); +@@ -698,22 +700,48 @@ int docarp(void) + } + + if (gettimeofday(&now, NULL) != 0) { +- logfile(LOG_WARNING, "initializing now to gettimeofday() failed: %s", ++ logfile(LOG_WARNING, _("initializing now to gettimeofday() failed: %s"), + strerror(errno)); + } + carp_setrun(&sc, 0); + ++ if ((fd = socket(PF_INET, SOCK_DGRAM, 0)) == -1) { ++ logfile(LOG_ERR, _("Error opening socket for interface [%s]: %s"), ++ interface == NULL ? "-" : interface, strerror(errno)); ++ return -1; ++ } ++#ifdef SIOCGIFFLAGS ++ if (strlen(interface) >= sizeof iface.ifr_name) { ++ logfile(LOG_ERR, _("Interface name too long")); ++ return -1; ++ } ++ strncpy(iface.ifr_name, interface, sizeof iface.ifr_name); ++#endif + for (;;) { ++#ifdef SIOCGIFFLAGS ++ if (ioctl(fd, SIOCGIFFLAGS, &iface) != 0) { ++ break; ++ } ++ if ((iface.ifr_flags & IFF_RUNNING) == 0) { ++ carp_set_state(&sc, BACKUP); ++ sc.sc_ad_tmo.tv_sec = 0; ++ sc.sc_ad_tmo.tv_usec = 0; ++ sc.sc_md_tmo.tv_sec = 0; ++ sc.sc_md6_tmo.tv_usec = 0; ++ sleep(SECONDS_TO_WAIT_AFTER_INTERFACE_IS_DOWN); ++ continue; ++ } ++#endif + nfds = poll(pfds, (nfds_t) 1, sc.sc_advbase * 1000); + if (nfds == -1 || + (pfds[0].revents & (POLLERR | POLLHUP | POLLNVAL)) != 0) { + #ifdef DEBUG +- logfile(LOG_NOTICE, "poll() error"); ++ logfile(LOG_NOTICE, _("poll() error")); + #endif + break; + } + if (gettimeofday(&now, NULL) != 0) { +- logfile(LOG_WARNING, "gettimeofday() failed: %s", ++ logfile(LOG_WARNING, _("gettimeofday() failed: %s"), + strerror(errno)); + continue; + } +diff -Naupr ucarp-1.2/src/fillmac.c ucarp-1.3/src/fillmac.c +--- ucarp-1.2/src/fillmac.c 2004-08-28 17:15:36.000000000 +0200 ++++ ucarp-1.3/src/fillmac.c 2006-07-05 00:53:16.000000000 +0200 +@@ -51,7 +51,7 @@ int fill_mac_address(void) + logfile(LOG_ERR, _("Interface name too long")); + return -1; + } +- strcpy(ifr.ifr_name, interface); ++ strncpy(ifr.ifr_name, interface, sizeof ifr.ifr_name); + if (ioctl(s, SIOCGIFHWADDR, &ifr) != 0) { + logfile(LOG_ERR, + _("Unable to get hardware info about an interface: %s"), +@@ -130,17 +130,18 @@ int fill_mac_address(void) + return -1; + } + lifr = lifc.lifc_req; +- while (--lifn.lifn_count > 0) { ++ for(;;) { ++ if (lifn.lifn_count <= 0) { ++ logfile(LOG_ERR, _("Interface [%s] not found"), interface); ++ ALLOCA_FREE(lifrspace); ++ return -1; ++ } ++ lifn.lifn_count--; + if (strcmp(lifr->lifr_name, interface) == 0) { + break; + } + lifr++; + } +- if (lifn.lifn_count <= 0) { +- logfile(LOG_ERR, _("Interface [%s] not found"), interface); +- ALLOCA_FREE(lifrspace); +- return -1; +- } + memcpy(&arpreq.arp_pa, &lifr->lifr_addr, sizeof arpreq.arp_pa); + ALLOCA_FREE(lifrspace); + if (ioctl(s, SIOCGARP, &arpreq) != 0) { +diff -Naupr ucarp-1.2/src/garp.c ucarp-1.3/src/garp.c +--- ucarp-1.2/src/garp.c 2004-08-28 17:15:30.000000000 +0200 ++++ ucarp-1.3/src/garp.c 2006-05-27 22:14:21.000000000 +0200 +@@ -10,27 +10,30 @@ + int gratuitous_arp(const int dev_desc_fd, const int enable_virtual) + { + static unsigned char arp[28] = { +- 0x00, 0x01, +- 0x08, 0x00, +- 0x06, 0x04, +- 0x00, 0x02, +- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +- 0x00, 0x00, 0x00, 0x00, +- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +- 0xff, 0xff, 0xff, 0xff ++ 0x00, 0x01, /* MAC address type */ ++ 0x08, 0x00, /* Protocol address type */ ++ 0x06, 0x04, /* MAC address size, protocol address size */ ++ 0x00, 0x02, /* OP (1=request, 2=reply) */ ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Sender MAC */ ++ 0x00, 0x00, 0x00, 0x00, /* Sender IP */ ++ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* Target MAC */ ++ 0xff, 0xff, 0xff, 0xff /* Target IP */ + }; + unsigned char *pkt; + struct ether_header *eh_ptr; + +- memcpy(&arp[8], hwaddr, sizeof hwaddr); +- if (enable_virtual == 0) { +- arp[7] = 0x01; +- memcpy(&arp[24], &vaddr.s_addr, (size_t) 4U); +- memset(&arp[14], 0xff, ETHER_ADDR_LEN); +- } else { ++ if (ETHER_ADDR_LEN > 6) { ++ abort(); ++ } ++ memcpy(&arp[8], hwaddr, sizeof hwaddr); ++ if (enable_virtual != 0) { + arp[7] = 0x02; + memcpy(&arp[14], &vaddr.s_addr, (size_t) 4U); +- memset(&arp[24], 0xff, ETHER_ADDR_LEN); ++ } else { ++ arp[7] = 0x01; ++ memcpy(&arp[14], &vaddr.s_addr, (size_t) 4U); ++ memset(&arp[18], 0xff, ETHER_ADDR_LEN); ++ memcpy(&arp[24], &vaddr.s_addr, (size_t) 4U); + } + if ((pkt = ALLOCA(sizeof *eh_ptr + sizeof arp)) == NULL) { + logfile(LOG_ERR, _("out of memory to send gratuitous ARP")); +diff -Naupr ucarp-1.2/src/gettext.h ucarp-1.3/src/gettext.h +--- ucarp-1.2/src/gettext.h 2004-06-20 14:48:32.000000000 +0200 ++++ ucarp-1.3/src/gettext.h 2006-04-08 12:10:54.000000000 +0200 +@@ -1,5 +1,5 @@ + /* Convenience header for conditional use of GNU . +- Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc. ++ Copyright (C) 1995-1998, 2000-2002, 2004 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published +@@ -13,7 +13,7 @@ + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the Free Software +- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. */ + + #ifndef _LIBGETTEXT_H +@@ -37,6 +37,16 @@ + # include + #endif + ++/* Many header files from the libstdc++ coming with g++ 3.3 or newer include ++ , which chokes if dcgettext is defined as a macro. So include ++ it now, to make later inclusions of a NOP. */ ++#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) ++# include ++# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H ++# include ++# endif ++#endif ++ + /* Disabled NLS. + The casts to 'const char *' serve the purpose of producing warnings + for invalid uses of the value returned from these functions. +diff -Naupr ucarp-1.2/src/globals.h ucarp-1.3/src/globals.h +--- ucarp-1.2/src/globals.h 2006-02-18 23:36:15.000000000 +0100 ++++ ucarp-1.3/src/globals.h 2006-05-27 22:26:35.000000000 +0200 +@@ -27,4 +27,6 @@ GLOBAL0(signed char no_syslog); + GLOBAL0(signed char daemonize); + GLOBAL(int syslog_facility, DEFAULT_FACILITY); + ++GLOBAL0(char *vaddr_arg); ++GLOBAL0(char *xparam); + #endif +diff -Naupr ucarp-1.2/src/spawn.c ucarp-1.3/src/spawn.c +--- ucarp-1.2/src/spawn.c 2004-08-28 17:15:26.000000000 +0200 ++++ ucarp-1.3/src/spawn.c 2006-05-27 22:27:05.000000000 +0200 +@@ -20,7 +20,7 @@ int spawn_handler(const int dev_desc_fd, + pid = fork(); + if (pid == (pid_t) 0) { + (void) close(dev_desc_fd); +- execl(script, script, interface, (char *) NULL); ++ execl(script, script, interface, vaddr_arg, xparam, (char *) NULL); + _exit(EXIT_FAILURE); + } else if (pid != (pid_t) -1) { + logfile(LOG_WARNING, _("Spawning [%s %s]"), script, interface); +diff -Naupr ucarp-1.2/src/ucarp.c ucarp-1.3/src/ucarp.c +--- ucarp-1.2/src/ucarp.c 2006-02-21 00:06:08.000000000 +0100 ++++ ucarp-1.3/src/ucarp.c 2006-05-27 22:29:54.000000000 +0200 +@@ -39,6 +39,7 @@ static void usage(void) + "--shutdown (-z): call shutdown script at exit\n" + "--daemonize (-B): run in background\n" + "--facility= (-f): set syslog facility (default=daemon)\n" ++ "--xparam= (-x): extra parameter to send to up/down scripts\n" + "\n" + "Sample usage:\n" + "\n" +@@ -133,11 +134,13 @@ int main(int argc, char *argv[]) + break; + } + case 'a': { ++ free(vaddr_arg); + if (inet_pton(AF_INET, optarg, &vaddr) == 0) { + logfile(LOG_ERR, _("Invalid address: [%s]"), optarg); + return 1; +- } +- break; ++ } ++ vaddr_arg = strdup(optarg); ++ break; + } + case 'b': { + advbase = (unsigned char) strtoul(optarg, NULL, 0); +@@ -190,7 +193,14 @@ int main(int argc, char *argv[]) + logfile(LOG_ERR, _("Unknown syslog facility: [%s]"), optarg); + } + break; +- } ++ } ++ case 'm': { ++ free(xparam); ++ if ((xparam = strdup(optarg)) == NULL) { ++ die_mem(); ++ } ++ break; ++ } + default: { + usage(); + } +diff -Naupr ucarp-1.2/src/ucarp.h ucarp-1.3/src/ucarp.h +--- ucarp-1.2/src/ucarp.h 2004-08-28 18:10:28.000000000 +0200 ++++ ucarp-1.3/src/ucarp.h 2006-06-04 15:49:09.000000000 +0200 +@@ -210,6 +210,7 @@ struct carp_softc { + #define CARP_AUTHLEN 7 + #define DEFAULT_ADVBASE 1U + #define DEFAULT_DEAD_RATIO 3U ++#define SECONDS_TO_WAIT_AFTER_INTERFACE_IS_DOWN 10U + + #define DEFAULT_FACILITY LOG_DAEMON + +diff -Naupr ucarp-1.2/src/ucarp_p.h ucarp-1.3/src/ucarp_p.h +--- ucarp-1.2/src/ucarp_p.h 2006-02-18 23:36:33.000000000 +0100 ++++ ucarp-1.3/src/ucarp_p.h 2006-05-27 22:30:32.000000000 +0200 +@@ -1,7 +1,7 @@ + #ifndef __CARP_P_H__ + #define __CARP_P_H__ 1 + +-static const char *GETOPT_OPTIONS = "i:s:v:p:Pa:hb:k:u:d:r:zf:B"; ++static const char *GETOPT_OPTIONS = "i:s:v:p:Pa:hb:k:m:nu:d:r:zf:B"; + + static struct option long_options[] = { + { "interface", 1, NULL, 'i' }, +@@ -20,6 +20,7 @@ static struct option long_options[] = { + { "shutdown", 0, NULL, 'z' }, + { "facility", 1, NULL, 'f' }, + { "daemonize", 0, NULL, 'B' }, ++ { "xparam", 1, NULL, 'm' }, + { NULL, 0, NULL, 0 } + }; + diff --git a/ucarp.spec b/ucarp.spec index ac4454a..343812f 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,19 +1,20 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.2 -Release: 2%{?dist} +Release: 3%{?dist} License: BSD Group: System Environment/Daemons URL: http://www.ucarp.org/ Source0: http://download.pureftpd.org/pub/ucarp/ucarp-%{version}.tar.bz2 Source1: carp.init Source2: vip-001.conf.example -Patch0: ucarp-1.2-arp.patch +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 # Use libpcap up to FC5, and libpcap-devel for FC6+ and non-Fedora %if %{!?fedora:6}%{?fedora} >= 6 BuildRequires: libpcap-devel @@ -34,7 +35,7 @@ need for any dedicated extra network link between redundant hosts. %prep %setup -%patch -p1 -b .arp +%patch -p1 %build @@ -105,6 +106,14 @@ fi %changelog +* Tue Aug 22 2006 Matthias Saou 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 1.2-3 +- Fix init script for recent find versions (#200395). + * Thu Jun 22 2006 Matthias Saou 1.2-2 - Include ARP patch backported from 1.3 snapshot (#196095). - Make libpcap build requirement conditional to be able to share spec file. From bf3e84a2d2824344a717861c98665d01b3f07e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 27 Aug 2006 21:12:54 +0000 Subject: [PATCH 12/72] http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild --- needs.rebuild | 1 + 1 file changed, 1 insertion(+) create mode 100644 needs.rebuild diff --git a/needs.rebuild b/needs.rebuild new file mode 100644 index 0000000..815fd29 --- /dev/null +++ b/needs.rebuild @@ -0,0 +1 @@ +http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild From 3755c9fa63d6692808918dd03851b4add5a024fe Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Mon, 28 Aug 2006 16:40:12 +0000 Subject: [PATCH 13/72] FC6 rebuilds. --- needs.rebuild | 1 - ucarp.spec | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) delete mode 100644 needs.rebuild diff --git a/needs.rebuild b/needs.rebuild deleted file mode 100644 index 815fd29..0000000 --- a/needs.rebuild +++ /dev/null @@ -1 +0,0 @@ -http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild diff --git a/ucarp.spec b/ucarp.spec index 343812f..e8a55bc 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,7 +1,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.2 -Release: 3%{?dist} +Release: 4%{?dist} License: BSD Group: System Environment/Daemons URL: http://www.ucarp.org/ @@ -106,6 +106,9 @@ fi %changelog +* Mon Aug 28 2006 Matthias Saou 1.2-4 +- FC6 rebuild. + * Tue Aug 22 2006 Matthias Saou 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. From c55700618012a5d8599050bcebf95ba6375bd2ba Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Wed, 29 Nov 2006 12:00:11 +0000 Subject: [PATCH 14/72] Improvements from Denis Ovsienko (#200395) and rebuild against new libpcap. --- carp.init | 152 ++++++++++++++++++++++--------------------- ucarp.spec | 54 +++++++-------- vip-001.conf.example | 45 ++++++++++--- vip-001.list.example | 10 +++ vip-down | 26 ++++++++ vip-helper.sh | 28 ++++++++ vip-up | 26 ++++++++ 7 files changed, 233 insertions(+), 108 deletions(-) create mode 100644 vip-001.list.example create mode 100755 vip-down create mode 100755 vip-helper.sh create mode 100755 vip-up diff --git a/carp.init b/carp.init index 52e51cc..dfd5a99 100755 --- a/carp.init +++ b/carp.init @@ -1,9 +1,8 @@ #!/bin/bash -# $Id: carp.init,v 1.3 2006/08/22 13:08:17 thias Exp $ +# $Id: carp.init,v 1.4 2006/11/29 12:00:11 thias Exp $ # # chkconfig: - 91 09 -# description: Starts and stops ucarp. \ -# used to provide common address redundancy. +# description: Starts and stops the common address redundancy protocol daemon # Source function library. . /etc/init.d/functions @@ -15,129 +14,136 @@ [ ${NETWORKING} = "no" ] && exit 0 get_files() { - FILES=`find /etc/sysconfig/carp -maxdepth 1 -type f -name 'vip-*.conf' \ - -printf "%f\n" | LC_COLLATE="C" sort` + 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" -RETVAL=0 +OUR_INITLOG_ARGS="-n carp -e 2 -s" +OUR_INITLOG="initlog ${OUR_INITLOG_ARGS}" +CONFDIR=/etc/sysconfig/carp +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 /etc/sysconfig/carp/" + 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 - initlog $INITLOG_ARGS -n carp -s "configuration file name ${FILE} gave us a bad ID of ${ID}:" -e 2 - RETVAL=1 - break + ${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 - . /etc/sysconfig/carp/${FILE} + . $CONFDIR/${FILE} + TMP_RETVAL=0 - # Check that we have the ifcfg- 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 + if [ -z "${PASSWORD}" ]; then + ${OUR_INITLOG} $"no PASSWORD found in ${FILE}, skipped VIP ID ${ID}:" + TMP_RETVAL=1 fi - # Check that the ifcfg- 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 + ${OUR_INITLOG} $"no BIND_ADDRESS found in ${FILE}, skipped VIP ID ${ID}:" + TMP_RETVAL=1 fi - - # Check that we have the ifcfg- 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- 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 + ${OUR_INITLOG} $"no VIP_ADDRESS found in ${FILE}, skipped VIP ID ${ID}:" + TMP_RETVAL=1 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 + # 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 - [ "${RETVAL}" -ne 0 ] && failure $"error in one or more of the carp configurations, see above:" + + # failure/success or warning if launch worked with some vip errors + if [ ${RETVAL} -eq 0 -a ${VIP_RETVAL} -eq 0 ]; then + success $"all carp configurations were applied successfully:" + touch /var/lock/subsys/carp + elif [ ${RETVAL} -eq 0 -a ${VIP_RETVAL} -eq 1 ]; then + warning $"error in one or more of the carp configurations:" + else + failure $"error running one or more of the ucarp daemon instances:" + fi fi echo - [ "$RETVAL" -eq 0 ] && touch /var/lock/subsys/carp } stop() { - echo -n $"Shutting down $prog: " - killproc /usr/sbin/ucarp + echo -n $"Stopping $prog: " + killproc /usr/sbin/ucarp >/dev/null RETVAL=$? - # We put all interfaces managed by ucarp down when stopping the service - # to avoid conflicting "leftovers" + # 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 - . /etc/sysconfig/carp/${FILE} - - # Check that we have the ifcfg- 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 + . $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/carp + fi echo - [ "$RETVAL" -eq 0 ] && rm -f /var/lock/subsys/carp } # See how we were called. case "$1" in start) - start - ;; + start + ;; stop) - stop - ;; - restart|reload) - stop - start - ;; + stop + ;; + restart) + stop + start + ;; condrestart) - if [ -f /var/lock/subsys/carp ]; then - stop - start - fi - ;; + if [ -f /var/lock/subsys/carp ]; then + stop + start + fi + ;; status) - status /usr/sbin/ucarp - ;; + status /usr/sbin/ucarp + ;; *) - echo $"Usage: $0 {start|stop|restart|condrestart|status}" - exit 1 + echo $"Usage: $0 {start|stop|restart|condrestart|status}" + exit 1 esac exit $RETVAL + diff --git a/ucarp.spec b/ucarp.spec index e8a55bc..6b71c08 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,13 +1,17 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.2 -Release: 4%{?dist} +Release: 6%{?dist} License: BSD Group: System Environment/Daemons URL: http://www.ucarp.org/ Source0: http://download.pureftpd.org/pub/ucarp/ucarp-%{version}.tar.bz2 Source1: carp.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 @@ -45,32 +49,22 @@ need for any dedicated extra network link between redundant hosts. %install %{__rm} -rf %{buildroot} -%makeinstall +%{__make} install DESTDIR=%{buildroot} %find_lang %{name} # Install the init script -%{__install} -D -m 0755 %{SOURCE1} \ +%{__install} -D -p -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 +%{__mkdir_p} %{buildroot}/etc/sysconfig/carp -# 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 +# Install the example config files +%{__install} -D -p -m 0600 %{SOURCE2} %{SOURCE3} \ + %{buildroot}/etc/sysconfig/carp/ + +# Install helper scripts +%{__install} -D -p -m 0700 %{SOURCE4} %{SOURCE5} %{SOURCE6} \ + %{buildroot}/etc/sysconfig/carp/ %clean @@ -84,28 +78,36 @@ fi %preun if [ $1 -eq 0 ]; then - /sbin/service carp stop >/dev/null 2>&1 || : + /sbin/service carp stop &>/dev/null || : /sbin/chkconfig --del carp fi %postun if [ $1 -ge 1 ]; then - /sbin/service carp condrestart >/dev/null 2>&1 || : + /sbin/service carp condrestart &>/dev/null || : fi %files -f %{name}.lang %defattr(-, root, root, 0755) -%doc AUTHORS COPYING ChangeLog NEWS README examples/linux/*.sh +%doc AUTHORS COPYING ChangeLog NEWS README /etc/rc.d/init.d/carp %dir /etc/sysconfig/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 +/etc/sysconfig/carp/vip-001.list.example +/etc/sysconfig/carp/vip-up +/etc/sysconfig/carp/vip-down +/etc/sysconfig/carp/vip-helper.sh %{_sbindir}/ucarp %changelog +* Wed Nov 29 2006 Matthias Saou 1.2-6 +- Rebuild against new libpcap. + +* Mon Nov 13 2006 Matthias Saou 1.2-5 +- Include all improvements from Denis Ovsienko (#200395). + * Mon Aug 28 2006 Matthias Saou 1.2-4 - FC6 rebuild. diff --git a/vip-001.conf.example b/vip-001.conf.example index de845b1..cbfbf83 100644 --- a/vip-001.conf.example +++ b/vip-001.conf.example @@ -1,20 +1,47 @@ # 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.2 2006/06/22 10:05:17 thias Exp $ +# $Id: vip-001.conf.example,v 1.3 2006/11/29 12:00:11 thias Exp $ -# Set the same password on all mamchines sharing the same virtual IP +# Set the same password on all machines sharing the same virtual router ID. PASSWORD="love" -# You are required to have an IPADDR= line in the configuration file for -# this interface (so no DHCP allowed) +# 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" -# 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" +# 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 " the higher priority and "-P" to become master ASAP) -OPTIONS="-k 128 -P" +# 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= (-b ): advertisement frequency +# --advskew= (-k ): advertisement skew (0-255) +# The rest of options list is built up by the UCARP initscript. +OPTIONS="-k 128 -P" diff --git a/vip-001.list.example b/vip-001.list.example new file mode 100644 index 0000000..8ec4da9 --- /dev/null +++ b/vip-001.list.example @@ -0,0 +1,10 @@ +# Comments are filtered out atomatically... +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 diff --git a/vip-down b/vip-down new file mode 100755 index 0000000..73ca955 --- /dev/null +++ b/vip-down @@ -0,0 +1,26 @@ +#!/bin/sh + +usage() +{ + echo "This script is intended to be run by UCARP daemon." + echo "Usage: $0 " + echo "Usage: $0 <255.255.255.255> " + 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 + diff --git a/vip-helper.sh b/vip-helper.sh new file mode 100755 index 0000000..8fade42 --- /dev/null +++ b/vip-helper.sh @@ -0,0 +1,28 @@ +#!/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 1..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 + diff --git a/vip-up b/vip-up new file mode 100755 index 0000000..2118bde --- /dev/null +++ b/vip-up @@ -0,0 +1,26 @@ +#!/bin/sh + +usage() +{ + echo "This script is intended to be run by UCARP daemon." + echo "Usage: $0 " + echo "Usage: $0 <255.255.255.255> " + 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 + From c8c7770c2fd349517677c7695f0d841d41de0f2e Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Mon, 5 Feb 2007 13:06:40 +0000 Subject: [PATCH 15/72] Move all configuration to /etc/ucarp and other minor changes. --- carp.init => ucarp.init | 70 ++++++++++++++++++++--------------------- ucarp.spec | 58 ++++++++++++++++++---------------- vip-001.list.example | 3 +- vip-down | 30 +++++++++--------- vip-helper.sh | 14 ++++----- vip-up | 30 +++++++++--------- 6 files changed, 105 insertions(+), 100 deletions(-) rename carp.init => ucarp.init (78%) diff --git a/carp.init b/ucarp.init similarity index 78% rename from carp.init rename to ucarp.init index dfd5a99..2512226 100755 --- a/carp.init +++ b/ucarp.init @@ -1,5 +1,5 @@ #!/bin/bash -# $Id: carp.init,v 1.4 2006/11/29 12:00:11 thias Exp $ +# $Id$ # # chkconfig: - 91 09 # description: Starts and stops the common address redundancy protocol daemon @@ -14,16 +14,16 @@ [ ${NETWORKING} = "no" ] && exit 0 get_files() { - FILES=`find $CONFDIR -maxdepth 1 -type f -name 'vip-*.conf' \ + 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 carp -e 2 -s" +OUR_INITLOG_ARGS="-n ucarp -e 2 -s" OUR_INITLOG="initlog ${OUR_INITLOG_ARGS}" -CONFDIR=/etc/sysconfig/carp -UPSCRIPT=$CONFDIR/vip-up -DOWNSCRIPT=$CONFDIR/vip-down +CONFDIR=/etc/ucarp +UPSCRIPT=${CONFDIR}/vip-up +DOWNSCRIPT=${CONFDIR}/vip-down start() { RETVAL=-1 @@ -34,7 +34,7 @@ start() { get_files if [ -z "${FILES}" ]; then - failure $"no virtual addresses are configured in $CONFDIR:" + failure $"no virtual addresses are configured in ${CONFDIR}:" RETVAL=1 else for FILE in ${FILES}; do @@ -47,7 +47,7 @@ start() { unset PASSWORD BIND_INTERFACE BIND_ADDRESS VIP OPTIONS # Source ucarp settings - . $CONFDIR/${FILE} + . ${CONFDIR}/${FILE} TMP_RETVAL=0 if [ -z "${PASSWORD}" ]; then @@ -77,10 +77,10 @@ start() { # failure/success or warning if launch worked with some vip errors if [ ${RETVAL} -eq 0 -a ${VIP_RETVAL} -eq 0 ]; then - success $"all carp configurations were applied successfully:" - touch /var/lock/subsys/carp + 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 carp configurations:" + warning $"error in one or more of the ucarp configurations:" else failure $"error running one or more of the ucarp daemon instances:" fi @@ -103,7 +103,7 @@ stop() { ID=`echo ${FILE}| sed 's/^vip-\(.*\).conf/\1/'` unset PASSWORD BIND_INTERFACE BIND_ADDRESS VIP OPTIONS # Source ucarp settings - . $CONFDIR/${FILE} + . ${CONFDIR}/${FILE} $DOWNSCRIPT $BIND_INTERFACE $VIP_ADDRESS ${ID} &>/dev/null #TMP_RETVAL=$? #[ ${TMP_RETVAL} -ne 0 ] && VIP_RETVAL=1 @@ -114,35 +114,35 @@ stop() { failure $"it seems like no ucarp daemon were running:" else success $"all ucarp daemons stopped and IP addresses unassigned:" - rm -f /var/lock/subsys/carp + 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/carp ]; then - stop - start - fi - ;; - status) - status /usr/sbin/ucarp - ;; - *) - echo $"Usage: $0 {start|stop|restart|condrestart|status}" - exit 1 + 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 diff --git a/ucarp.spec b/ucarp.spec index 6b71c08..22a38c1 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,12 +1,12 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.2 -Release: 6%{?dist} +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: carp.init +Source1: ucarp.init Source2: vip-001.conf.example Source3: vip-001.list.example Source4: vip-up @@ -19,13 +19,7 @@ Requires(preun): /sbin/chkconfig, /sbin/service Requires(postun): /sbin/service BuildRequires: gettext BuildRequires: autoconf, automake, libtool -# Use libpcap up to FC5, and libpcap-devel for FC6+ and non-Fedora -%if %{!?fedora:6}%{?fedora} >= 6 BuildRequires: libpcap-devel -%else -BuildRequires: libpcap -%endif - %description UCARP allows a couple of hosts to share common virtual IP addresses in order @@ -54,54 +48,64 @@ need for any dedicated extra network link between redundant hosts. # Install the init script %{__install} -D -p -m 0755 %{SOURCE1} \ - %{buildroot}/etc/rc.d/init.d/carp + %{buildroot}/etc/rc.d/init.d/ucarp -%{__mkdir_p} %{buildroot}/etc/sysconfig/carp +%{__mkdir_p} %{buildroot}/etc/ucarp # Install the example config files %{__install} -D -p -m 0600 %{SOURCE2} %{SOURCE3} \ - %{buildroot}/etc/sysconfig/carp/ + %{buildroot}/etc/ucarp/ # Install helper scripts %{__install} -D -p -m 0700 %{SOURCE4} %{SOURCE5} %{SOURCE6} \ - %{buildroot}/etc/sysconfig/carp/ + %{buildroot}/etc/ucarp/ %clean %{__rm} -rf %{buildroot} -%post -if [ $1 -eq 1 ]; then - /sbin/chkconfig --add carp -fi - -%preun -if [ $1 -eq 0 ]; then +%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 carp condrestart &>/dev/null || : + /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/carp -%dir /etc/sysconfig/carp/ -/etc/sysconfig/carp/vip-001.conf.example -/etc/sysconfig/carp/vip-001.list.example -/etc/sysconfig/carp/vip-up -/etc/sysconfig/carp/vip-down -/etc/sysconfig/carp/vip-helper.sh +/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 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 1.2-6 - Rebuild against new libpcap. diff --git a/vip-001.list.example b/vip-001.list.example index 8ec4da9..ac5a5ad 100644 --- a/vip-001.list.example +++ b/vip-001.list.example @@ -1,4 +1,4 @@ -# Comments are filtered out atomatically... +# Comments are filtered out automatically... 10.0.0.254/24 dev eth0 # ... and empty lines too. @@ -8,3 +8,4 @@ 172.16.2.32/24 dev eth2 172.16.3.67/24 dev eth2 172.16.4.88/24 dev eth2 + diff --git a/vip-down b/vip-down index 73ca955..bbe78c0 100755 --- a/vip-down +++ b/vip-down @@ -2,25 +2,25 @@ usage() { - echo "This script is intended to be run by UCARP daemon." - echo "Usage: $0 " - echo "Usage: $0 <255.255.255.255> " - exit 1 + echo "This script is intended to be run by the UCARP daemon." + echo "Usage: $0 " + echo "Usage: $0 <255.255.255.255> " + 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 - ;; + 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 diff --git a/vip-helper.sh b/vip-helper.sh index 8fade42..46c9d47 100755 --- a/vip-helper.sh +++ b/vip-helper.sh @@ -2,8 +2,8 @@ usage() { - echo "This script is intended to be invoked by vip-up.sh or vip-down.sh" - exit 1 + echo "This script is intended to be invoked by vip-up.sh or vip-down.sh" + exit 1 } [ $# -eq 2 ] || usage @@ -13,16 +13,16 @@ OP=$2 MYDIR=`dirname $0` if [ "$VRID" -lt "1" -o "$VRID" -gt 255 ]; then - echo "VRID must be in 1..255 range" - exit 2 + 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 + 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 + | xargs --max-lines=1 ip address $OP &>/dev/null diff --git a/vip-up b/vip-up index 2118bde..b00106f 100755 --- a/vip-up +++ b/vip-up @@ -2,25 +2,25 @@ usage() { - echo "This script is intended to be run by UCARP daemon." - echo "Usage: $0 " - echo "Usage: $0 <255.255.255.255> " - exit 1 + echo "This script is intended to be run by the UCARP daemon." + echo "Usage: $0 " + echo "Usage: $0 <255.255.255.255> " + 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 - ;; + 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 From 66ced5055066ddfde1aa86ff5e11515b44e85e72 Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Sun, 5 Aug 2007 19:59:35 +0000 Subject: [PATCH 16/72] Update License field. --- ucarp.spec | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ucarp.spec b/ucarp.spec index 22a38c1..77e0d4f 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,8 +1,9 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.2 -Release: 7%{?dist} -License: BSD +Release: 8%{?dist} +# See the COPYING file which details everything +License: MIT and BSD Group: System Environment/Daemons URL: http://www.ucarp.org/ Source0: http://download.pureftpd.org/pub/ucarp/ucarp-%{version}.tar.bz2 @@ -32,7 +33,7 @@ need for any dedicated extra network link between redundant hosts. %prep -%setup +%setup -q %patch -p1 @@ -88,10 +89,10 @@ fi %files -f %{name}.lang -%defattr(-, root, root, 0755) +%defattr(-,root,root,-) %doc AUTHORS COPYING ChangeLog NEWS README /etc/rc.d/init.d/ucarp -%attr(0700, root, root) %dir /etc/ucarp/ +%attr(0700,root,root) %dir /etc/ucarp/ /etc/ucarp/vip-001.conf.example /etc/ucarp/vip-001.list.example /etc/ucarp/vip-up @@ -101,6 +102,9 @@ fi %changelog +* Sun Aug 5 2007 Matthias Saou 1.2-8 +- Update License field. + * Fri Feb 2 2007 Matthias Saou 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 From 4bc0622a55298bcf4185bbada15319990daa3014 Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Thu, 23 Aug 2007 08:06:06 +0000 Subject: [PATCH 17/72] Rebuild for new BuildID feature. --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 77e0d4f..606eb21 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,7 +1,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.2 -Release: 8%{?dist} +Release: 9%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -102,6 +102,9 @@ fi %changelog +* Thu Aug 23 2007 Matthias Saou 1.2-9 +- Rebuild for new BuildID feature. + * Sun Aug 5 2007 Matthias Saou 1.2-8 - Update License field. From 7d08fca89ed85ff47190633e1ae674decd3df307 Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Sun, 3 Feb 2008 19:51:44 +0000 Subject: [PATCH 18/72] Update to 1.4 and major changes in the configuration (#427495). --- .cvsignore | 2 +- sources | 2 +- ucarp-1.3-pre.patch | 1656 ------------------------------------------ ucarp.init | 61 +- ucarp.spec | 27 +- vip-001.conf.example | 45 +- vip-001.list.example | 11 - vip-down | 25 +- vip-helper.sh | 28 - vip-up | 25 +- 10 files changed, 54 insertions(+), 1828 deletions(-) delete mode 100644 ucarp-1.3-pre.patch delete mode 100644 vip-001.list.example delete mode 100755 vip-helper.sh diff --git a/.cvsignore b/.cvsignore index 7664a05..778206f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -ucarp-1.2.tar.bz2 +ucarp-1.4.tar.bz2 diff --git a/sources b/sources index f77f191..377eabe 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bed7ae84520f2e0faf3e68e9cfe4e1aa ucarp-1.2.tar.bz2 +9e1765de2eea1bb59c9ad9c8596f4f89 ucarp-1.4.tar.bz2 diff --git a/ucarp-1.3-pre.patch b/ucarp-1.3-pre.patch deleted file mode 100644 index c379af6..0000000 --- a/ucarp-1.3-pre.patch +++ /dev/null @@ -1,1656 +0,0 @@ -diff -Naupr ucarp-1.2/ChangeLog ucarp-1.3/ChangeLog ---- ucarp-1.2/ChangeLog 2006-02-25 17:32:53.000000000 +0100 -+++ ucarp-1.3/ChangeLog 2006-07-05 00:59:22.000000000 +0200 -@@ -1,3 +1,14 @@ -+* Version 1.3: -+ -n option wasn't properly parsed while --neutral was. Reported by Stefan -+Behte. -+ gratuitous ARP packets should now be properly sent. Thanks to Marcus -+Rueckert for indirectly pointing out that the code was wrong. -+ New -m option, and the virtual IP address is now passed to up/down scripts -+as well. By Fabrice Dulaunoy and Dirk Jagdmann who provided different -+implementations of the same idea. -+ A bogus return statement has been removed, thanks to Alessio Cervellin. -+ All interfaces should now be discovered on Solaris. -+ - * Version 1.2: - fakesnprintf/bsd-getopt_long updates from pure-ftpd 1.0.21. - Avoid processing our own multicasts. Thanks to Gregory McGarry. -diff -Naupr ucarp-1.2/config.guess ucarp-1.3/config.guess ---- ucarp-1.2/config.guess 2006-02-01 20:59:57.000000000 +0100 -+++ ucarp-1.3/config.guess 2006-05-27 23:12:33.000000000 +0200 -@@ -1,9 +1,10 @@ - #! /bin/sh - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -+# Inc. - --timestamp='2005-07-08' -+timestamp='2006-05-13' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by -@@ -106,7 +107,7 @@ set_cc_for_build=' - trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; - trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; - : ${TMPDIR=/tmp} ; -- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || -+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -@@ -206,6 +207,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; -+ *:SolidBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} -+ exit ;; - macppc:MirBSD:*:*) - echo powerppc-unknown-mirbsd${UNAME_RELEASE} - exit ;; -@@ -764,7 +768,14 @@ EOF - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -+ case ${UNAME_MACHINE} in -+ pc98) -+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ amd64) -+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ *) -+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin -@@ -779,8 +790,11 @@ EOF - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; -- x86:Interix*:[34]*) -- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' -+ x86:Interix*:[345]*) -+ echo i586-pc-interix${UNAME_RELEASE} -+ exit ;; -+ EM64T:Interix*:[345]*) -+ echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks -@@ -794,7 +808,7 @@ EOF - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; -- amd64:CYGWIN*:*:*) -+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) -@@ -851,7 +865,11 @@ EOF - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^CPU/{ -+ s: ::g -+ p -+ }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) -@@ -870,9 +888,16 @@ EOF - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^CPU/{ -+ s: ::g -+ p -+ }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; -+ or32:Linux:*:*) -+ echo or32-unknown-linux-gnu -+ exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; -@@ -916,6 +941,9 @@ EOF - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; -+ vax:Linux:*:*) -+ echo ${UNAME_MACHINE}-dec-linux-gnu -+ exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; -@@ -961,7 +989,7 @@ EOF - LIBC=gnulibc1 - # endif - #else -- #ifdef __INTEL_COMPILER -+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout -@@ -971,7 +999,11 @@ EOF - LIBC=dietlibc - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^LIBC/{ -+ s: ::g -+ p -+ }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit -@@ -1182,7 +1214,6 @@ EOF - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in -- *86) UNAME_PROCESSOR=i686 ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} -@@ -1261,6 +1292,9 @@ EOF - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; -+ i*86:rdos:*:*) -+ echo ${UNAME_MACHINE}-pc-rdos -+ exit ;; - esac - - #echo '(No uname command or uname output not recognized.)' 1>&2 -diff -Naupr ucarp-1.2/config.sub ucarp-1.3/config.sub ---- ucarp-1.2/config.sub 2006-02-01 20:59:57.000000000 +0100 -+++ ucarp-1.3/config.sub 2006-05-27 23:12:38.000000000 +0200 -@@ -1,9 +1,10 @@ - #! /bin/sh - # Configuration validation subroutine script. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -+# Inc. - --timestamp='2005-07-08' -+timestamp='2006-05-13' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software -@@ -119,8 +120,9 @@ esac - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ -- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) -+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ -+ storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; -@@ -171,6 +173,10 @@ case $os in - -hiux*) - os=-hiuxwe2 - ;; -+ -sco6) -+ os=-sco5v6 -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -@@ -187,6 +193,10 @@ case $os in - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -+ -sco5v6*) -+ # Don't forget version if it is 3.2v4 or newer. -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -@@ -239,7 +249,8 @@ case $basic_machine in - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ -- | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ -+ | m32c | m32r | m32rle | m68000 | m68k | m88k \ -+ | maxq | mb | microblaze | mcore \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ -@@ -257,18 +268,19 @@ case $basic_machine in - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ -- | ms1 \ -+ | mt \ - | msp430 \ -+ | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ -- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ -+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ -- | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ -- | sparcv8 | sparcv9 | sparcv9b \ -- | strongarm \ -+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ -+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ -+ | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ -@@ -276,9 +288,6 @@ case $basic_machine in - | z8k) - basic_machine=$basic_machine-unknown - ;; -- m32c) -- basic_machine=$basic_machine-unknown -- ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown -@@ -286,6 +295,9 @@ case $basic_machine in - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; -+ ms1) -+ basic_machine=mt-unknown -+ ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and -@@ -316,7 +328,7 @@ case $basic_machine in - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ -- | m32r-* | m32rle-* \ -+ | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ -@@ -336,19 +348,20 @@ case $basic_machine in - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ -- | ms1-* \ -+ | mt-* \ - | msp430-* \ -+ | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ -- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ -+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ -- | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ -+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ -- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ -+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ -@@ -359,8 +372,6 @@ case $basic_machine in - | ymp-* \ - | z8k-*) - ;; -- m32c-*) -- ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) -@@ -696,6 +707,9 @@ case $basic_machine in - basic_machine=i386-pc - os=-msdos - ;; -+ ms1-*) -+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` -+ ;; - mvs) - basic_machine=i370-ibm - os=-mvs -@@ -803,6 +817,12 @@ case $basic_machine in - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; -+ pc98) -+ basic_machine=i386-pc -+ ;; -+ pc98-*) -+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; -@@ -859,6 +879,10 @@ case $basic_machine in - basic_machine=i586-unknown - os=-pw32 - ;; -+ rdos) -+ basic_machine=i386-pc -+ os=-rdos -+ ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff -@@ -1101,7 +1125,7 @@ case $basic_machine in - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; -- sparc | sparcv8 | sparcv9 | sparcv9b) -+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) -@@ -1174,21 +1198,23 @@ case $os in - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ -- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ -+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ -+ | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ -+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ -+ | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -- | -skyos* | -haiku*) -+ | -skyos* | -haiku* | -rdos*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) -@@ -1340,6 +1366,9 @@ else - # system, and we'll never get to this point. - - case $basic_machine in -+ spu-*) -+ os=-elf -+ ;; - *-acorn) - os=-riscix1.2 - ;; -@@ -1349,9 +1378,9 @@ case $basic_machine in - arm*-semi) - os=-aout - ;; -- c4x-* | tic4x-*) -- os=-coff -- ;; -+ c4x-* | tic4x-*) -+ os=-coff -+ ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 -diff -Naupr ucarp-1.2/configure ucarp-1.3/configure ---- ucarp-1.2/configure 2006-02-25 17:32:42.000000000 +0100 -+++ ucarp-1.3/configure 2006-05-27 23:14:51.000000000 +0200 -@@ -1,6 +1,6 @@ - #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.59 for ucarp 1.2. -+# Generated by GNU Autoconf 2.59 for ucarp 1.3. - # - # Report bugs to . - # -@@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} - # Identity of this package. - PACKAGE_NAME='ucarp' - PACKAGE_TARNAME='ucarp' --PACKAGE_VERSION='1.2' --PACKAGE_STRING='ucarp 1.2' -+PACKAGE_VERSION='1.3' -+PACKAGE_STRING='ucarp 1.3' - PACKAGE_BUGREPORT='bugs@ucarp.org' - - ac_config_libobj_dir=src -@@ -780,7 +780,7 @@ if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF --\`configure' configures ucarp 1.2 to adapt to many kinds of systems. -+\`configure' configures ucarp 1.3 to adapt to many kinds of systems. - - Usage: $0 [OPTION]... [VAR=VALUE]... - -@@ -846,7 +846,7 @@ fi - - if test -n "$ac_init_help"; then - case $ac_init_help in -- short | recursive ) echo "Configuration of ucarp 1.2:";; -+ short | recursive ) echo "Configuration of ucarp 1.3:";; - esac - cat <<\_ACEOF - -@@ -976,7 +976,7 @@ fi - test -n "$ac_init_help" && exit 0 - if $ac_init_version; then - cat <<\_ACEOF --ucarp configure 1.2 -+ucarp configure 1.3 - generated by GNU Autoconf 2.59 - - Copyright (C) 2003 Free Software Foundation, Inc. -@@ -990,7 +990,7 @@ cat >&5 <<_ACEOF - This file contains any messages produced by compilers while - running configure, to aid debugging if configure makes a mistake. - --It was created by ucarp $as_me 1.2, which was -+It was created by ucarp $as_me 1.3, which was - generated by GNU Autoconf 2.59. Invocation command line was - - $ $0 $@ -@@ -1635,7 +1635,7 @@ fi - - # Define the identity of the package. - PACKAGE='ucarp' -- VERSION='1.2' -+ VERSION='1.3' - - - cat >>confdefs.h <<_ACEOF -@@ -12000,7 +12000,7 @@ sysconfdir="$CONFDIR" - CPPFLAGS="$CPPFLAGS -DCONFDIR=\\\"$sysconfdir\\\"" - - -- ac_config_files="$ac_config_files Makefile src/Makefile examples/Makefile po/Makefile.in examples/linux/Makefile examples/bsd/Makefile m4/Makefile" -+ ac_config_files="$ac_config_files Makefile src/Makefile examples/Makefile examples/linux/Makefile examples/bsd/Makefile po/Makefile.in m4/Makefile" - - - cat >confcache <<\_ACEOF -@@ -12379,7 +12379,7 @@ _ASBOX - } >&5 - cat >&5 <<_CSEOF - --This file was extended by ucarp $as_me 1.2, which was -+This file was extended by ucarp $as_me 1.3, which was - generated by GNU Autoconf 2.59. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES -@@ -12442,7 +12442,7 @@ _ACEOF - - cat >>$CONFIG_STATUS <<_ACEOF - ac_cs_version="\\ --ucarp config.status 1.2 -+ucarp config.status 1.3 - configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" - -@@ -12562,9 +12562,9 @@ do - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; - "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; -- "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; - "examples/linux/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/linux/Makefile" ;; - "examples/bsd/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/bsd/Makefile" ;; -+ "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; - "m4/Makefile" ) CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; - "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; -diff -Naupr ucarp-1.2/configure.ac ucarp-1.3/configure.ac ---- ucarp-1.2/configure.ac 2006-02-25 17:25:46.000000000 +0100 -+++ ucarp-1.3/configure.ac 2006-05-27 23:04:41.000000000 +0200 -@@ -1,6 +1,6 @@ - AC_PREREQ(2.59) - --AC_INIT([ucarp],[1.2],[bugs@ucarp.org]) -+AC_INIT([ucarp],[1.3],[bugs@ucarp.org]) - AC_CONFIG_HEADERS([config.h]) - AM_INIT_AUTOMAKE([1.9 dist-bzip2]) - AC_CONFIG_LIBOBJ_DIR(src) -@@ -259,9 +259,9 @@ CPPFLAGS="$CPPFLAGS -DCONFDIR=\\\"$sysco - - dnl Output - --AC_CONFIG_FILES(Makefile src/Makefile examples/Makefile po/Makefile.in -+AC_CONFIG_FILES(Makefile src/Makefile examples/Makefile - examples/linux/Makefile examples/bsd/Makefile -- m4/Makefile ) -+ po/Makefile.in m4/Makefile ) - - AC_OUTPUT - -diff -Naupr ucarp-1.2/examples/bsd/vip-down.sh ucarp-1.3/examples/bsd/vip-down.sh ---- ucarp-1.2/examples/bsd/vip-down.sh 2004-08-28 12:16:55.000000000 +0200 -+++ ucarp-1.3/examples/bsd/vip-down.sh 2006-05-27 22:38:40.000000000 +0200 -@@ -1,4 +1,4 @@ - #! /bin/sh - exec 2> /dev/null - --/sbin/ifconfig "$1" -alias 10.1.1.252 -+/sbin/ifconfig "$1" -alias "$2" -diff -Naupr ucarp-1.2/examples/bsd/vip-up.sh ucarp-1.3/examples/bsd/vip-up.sh ---- ucarp-1.2/examples/bsd/vip-up.sh 2004-08-28 12:16:52.000000000 +0200 -+++ ucarp-1.3/examples/bsd/vip-up.sh 2006-05-27 22:38:34.000000000 +0200 -@@ -1,4 +1,4 @@ - #! /bin/sh - exec 2> /dev/null - --/sbin/ifconfig "$1" alias 10.1.1.252 netmask 255.255.255.255 -+/sbin/ifconfig "$1" alias "$2" netmask 255.255.255.255 -diff -Naupr ucarp-1.2/examples/linux/vip-down.sh ucarp-1.3/examples/linux/vip-down.sh ---- ucarp-1.2/examples/linux/vip-down.sh 2004-08-28 12:16:49.000000000 +0200 -+++ ucarp-1.3/examples/linux/vip-down.sh 2006-05-27 22:41:37.000000000 +0200 -@@ -1,4 +1,7 @@ - #! /bin/sh - exec 2> /dev/null - --/sbin/ip addr del 10.1.1.252/24 dev "$1" -+/sbin/ip addr del "$2"/24 dev "$1" -+ -+# or alternatively: -+# /sbin/ifconfig "$1":254 down -diff -Naupr ucarp-1.2/examples/linux/vip-up.sh ucarp-1.3/examples/linux/vip-up.sh ---- ucarp-1.2/examples/linux/vip-up.sh 2004-08-28 12:16:47.000000000 +0200 -+++ ucarp-1.3/examples/linux/vip-up.sh 2006-05-27 22:40:22.000000000 +0200 -@@ -1,4 +1,7 @@ - #! /bin/sh - exec 2> /dev/null - --/sbin/ip addr add 10.1.1.252/24 dev "$1" -+/sbin/ip addr add "$2"/24 dev "$1" -+ -+# or alternatively: -+# /sbin/ifconfig "$1":254 "$2" netmask 255.255.255.0 -diff -Naupr ucarp-1.2/Makefile.am ucarp-1.3/Makefile.am ---- ucarp-1.2/Makefile.am 2006-02-25 17:22:01.000000000 +0100 -+++ ucarp-1.3/Makefile.am 2006-05-27 23:09:30.000000000 +0200 -@@ -7,4 +7,4 @@ SUBDIRS = \ - ACLOCAL_AMFLAGS = -I m4 - - --EXTRA_DIST = config.rpath mkinstalldirs -+EXTRA_DIST = config.rpath mkinstalldirs config.rpath mkinstalldirs -diff -Naupr ucarp-1.2/Makefile.in ucarp-1.3/Makefile.in ---- ucarp-1.2/Makefile.in 2006-02-25 17:32:11.000000000 +0100 -+++ ucarp-1.3/Makefile.in 2006-05-27 23:14:12.000000000 +0200 -@@ -178,7 +178,7 @@ SUBDIRS = \ - examples - - ACLOCAL_AMFLAGS = -I m4 --EXTRA_DIST = config.rpath mkinstalldirs -+EXTRA_DIST = config.rpath mkinstalldirs config.rpath mkinstalldirs - all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -diff -Naupr ucarp-1.2/NEWS ucarp-1.3/NEWS ---- ucarp-1.2/NEWS 2006-02-19 00:15:43.000000000 +0100 -+++ ucarp-1.3/NEWS 2006-04-06 11:50:19.000000000 +0200 -@@ -1,3 +1,5 @@ -+* Version 1.3: -+ - * Version 1.2: - - Neutral mode (--neutral). - - NetBSD compatibility. -diff -Naupr ucarp-1.2/po/en@boldquot.gmo ucarp-1.3/po/en@boldquot.gmo ---- ucarp-1.2/po/en@boldquot.gmo 2006-02-25 17:50:06.000000000 +0100 -+++ ucarp-1.3/po/en@boldquot.gmo 2006-07-05 00:54:58.000000000 +0200 -@@ -1,13 +1,8 @@ --6I|R --  --m- -- -- -- -- -- -- )! DK    7 ' B c t   $ - / "F &i 2 ' # !1Qp!)' #1U+p'&*/G$gV R&y m0D]u)D :7L' $--R/"&2'-#U!y !')I's#+'&.*U$ ,)(' 6&$ % --+.*  4-2"1#/3 50!* advertisement injected *--interface= (-i ): bind interface -+:O -+ -+m -+5 G +`     ) D V i w  7 '  ) : U n $ - / " &/2V'#!6Qe!)'#+6'b&*-$=U$u V&A mbt+)D> 7'  5Vg$-/ "9&\2'#!$Dc~!)'#$H+c'&* -#Qj$ 1+* ,8)60-/9$"3 -+5 !4(2'% :&7 #.* advertisement injected *--interface= (-i ): bind interface - --srcip= (-s ): source (real) IP address of that host - --vhid= (-v ): virtual IP identifier (1-255) - --pass= (-p ): password -@@ -23,6 +18,7 @@ - --shutdown (-z): call shutdown script at exit - --daemonize (-B): run in background - --facility= (-f): set syslog facility (default=daemon) -+--xparam= (-x): extra parameter to send to up/down scripts - - Sample usage: - -@@ -37,10 +33,10 @@ ucarp --interface=eth0 --srcip=10.1.1.1 - --upscript=/etc/vip-up.sh --downscript=/etc/vip-down.sh - - --Please report bugs to Bad IP checksumBad TTL: [%u]Bad digest - md2=[%02x%02x%02x%02x...] md=[%02x%02x%02x%02x...] - Check vhid, password and virtual IP addressBad version: [%u]Dead ratio can't be zeroIgnoring vhid: [%u]Interface [%s] not foundInterface name too longInvalid address: [%s]Invalid media / hardware address for [%s]Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]No interface foundOut of memoryOut of memory to create packetPassword too longPreferred master advertised: going back to BACKUP statePutting MASTER DOWN (going to time out)Putting MASTER down - preemptionSpawning [%s %s]Switching to state: BACKUPSwitching to state: INITSwitching to state: MASTERUnable to compile pcap rule: %s [%s]Unable to detach from the current session: %sUnable to detach: /dev/null can't be duplicatedUnable to find MAC address of [%s]Unable to get hardware info about [%s]Unable to get hardware info about an interface: %sUnable to get in background: [fork: %s]Unable to get interface address: %sUnable to open interface [%s]: %sUnable to open raw device: [%s]Unable to spawn the script: %sUnknown hardware type [%u]Unknown state: [%d]Unknown syslog facility: [%s]Using [%s] as a network interfaceWarning: no script called when going downWarning: no script called when going upYou must supply a network interfaceYou must supply a passwordYou must supply a persistent source addressYou must supply a valid virtual host idYou must supply a virtual host addressYou must supply an advertisement time baseioctl SIOCGLIFCONF errorioctl SIOCGLIFNUM errormaster_down event in INIT stateout of memory to send gratuitous ARPwrite() error #%d/%dwrite() has failedProject-Id-Version: ucarp 1.2 -+Please report bugs to Bad IP checksumBad TTL: [%u]Bad digest - md2=[%02x%02x%02x%02x...] md=[%02x%02x%02x%02x...] - Check vhid, password and virtual IP addressBad version: [%u]Dead ratio can't be zeroError opening socket for interface [%s]: %sIgnoring vhid: [%u]Interface [%s] not foundInterface name too longInvalid address: [%s]Invalid media / hardware address for [%s]Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]No interface foundOut of memoryOut of memory to create packetPassword too longPreferred master advertised: going back to BACKUP statePutting MASTER DOWN (going to time out)Putting MASTER down - preemptionSpawning [%s %s]Switching to state: BACKUPSwitching to state: INITSwitching to state: MASTERUnable to compile pcap rule: %s [%s]Unable to detach from the current session: %sUnable to detach: /dev/null can't be duplicatedUnable to find MAC address of [%s]Unable to get hardware info about [%s]Unable to get hardware info about an interface: %sUnable to get in background: [fork: %s]Unable to get interface address: %sUnable to open interface [%s]: %sUnable to open raw device: [%s]Unable to spawn the script: %sUnknown hardware type [%u]Unknown state: [%d]Unknown syslog facility: [%s]Using [%s] as a network interfaceWarning: no script called when going downWarning: no script called when going upYou must supply a network interfaceYou must supply a passwordYou must supply a persistent source addressYou must supply a valid virtual host idYou must supply a virtual host addressYou must supply an advertisement time basegettimeofday() failed: %sinitializing now to gettimeofday() failed: %sioctl SIOCGLIFCONF errorioctl SIOCGLIFNUM errormaster_down event in INIT stateout of memory to send gratuitous ARPpoll() errorwrite() error #%d/%dwrite() has failedProject-Id-Version: ucarp 1.3 - Report-Msgid-Bugs-To: bugs@ucarp.org --POT-Creation-Date: 2006-02-25 17:49+0100 --PO-Revision-Date: 2006-02-25 17:49+0100 -+POT-Creation-Date: 2006-07-05 00:54+0200 -+PO-Revision-Date: 2006-07-05 00:54+0200 - Last-Translator: Automatically generated - Language-Team: none - MIME-Version: 1.0 -@@ -63,6 +59,7 @@ Plural-Forms: nplurals=2; plural=(n != 1 - --shutdown (-z): call shutdown script at exit - --daemonize (-B): run in background - --facility= (-f): set syslog facility (default=daemon) -+--xparam= (-x): extra parameter to send to up/down scripts - - Sample usage: - -@@ -77,4 +74,4 @@ ucarp --interface=eth0 --srcip=10.1.1.1 - --upscript=/etc/vip-up.sh --downscript=/etc/vip-down.sh - - --Please report bugs to Bad IP checksumBad TTL: [%u]Bad digest - md2=[%02x%02x%02x%02x...] md=[%02x%02x%02x%02x...] - Check vhid, password and virtual IP addressBad version: [%u]Dead ratio can't be zeroIgnoring vhid: [%u]Interface [%s] not foundInterface name too longInvalid address: [%s]Invalid media / hardware address for [%s]Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]No interface foundOut of memoryOut of memory to create packetPassword too longPreferred master advertised: going back to BACKUP statePutting MASTER DOWN (going to time out)Putting MASTER down - preemptionSpawning [%s %s]Switching to state: BACKUPSwitching to state: INITSwitching to state: MASTERUnable to compile pcap rule: %s [%s]Unable to detach from the current session: %sUnable to detach: /dev/null can't be duplicatedUnable to find MAC address of [%s]Unable to get hardware info about [%s]Unable to get hardware info about an interface: %sUnable to get in background: [fork: %s]Unable to get interface address: %sUnable to open interface [%s]: %sUnable to open raw device: [%s]Unable to spawn the script: %sUnknown hardware type [%u]Unknown state: [%d]Unknown syslog facility: [%s]Using [%s] as a network interfaceWarning: no script called when going downWarning: no script called when going upYou must supply a network interfaceYou must supply a passwordYou must supply a persistent source addressYou must supply a valid virtual host idYou must supply a virtual host addressYou must supply an advertisement time baseioctl SIOCGLIFCONF errorioctl SIOCGLIFNUM errormaster_down event in INIT stateout of memory to send gratuitous ARPwrite() error #%d/%dwrite() has failed -\ No newline at end of file -+Please report bugs to Bad IP checksumBad TTL: [%u]Bad digest - md2=[%02x%02x%02x%02x...] md=[%02x%02x%02x%02x...] - Check vhid, password and virtual IP addressBad version: [%u]Dead ratio can't be zeroError opening socket for interface [%s]: %sIgnoring vhid: [%u]Interface [%s] not foundInterface name too longInvalid address: [%s]Invalid media / hardware address for [%s]Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]No interface foundOut of memoryOut of memory to create packetPassword too longPreferred master advertised: going back to BACKUP statePutting MASTER DOWN (going to time out)Putting MASTER down - preemptionSpawning [%s %s]Switching to state: BACKUPSwitching to state: INITSwitching to state: MASTERUnable to compile pcap rule: %s [%s]Unable to detach from the current session: %sUnable to detach: /dev/null can't be duplicatedUnable to find MAC address of [%s]Unable to get hardware info about [%s]Unable to get hardware info about an interface: %sUnable to get in background: [fork: %s]Unable to get interface address: %sUnable to open interface [%s]: %sUnable to open raw device: [%s]Unable to spawn the script: %sUnknown hardware type [%u]Unknown state: [%d]Unknown syslog facility: [%s]Using [%s] as a network interfaceWarning: no script called when going downWarning: no script called when going upYou must supply a network interfaceYou must supply a passwordYou must supply a persistent source addressYou must supply a valid virtual host idYou must supply a virtual host addressYou must supply an advertisement time basegettimeofday() failed: %sinitializing now to gettimeofday() failed: %sioctl SIOCGLIFCONF errorioctl SIOCGLIFNUM errormaster_down event in INIT stateout of memory to send gratuitous ARPpoll() errorwrite() error #%d/%dwrite() has failed -\ No newline at end of file -diff -Naupr ucarp-1.2/po/en@boldquot.po ucarp-1.3/po/en@boldquot.po ---- ucarp-1.2/po/en@boldquot.po 2006-02-25 17:50:06.000000000 +0100 -+++ ucarp-1.3/po/en@boldquot.po 2006-07-05 00:54:56.000000000 +0200 -@@ -30,10 +30,10 @@ - # - msgid "" - msgstr "" --"Project-Id-Version: ucarp 1.2\n" -+"Project-Id-Version: ucarp 1.3\n" - "Report-Msgid-Bugs-To: bugs@ucarp.org\n" --"POT-Creation-Date: 2006-02-25 17:49+0100\n" --"PO-Revision-Date: 2006-02-25 17:49+0100\n" -+"POT-Creation-Date: 2006-07-05 00:54+0200\n" -+"PO-Revision-Date: 2006-07-05 00:54+0200\n" - "Last-Translator: Automatically generated\n" - "Language-Team: none\n" - "MIME-Version: 1.0\n" -@@ -119,30 +119,53 @@ msgstr "Putting MASTER down - preemption - msgid "Putting MASTER DOWN (going to time out)" - msgstr "Putting MASTER DOWN (going to time out)" - --#: src/carp.c:655 -+#: src/carp.c:657 - msgid "Password too long" - msgstr "Password too long" - --#: src/carp.c:668 -+#: src/carp.c:670 - #, c-format - msgid "Unable to find MAC address of [%s]" - msgstr "Unable to find MAC address of [%s]" - --#: src/carp.c:672 -+#: src/carp.c:674 - #, c-format - msgid "Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]" - msgstr "Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]" - --#: src/carp.c:679 -+#: src/carp.c:681 - #, c-format - msgid "Unable to open interface [%s]: %s" - msgstr "Unable to open interface [%s]: %s" - --#: src/carp.c:685 -+#: src/carp.c:687 - #, c-format - msgid "Unable to compile pcap rule: %s [%s]" - msgstr "Unable to compile pcap rule: %s [%s]" - -+#: src/carp.c:703 -+#, c-format -+msgid "initializing now to gettimeofday() failed: %s" -+msgstr "initializing now to gettimeofday() failed: %s" -+ -+#: src/carp.c:709 -+#, c-format -+msgid "Error opening socket for interface [%s]: %s" -+msgstr "Error opening socket for interface [%s]: %s" -+ -+#: src/carp.c:715 src/fillmac.c:51 -+msgid "Interface name too long" -+msgstr "Interface name too long" -+ -+#: src/carp.c:739 -+msgid "poll() error" -+msgstr "poll() error" -+ -+#: src/carp.c:744 -+#, c-format -+msgid "gettimeofday() failed: %s" -+msgstr "gettimeofday() failed: %s" -+ - #: src/daemonize.c:53 - #, c-format - msgid "Unable to get in background: [fork: %s]" -@@ -162,10 +185,6 @@ msgstr "Unable to detach: /dev/null can' - msgid "Unable to open raw device: [%s]" - msgstr "Unable to open raw device: [%s]" - --#: src/fillmac.c:51 --msgid "Interface name too long" --msgstr "Interface name too long" -- - #: src/fillmac.c:57 - #, c-format - msgid "Unable to get hardware info about an interface: %s" -@@ -198,17 +217,17 @@ msgstr "No interface found" - msgid "ioctl SIOCGLIFCONF error" - msgstr "ioctl SIOCGLIFCONF error" - --#: src/fillmac.c:140 -+#: src/fillmac.c:135 - #, c-format - msgid "Interface [%s] not found" - msgstr "Interface [%s] not found" - --#: src/fillmac.c:147 -+#: src/fillmac.c:148 - #, c-format - msgid "Unable to get hardware info about [%s]" - msgstr "Unable to get hardware info about [%s]" - --#: src/garp.c:36 -+#: src/garp.c:39 - msgid "out of memory to send gratuitous ARP" - msgstr "out of memory to send gratuitous ARP" - -@@ -240,6 +259,7 @@ msgid "" - "--shutdown (-z): call shutdown script at exit\n" - "--daemonize (-B): run in background\n" - "--facility= (-f): set syslog facility (default=daemon)\n" -+"--xparam= (-x): extra parameter to send to up/down scripts\n" - "\n" - "Sample usage:\n" - "\n" -@@ -272,6 +292,7 @@ msgstr "" - "--shutdown (-z): call shutdown script at exit\n" - "--daemonize (-B): run in background\n" - "--facility= (-f): set syslog facility (default=daemon)\n" -+"--xparam= (-x): extra parameter to send to up/down scripts\n" - "\n" - "Sample usage:\n" - "\n" -@@ -288,57 +309,57 @@ msgstr "" - "\n" - "Please report bugs to " - --#: src/ucarp.c:77 -+#: src/ucarp.c:78 - msgid "Out of memory" - msgstr "Out of memory" - --#: src/ucarp.c:111 src/ucarp.c:137 -+#: src/ucarp.c:112 src/ucarp.c:139 - #, c-format - msgid "Invalid address: [%s]" - msgstr "Invalid address: [%s]" - --#: src/ucarp.c:190 -+#: src/ucarp.c:193 - #, c-format - msgid "Unknown syslog facility: [%s]" - msgstr "Unknown syslog facility: [%s]" - --#: src/ucarp.c:207 -+#: src/ucarp.c:217 - msgid "You must supply a network interface" - msgstr "You must supply a network interface" - --#: src/ucarp.c:210 -+#: src/ucarp.c:220 - #, c-format - msgid "Using [%s] as a network interface" - msgstr "Using [%s] as a network interface" - --#: src/ucarp.c:213 -+#: src/ucarp.c:223 - msgid "You must supply a valid virtual host id" - msgstr "You must supply a valid virtual host id" - --#: src/ucarp.c:217 -+#: src/ucarp.c:227 - msgid "You must supply a password" - msgstr "You must supply a password" - --#: src/ucarp.c:221 -+#: src/ucarp.c:231 - msgid "You must supply an advertisement time base" - msgstr "You must supply an advertisement time base" - --#: src/ucarp.c:225 -+#: src/ucarp.c:235 - msgid "You must supply a persistent source address" - msgstr "You must supply a persistent source address" - --#: src/ucarp.c:229 -+#: src/ucarp.c:239 - msgid "You must supply a virtual host address" - msgstr "You must supply a virtual host address" - --#: src/ucarp.c:233 -+#: src/ucarp.c:243 - msgid "Warning: no script called when going up" - msgstr "Warning: no script called when going up" - --#: src/ucarp.c:236 -+#: src/ucarp.c:246 - msgid "Warning: no script called when going down" - msgstr "Warning: no script called when going down" - --#: src/ucarp.c:239 -+#: src/ucarp.c:249 - msgid "Dead ratio can't be zero" - msgstr "Dead ratio can't be zero" -diff -Naupr ucarp-1.2/po/en@quot.gmo ucarp-1.3/po/en@quot.gmo ---- ucarp-1.2/po/en@quot.gmo 2006-02-25 17:50:06.000000000 +0100 -+++ ucarp-1.3/po/en@quot.gmo 2006-07-05 00:54:58.000000000 +0200 -@@ -1,13 +1,8 @@ --6I|R --  --m- -- -- -- -- -- -- )! DK    7 ' B c t   $ - / "F &i 2 ' # !1Qp!)' #1U+p'&*/G$gV R&y m0D]u)D :7L' $--R/"&2'-#U!y !')I's#+'&.*U$ ,)(' 6&$ % --+.*  4-2"1#/3 50!* advertisement injected *--interface= (-i ): bind interface -+:O -+ -+m -+5 G +`     ) D V i w  7 '  ) : U n $ - / " &/2V'#!6Qe!)'#+6'b&*-$=U$u V&A mbt+)D> 7'  5Vg$-/ "9&\2'#!$Dc~!)'#$H+c'&* -#Qj$ 1+* ,8)60-/9$"3 -+5 !4(2'% :&7 #.* advertisement injected *--interface= (-i ): bind interface - --srcip= (-s ): source (real) IP address of that host - --vhid= (-v ): virtual IP identifier (1-255) - --pass= (-p ): password -@@ -23,6 +18,7 @@ - --shutdown (-z): call shutdown script at exit - --daemonize (-B): run in background - --facility= (-f): set syslog facility (default=daemon) -+--xparam= (-x): extra parameter to send to up/down scripts - - Sample usage: - -@@ -37,10 +33,10 @@ ucarp --interface=eth0 --srcip=10.1.1.1 - --upscript=/etc/vip-up.sh --downscript=/etc/vip-down.sh - - --Please report bugs to Bad IP checksumBad TTL: [%u]Bad digest - md2=[%02x%02x%02x%02x...] md=[%02x%02x%02x%02x...] - Check vhid, password and virtual IP addressBad version: [%u]Dead ratio can't be zeroIgnoring vhid: [%u]Interface [%s] not foundInterface name too longInvalid address: [%s]Invalid media / hardware address for [%s]Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]No interface foundOut of memoryOut of memory to create packetPassword too longPreferred master advertised: going back to BACKUP statePutting MASTER DOWN (going to time out)Putting MASTER down - preemptionSpawning [%s %s]Switching to state: BACKUPSwitching to state: INITSwitching to state: MASTERUnable to compile pcap rule: %s [%s]Unable to detach from the current session: %sUnable to detach: /dev/null can't be duplicatedUnable to find MAC address of [%s]Unable to get hardware info about [%s]Unable to get hardware info about an interface: %sUnable to get in background: [fork: %s]Unable to get interface address: %sUnable to open interface [%s]: %sUnable to open raw device: [%s]Unable to spawn the script: %sUnknown hardware type [%u]Unknown state: [%d]Unknown syslog facility: [%s]Using [%s] as a network interfaceWarning: no script called when going downWarning: no script called when going upYou must supply a network interfaceYou must supply a passwordYou must supply a persistent source addressYou must supply a valid virtual host idYou must supply a virtual host addressYou must supply an advertisement time baseioctl SIOCGLIFCONF errorioctl SIOCGLIFNUM errormaster_down event in INIT stateout of memory to send gratuitous ARPwrite() error #%d/%dwrite() has failedProject-Id-Version: ucarp 1.2 -+Please report bugs to Bad IP checksumBad TTL: [%u]Bad digest - md2=[%02x%02x%02x%02x...] md=[%02x%02x%02x%02x...] - Check vhid, password and virtual IP addressBad version: [%u]Dead ratio can't be zeroError opening socket for interface [%s]: %sIgnoring vhid: [%u]Interface [%s] not foundInterface name too longInvalid address: [%s]Invalid media / hardware address for [%s]Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]No interface foundOut of memoryOut of memory to create packetPassword too longPreferred master advertised: going back to BACKUP statePutting MASTER DOWN (going to time out)Putting MASTER down - preemptionSpawning [%s %s]Switching to state: BACKUPSwitching to state: INITSwitching to state: MASTERUnable to compile pcap rule: %s [%s]Unable to detach from the current session: %sUnable to detach: /dev/null can't be duplicatedUnable to find MAC address of [%s]Unable to get hardware info about [%s]Unable to get hardware info about an interface: %sUnable to get in background: [fork: %s]Unable to get interface address: %sUnable to open interface [%s]: %sUnable to open raw device: [%s]Unable to spawn the script: %sUnknown hardware type [%u]Unknown state: [%d]Unknown syslog facility: [%s]Using [%s] as a network interfaceWarning: no script called when going downWarning: no script called when going upYou must supply a network interfaceYou must supply a passwordYou must supply a persistent source addressYou must supply a valid virtual host idYou must supply a virtual host addressYou must supply an advertisement time basegettimeofday() failed: %sinitializing now to gettimeofday() failed: %sioctl SIOCGLIFCONF errorioctl SIOCGLIFNUM errormaster_down event in INIT stateout of memory to send gratuitous ARPpoll() errorwrite() error #%d/%dwrite() has failedProject-Id-Version: ucarp 1.3 - Report-Msgid-Bugs-To: bugs@ucarp.org --POT-Creation-Date: 2006-02-25 17:49+0100 --PO-Revision-Date: 2006-02-25 17:49+0100 -+POT-Creation-Date: 2006-07-05 00:54+0200 -+PO-Revision-Date: 2006-07-05 00:54+0200 - Last-Translator: Automatically generated - Language-Team: none - MIME-Version: 1.0 -@@ -63,6 +59,7 @@ Plural-Forms: nplurals=2; plural=(n != 1 - --shutdown (-z): call shutdown script at exit - --daemonize (-B): run in background - --facility= (-f): set syslog facility (default=daemon) -+--xparam= (-x): extra parameter to send to up/down scripts - - Sample usage: - -@@ -77,4 +74,4 @@ ucarp --interface=eth0 --srcip=10.1.1.1 - --upscript=/etc/vip-up.sh --downscript=/etc/vip-down.sh - - --Please report bugs to Bad IP checksumBad TTL: [%u]Bad digest - md2=[%02x%02x%02x%02x...] md=[%02x%02x%02x%02x...] - Check vhid, password and virtual IP addressBad version: [%u]Dead ratio can't be zeroIgnoring vhid: [%u]Interface [%s] not foundInterface name too longInvalid address: [%s]Invalid media / hardware address for [%s]Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]No interface foundOut of memoryOut of memory to create packetPassword too longPreferred master advertised: going back to BACKUP statePutting MASTER DOWN (going to time out)Putting MASTER down - preemptionSpawning [%s %s]Switching to state: BACKUPSwitching to state: INITSwitching to state: MASTERUnable to compile pcap rule: %s [%s]Unable to detach from the current session: %sUnable to detach: /dev/null can't be duplicatedUnable to find MAC address of [%s]Unable to get hardware info about [%s]Unable to get hardware info about an interface: %sUnable to get in background: [fork: %s]Unable to get interface address: %sUnable to open interface [%s]: %sUnable to open raw device: [%s]Unable to spawn the script: %sUnknown hardware type [%u]Unknown state: [%d]Unknown syslog facility: [%s]Using [%s] as a network interfaceWarning: no script called when going downWarning: no script called when going upYou must supply a network interfaceYou must supply a passwordYou must supply a persistent source addressYou must supply a valid virtual host idYou must supply a virtual host addressYou must supply an advertisement time baseioctl SIOCGLIFCONF errorioctl SIOCGLIFNUM errormaster_down event in INIT stateout of memory to send gratuitous ARPwrite() error #%d/%dwrite() has failed -\ No newline at end of file -+Please report bugs to Bad IP checksumBad TTL: [%u]Bad digest - md2=[%02x%02x%02x%02x...] md=[%02x%02x%02x%02x...] - Check vhid, password and virtual IP addressBad version: [%u]Dead ratio can't be zeroError opening socket for interface [%s]: %sIgnoring vhid: [%u]Interface [%s] not foundInterface name too longInvalid address: [%s]Invalid media / hardware address for [%s]Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]No interface foundOut of memoryOut of memory to create packetPassword too longPreferred master advertised: going back to BACKUP statePutting MASTER DOWN (going to time out)Putting MASTER down - preemptionSpawning [%s %s]Switching to state: BACKUPSwitching to state: INITSwitching to state: MASTERUnable to compile pcap rule: %s [%s]Unable to detach from the current session: %sUnable to detach: /dev/null can't be duplicatedUnable to find MAC address of [%s]Unable to get hardware info about [%s]Unable to get hardware info about an interface: %sUnable to get in background: [fork: %s]Unable to get interface address: %sUnable to open interface [%s]: %sUnable to open raw device: [%s]Unable to spawn the script: %sUnknown hardware type [%u]Unknown state: [%d]Unknown syslog facility: [%s]Using [%s] as a network interfaceWarning: no script called when going downWarning: no script called when going upYou must supply a network interfaceYou must supply a passwordYou must supply a persistent source addressYou must supply a valid virtual host idYou must supply a virtual host addressYou must supply an advertisement time basegettimeofday() failed: %sinitializing now to gettimeofday() failed: %sioctl SIOCGLIFCONF errorioctl SIOCGLIFNUM errormaster_down event in INIT stateout of memory to send gratuitous ARPpoll() errorwrite() error #%d/%dwrite() has failed -\ No newline at end of file -diff -Naupr ucarp-1.2/po/en@quot.po ucarp-1.3/po/en@quot.po ---- ucarp-1.2/po/en@quot.po 2006-02-25 17:50:01.000000000 +0100 -+++ ucarp-1.3/po/en@quot.po 2006-07-05 00:54:51.000000000 +0200 -@@ -27,10 +27,10 @@ - # - msgid "" - msgstr "" --"Project-Id-Version: ucarp 1.2\n" -+"Project-Id-Version: ucarp 1.3\n" - "Report-Msgid-Bugs-To: bugs@ucarp.org\n" --"POT-Creation-Date: 2006-02-25 17:49+0100\n" --"PO-Revision-Date: 2006-02-25 17:49+0100\n" -+"POT-Creation-Date: 2006-07-05 00:54+0200\n" -+"PO-Revision-Date: 2006-07-05 00:54+0200\n" - "Last-Translator: Automatically generated\n" - "Language-Team: none\n" - "MIME-Version: 1.0\n" -@@ -116,30 +116,53 @@ msgstr "Putting MASTER down - preemption - msgid "Putting MASTER DOWN (going to time out)" - msgstr "Putting MASTER DOWN (going to time out)" - --#: src/carp.c:655 -+#: src/carp.c:657 - msgid "Password too long" - msgstr "Password too long" - --#: src/carp.c:668 -+#: src/carp.c:670 - #, c-format - msgid "Unable to find MAC address of [%s]" - msgstr "Unable to find MAC address of [%s]" - --#: src/carp.c:672 -+#: src/carp.c:674 - #, c-format - msgid "Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]" - msgstr "Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]" - --#: src/carp.c:679 -+#: src/carp.c:681 - #, c-format - msgid "Unable to open interface [%s]: %s" - msgstr "Unable to open interface [%s]: %s" - --#: src/carp.c:685 -+#: src/carp.c:687 - #, c-format - msgid "Unable to compile pcap rule: %s [%s]" - msgstr "Unable to compile pcap rule: %s [%s]" - -+#: src/carp.c:703 -+#, c-format -+msgid "initializing now to gettimeofday() failed: %s" -+msgstr "initializing now to gettimeofday() failed: %s" -+ -+#: src/carp.c:709 -+#, c-format -+msgid "Error opening socket for interface [%s]: %s" -+msgstr "Error opening socket for interface [%s]: %s" -+ -+#: src/carp.c:715 src/fillmac.c:51 -+msgid "Interface name too long" -+msgstr "Interface name too long" -+ -+#: src/carp.c:739 -+msgid "poll() error" -+msgstr "poll() error" -+ -+#: src/carp.c:744 -+#, c-format -+msgid "gettimeofday() failed: %s" -+msgstr "gettimeofday() failed: %s" -+ - #: src/daemonize.c:53 - #, c-format - msgid "Unable to get in background: [fork: %s]" -@@ -159,10 +182,6 @@ msgstr "Unable to detach: /dev/null can' - msgid "Unable to open raw device: [%s]" - msgstr "Unable to open raw device: [%s]" - --#: src/fillmac.c:51 --msgid "Interface name too long" --msgstr "Interface name too long" -- - #: src/fillmac.c:57 - #, c-format - msgid "Unable to get hardware info about an interface: %s" -@@ -195,17 +214,17 @@ msgstr "No interface found" - msgid "ioctl SIOCGLIFCONF error" - msgstr "ioctl SIOCGLIFCONF error" - --#: src/fillmac.c:140 -+#: src/fillmac.c:135 - #, c-format - msgid "Interface [%s] not found" - msgstr "Interface [%s] not found" - --#: src/fillmac.c:147 -+#: src/fillmac.c:148 - #, c-format - msgid "Unable to get hardware info about [%s]" - msgstr "Unable to get hardware info about [%s]" - --#: src/garp.c:36 -+#: src/garp.c:39 - msgid "out of memory to send gratuitous ARP" - msgstr "out of memory to send gratuitous ARP" - -@@ -237,6 +256,7 @@ msgid "" - "--shutdown (-z): call shutdown script at exit\n" - "--daemonize (-B): run in background\n" - "--facility= (-f): set syslog facility (default=daemon)\n" -+"--xparam= (-x): extra parameter to send to up/down scripts\n" - "\n" - "Sample usage:\n" - "\n" -@@ -269,6 +289,7 @@ msgstr "" - "--shutdown (-z): call shutdown script at exit\n" - "--daemonize (-B): run in background\n" - "--facility= (-f): set syslog facility (default=daemon)\n" -+"--xparam= (-x): extra parameter to send to up/down scripts\n" - "\n" - "Sample usage:\n" - "\n" -@@ -285,57 +306,57 @@ msgstr "" - "\n" - "Please report bugs to " - --#: src/ucarp.c:77 -+#: src/ucarp.c:78 - msgid "Out of memory" - msgstr "Out of memory" - --#: src/ucarp.c:111 src/ucarp.c:137 -+#: src/ucarp.c:112 src/ucarp.c:139 - #, c-format - msgid "Invalid address: [%s]" - msgstr "Invalid address: [%s]" - --#: src/ucarp.c:190 -+#: src/ucarp.c:193 - #, c-format - msgid "Unknown syslog facility: [%s]" - msgstr "Unknown syslog facility: [%s]" - --#: src/ucarp.c:207 -+#: src/ucarp.c:217 - msgid "You must supply a network interface" - msgstr "You must supply a network interface" - --#: src/ucarp.c:210 -+#: src/ucarp.c:220 - #, c-format - msgid "Using [%s] as a network interface" - msgstr "Using [%s] as a network interface" - --#: src/ucarp.c:213 -+#: src/ucarp.c:223 - msgid "You must supply a valid virtual host id" - msgstr "You must supply a valid virtual host id" - --#: src/ucarp.c:217 -+#: src/ucarp.c:227 - msgid "You must supply a password" - msgstr "You must supply a password" - --#: src/ucarp.c:221 -+#: src/ucarp.c:231 - msgid "You must supply an advertisement time base" - msgstr "You must supply an advertisement time base" - --#: src/ucarp.c:225 -+#: src/ucarp.c:235 - msgid "You must supply a persistent source address" - msgstr "You must supply a persistent source address" - --#: src/ucarp.c:229 -+#: src/ucarp.c:239 - msgid "You must supply a virtual host address" - msgstr "You must supply a virtual host address" - --#: src/ucarp.c:233 -+#: src/ucarp.c:243 - msgid "Warning: no script called when going up" - msgstr "Warning: no script called when going up" - --#: src/ucarp.c:236 -+#: src/ucarp.c:246 - msgid "Warning: no script called when going down" - msgstr "Warning: no script called when going down" - --#: src/ucarp.c:239 -+#: src/ucarp.c:249 - msgid "Dead ratio can't be zero" - msgstr "Dead ratio can't be zero" -diff -Naupr ucarp-1.2/po/ucarp.pot ucarp-1.3/po/ucarp.pot ---- ucarp-1.2/po/ucarp.pot 2006-02-25 17:49:38.000000000 +0100 -+++ ucarp-1.3/po/ucarp.pot 2006-07-05 00:54:46.000000000 +0200 -@@ -8,7 +8,7 @@ msgid "" - msgstr "" - "Project-Id-Version: PACKAGE VERSION\n" - "Report-Msgid-Bugs-To: bugs@ucarp.org\n" --"POT-Creation-Date: 2006-02-25 17:49+0100\n" -+"POT-Creation-Date: 2006-07-05 00:54+0200\n" - "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" - "Last-Translator: FULL NAME \n" - "Language-Team: LANGUAGE \n" -@@ -92,30 +92,53 @@ msgstr "" - msgid "Putting MASTER DOWN (going to time out)" - msgstr "" - --#: src/carp.c:655 -+#: src/carp.c:657 - msgid "Password too long" - msgstr "" - --#: src/carp.c:668 -+#: src/carp.c:670 - #, c-format - msgid "Unable to find MAC address of [%s]" - msgstr "" - --#: src/carp.c:672 -+#: src/carp.c:674 - #, c-format - msgid "Local advertised ethernet address is [%02x:%02x:%02x:%02x:%02x:%02x]" - msgstr "" - --#: src/carp.c:679 -+#: src/carp.c:681 - #, c-format - msgid "Unable to open interface [%s]: %s" - msgstr "" - --#: src/carp.c:685 -+#: src/carp.c:687 - #, c-format - msgid "Unable to compile pcap rule: %s [%s]" - msgstr "" - -+#: src/carp.c:703 -+#, c-format -+msgid "initializing now to gettimeofday() failed: %s" -+msgstr "" -+ -+#: src/carp.c:709 -+#, c-format -+msgid "Error opening socket for interface [%s]: %s" -+msgstr "" -+ -+#: src/carp.c:715 src/fillmac.c:51 -+msgid "Interface name too long" -+msgstr "" -+ -+#: src/carp.c:739 -+msgid "poll() error" -+msgstr "" -+ -+#: src/carp.c:744 -+#, c-format -+msgid "gettimeofday() failed: %s" -+msgstr "" -+ - #: src/daemonize.c:53 - #, c-format - msgid "Unable to get in background: [fork: %s]" -@@ -135,10 +158,6 @@ msgstr "" - msgid "Unable to open raw device: [%s]" - msgstr "" - --#: src/fillmac.c:51 --msgid "Interface name too long" --msgstr "" -- - #: src/fillmac.c:57 - #, c-format - msgid "Unable to get hardware info about an interface: %s" -@@ -171,17 +190,17 @@ msgstr "" - msgid "ioctl SIOCGLIFCONF error" - msgstr "" - --#: src/fillmac.c:140 -+#: src/fillmac.c:135 - #, c-format - msgid "Interface [%s] not found" - msgstr "" - --#: src/fillmac.c:147 -+#: src/fillmac.c:148 - #, c-format - msgid "Unable to get hardware info about [%s]" - msgstr "" - --#: src/garp.c:36 -+#: src/garp.c:39 - msgid "out of memory to send gratuitous ARP" - msgstr "" - -@@ -213,6 +232,7 @@ msgid "" - "--shutdown (-z): call shutdown script at exit\n" - "--daemonize (-B): run in background\n" - "--facility= (-f): set syslog facility (default=daemon)\n" -+"--xparam= (-x): extra parameter to send to up/down scripts\n" - "\n" - "Sample usage:\n" - "\n" -@@ -230,57 +250,57 @@ msgid "" - "Please report bugs to " - msgstr "" - --#: src/ucarp.c:77 -+#: src/ucarp.c:78 - msgid "Out of memory" - msgstr "" - --#: src/ucarp.c:111 src/ucarp.c:137 -+#: src/ucarp.c:112 src/ucarp.c:139 - #, c-format - msgid "Invalid address: [%s]" - msgstr "" - --#: src/ucarp.c:190 -+#: src/ucarp.c:193 - #, c-format - msgid "Unknown syslog facility: [%s]" - msgstr "" - --#: src/ucarp.c:207 -+#: src/ucarp.c:217 - msgid "You must supply a network interface" - msgstr "" - --#: src/ucarp.c:210 -+#: src/ucarp.c:220 - #, c-format - msgid "Using [%s] as a network interface" - msgstr "" - --#: src/ucarp.c:213 -+#: src/ucarp.c:223 - msgid "You must supply a valid virtual host id" - msgstr "" - --#: src/ucarp.c:217 -+#: src/ucarp.c:227 - msgid "You must supply a password" - msgstr "" - --#: src/ucarp.c:221 -+#: src/ucarp.c:231 - msgid "You must supply an advertisement time base" - msgstr "" - --#: src/ucarp.c:225 -+#: src/ucarp.c:235 - msgid "You must supply a persistent source address" - msgstr "" - --#: src/ucarp.c:229 -+#: src/ucarp.c:239 - msgid "You must supply a virtual host address" - msgstr "" - --#: src/ucarp.c:233 -+#: src/ucarp.c:243 - msgid "Warning: no script called when going up" - msgstr "" - --#: src/ucarp.c:236 -+#: src/ucarp.c:246 - msgid "Warning: no script called when going down" - msgstr "" - --#: src/ucarp.c:239 -+#: src/ucarp.c:249 - msgid "Dead ratio can't be zero" - msgstr "" -diff -Naupr ucarp-1.2/README ucarp-1.3/README ---- ucarp-1.2/README 2006-02-18 23:31:10.000000000 +0100 -+++ ucarp-1.3/README 2006-05-27 22:37:38.000000000 +0200 -@@ -1,6 +1,6 @@ - - .:. UCARP .:. -- Documentation for version 1.2 -+ Documentation for version 1.3 - - - ------------------------ BLURB ------------------------ -@@ -97,8 +97,15 @@ routes, to add something to log files or - least, you can use a script that will connect to your switches and flush their - ARP cache. Some users reported that transitions were way faster when also - switching MAC addresses. --The interface name is passed as an argument to the called scripts, so feel --free to replace "eth0" with "$1" in the previous examples. -+ -+The called scripts are passed arguments, in this order: -+ -+ -+ -+For instance, as the is passed as the first argument to the called scripts, -+feel free to replace "eth0" with "$1" and 10.1.1.252 by "$2" in the previous -+examples. -+ - - Don't forget to make those files executable : - -diff -Naupr ucarp-1.2/src/carp.c ucarp-1.3/src/carp.c ---- ucarp-1.2/src/carp.c 2006-02-19 00:06:17.000000000 +0100 -+++ ucarp-1.3/src/carp.c 2006-06-27 01:00:35.000000000 +0200 -@@ -303,7 +303,7 @@ static void carp_send_ad(struct carp_sof - } - - static void carp_send_ad_all(struct carp_softc *sc) { -- return carp_send_ad(sc); -+ carp_send_ad(sc); - } - - static void carp_setrun(struct carp_softc *sc, sa_family_t af) -@@ -635,10 +635,12 @@ char *build_bpf_rule(void) - - int docarp(void) - { -+ char errbuf[PCAP_ERRBUF_SIZE]; - struct bpf_program bpfp; - struct pollfd pfds[1]; -+ struct ifreq iface; -+ int fd; - int nfds; -- char errbuf[PCAP_ERRBUF_SIZE]; - - sc.sc_vhid = vhid; - sc.sc_advbase = advbase; -@@ -666,7 +668,7 @@ int docarp(void) - - if (fill_mac_address() != 0) { - logfile(LOG_ERR, _("Unable to find MAC address of [%s]"), -- interface); -+ interface == NULL ? "-" : interface); - return -1; - } - logfile(LOG_INFO, _("Local advertised ethernet address is " -@@ -677,13 +679,13 @@ int docarp(void) - if ((dev_desc = pcap_open_live(interface, ETHERNET_MTU, 0, - CAPTURE_TIMEOUT, errbuf)) == NULL) { - logfile(LOG_ERR, _("Unable to open interface [%s]: %s"), -- interface, errbuf); -+ interface == NULL ? "-" : interface, errbuf); - return -1; - } - if (pcap_compile(dev_desc, &bpfp, build_bpf_rule(), - 1, (bpf_u_int32) 0) != 0) { - logfile(LOG_ERR, _("Unable to compile pcap rule: %s [%s]"), -- errbuf, interface); -+ errbuf, interface == NULL ? "-" : interface); - return -1; - } - pcap_setfilter(dev_desc, &bpfp); -@@ -698,22 +700,48 @@ int docarp(void) - } - - if (gettimeofday(&now, NULL) != 0) { -- logfile(LOG_WARNING, "initializing now to gettimeofday() failed: %s", -+ logfile(LOG_WARNING, _("initializing now to gettimeofday() failed: %s"), - strerror(errno)); - } - carp_setrun(&sc, 0); - -+ if ((fd = socket(PF_INET, SOCK_DGRAM, 0)) == -1) { -+ logfile(LOG_ERR, _("Error opening socket for interface [%s]: %s"), -+ interface == NULL ? "-" : interface, strerror(errno)); -+ return -1; -+ } -+#ifdef SIOCGIFFLAGS -+ if (strlen(interface) >= sizeof iface.ifr_name) { -+ logfile(LOG_ERR, _("Interface name too long")); -+ return -1; -+ } -+ strncpy(iface.ifr_name, interface, sizeof iface.ifr_name); -+#endif - for (;;) { -+#ifdef SIOCGIFFLAGS -+ if (ioctl(fd, SIOCGIFFLAGS, &iface) != 0) { -+ break; -+ } -+ if ((iface.ifr_flags & IFF_RUNNING) == 0) { -+ carp_set_state(&sc, BACKUP); -+ sc.sc_ad_tmo.tv_sec = 0; -+ sc.sc_ad_tmo.tv_usec = 0; -+ sc.sc_md_tmo.tv_sec = 0; -+ sc.sc_md6_tmo.tv_usec = 0; -+ sleep(SECONDS_TO_WAIT_AFTER_INTERFACE_IS_DOWN); -+ continue; -+ } -+#endif - nfds = poll(pfds, (nfds_t) 1, sc.sc_advbase * 1000); - if (nfds == -1 || - (pfds[0].revents & (POLLERR | POLLHUP | POLLNVAL)) != 0) { - #ifdef DEBUG -- logfile(LOG_NOTICE, "poll() error"); -+ logfile(LOG_NOTICE, _("poll() error")); - #endif - break; - } - if (gettimeofday(&now, NULL) != 0) { -- logfile(LOG_WARNING, "gettimeofday() failed: %s", -+ logfile(LOG_WARNING, _("gettimeofday() failed: %s"), - strerror(errno)); - continue; - } -diff -Naupr ucarp-1.2/src/fillmac.c ucarp-1.3/src/fillmac.c ---- ucarp-1.2/src/fillmac.c 2004-08-28 17:15:36.000000000 +0200 -+++ ucarp-1.3/src/fillmac.c 2006-07-05 00:53:16.000000000 +0200 -@@ -51,7 +51,7 @@ int fill_mac_address(void) - logfile(LOG_ERR, _("Interface name too long")); - return -1; - } -- strcpy(ifr.ifr_name, interface); -+ strncpy(ifr.ifr_name, interface, sizeof ifr.ifr_name); - if (ioctl(s, SIOCGIFHWADDR, &ifr) != 0) { - logfile(LOG_ERR, - _("Unable to get hardware info about an interface: %s"), -@@ -130,17 +130,18 @@ int fill_mac_address(void) - return -1; - } - lifr = lifc.lifc_req; -- while (--lifn.lifn_count > 0) { -+ for(;;) { -+ if (lifn.lifn_count <= 0) { -+ logfile(LOG_ERR, _("Interface [%s] not found"), interface); -+ ALLOCA_FREE(lifrspace); -+ return -1; -+ } -+ lifn.lifn_count--; - if (strcmp(lifr->lifr_name, interface) == 0) { - break; - } - lifr++; - } -- if (lifn.lifn_count <= 0) { -- logfile(LOG_ERR, _("Interface [%s] not found"), interface); -- ALLOCA_FREE(lifrspace); -- return -1; -- } - memcpy(&arpreq.arp_pa, &lifr->lifr_addr, sizeof arpreq.arp_pa); - ALLOCA_FREE(lifrspace); - if (ioctl(s, SIOCGARP, &arpreq) != 0) { -diff -Naupr ucarp-1.2/src/garp.c ucarp-1.3/src/garp.c ---- ucarp-1.2/src/garp.c 2004-08-28 17:15:30.000000000 +0200 -+++ ucarp-1.3/src/garp.c 2006-05-27 22:14:21.000000000 +0200 -@@ -10,27 +10,30 @@ - int gratuitous_arp(const int dev_desc_fd, const int enable_virtual) - { - static unsigned char arp[28] = { -- 0x00, 0x01, -- 0x08, 0x00, -- 0x06, 0x04, -- 0x00, 0x02, -- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -- 0x00, 0x00, 0x00, 0x00, -- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -- 0xff, 0xff, 0xff, 0xff -+ 0x00, 0x01, /* MAC address type */ -+ 0x08, 0x00, /* Protocol address type */ -+ 0x06, 0x04, /* MAC address size, protocol address size */ -+ 0x00, 0x02, /* OP (1=request, 2=reply) */ -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Sender MAC */ -+ 0x00, 0x00, 0x00, 0x00, /* Sender IP */ -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* Target MAC */ -+ 0xff, 0xff, 0xff, 0xff /* Target IP */ - }; - unsigned char *pkt; - struct ether_header *eh_ptr; - -- memcpy(&arp[8], hwaddr, sizeof hwaddr); -- if (enable_virtual == 0) { -- arp[7] = 0x01; -- memcpy(&arp[24], &vaddr.s_addr, (size_t) 4U); -- memset(&arp[14], 0xff, ETHER_ADDR_LEN); -- } else { -+ if (ETHER_ADDR_LEN > 6) { -+ abort(); -+ } -+ memcpy(&arp[8], hwaddr, sizeof hwaddr); -+ if (enable_virtual != 0) { - arp[7] = 0x02; - memcpy(&arp[14], &vaddr.s_addr, (size_t) 4U); -- memset(&arp[24], 0xff, ETHER_ADDR_LEN); -+ } else { -+ arp[7] = 0x01; -+ memcpy(&arp[14], &vaddr.s_addr, (size_t) 4U); -+ memset(&arp[18], 0xff, ETHER_ADDR_LEN); -+ memcpy(&arp[24], &vaddr.s_addr, (size_t) 4U); - } - if ((pkt = ALLOCA(sizeof *eh_ptr + sizeof arp)) == NULL) { - logfile(LOG_ERR, _("out of memory to send gratuitous ARP")); -diff -Naupr ucarp-1.2/src/gettext.h ucarp-1.3/src/gettext.h ---- ucarp-1.2/src/gettext.h 2004-06-20 14:48:32.000000000 +0200 -+++ ucarp-1.3/src/gettext.h 2006-04-08 12:10:54.000000000 +0200 -@@ -1,5 +1,5 @@ - /* Convenience header for conditional use of GNU . -- Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc. -+ Copyright (C) 1995-1998, 2000-2002, 2004 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published -@@ -13,7 +13,7 @@ - - You should have received a copy of the GNU Library General Public - License along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - USA. */ - - #ifndef _LIBGETTEXT_H -@@ -37,6 +37,16 @@ - # include - #endif - -+/* Many header files from the libstdc++ coming with g++ 3.3 or newer include -+ , which chokes if dcgettext is defined as a macro. So include -+ it now, to make later inclusions of a NOP. */ -+#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) -+# include -+# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H -+# include -+# endif -+#endif -+ - /* Disabled NLS. - The casts to 'const char *' serve the purpose of producing warnings - for invalid uses of the value returned from these functions. -diff -Naupr ucarp-1.2/src/globals.h ucarp-1.3/src/globals.h ---- ucarp-1.2/src/globals.h 2006-02-18 23:36:15.000000000 +0100 -+++ ucarp-1.3/src/globals.h 2006-05-27 22:26:35.000000000 +0200 -@@ -27,4 +27,6 @@ GLOBAL0(signed char no_syslog); - GLOBAL0(signed char daemonize); - GLOBAL(int syslog_facility, DEFAULT_FACILITY); - -+GLOBAL0(char *vaddr_arg); -+GLOBAL0(char *xparam); - #endif -diff -Naupr ucarp-1.2/src/spawn.c ucarp-1.3/src/spawn.c ---- ucarp-1.2/src/spawn.c 2004-08-28 17:15:26.000000000 +0200 -+++ ucarp-1.3/src/spawn.c 2006-05-27 22:27:05.000000000 +0200 -@@ -20,7 +20,7 @@ int spawn_handler(const int dev_desc_fd, - pid = fork(); - if (pid == (pid_t) 0) { - (void) close(dev_desc_fd); -- execl(script, script, interface, (char *) NULL); -+ execl(script, script, interface, vaddr_arg, xparam, (char *) NULL); - _exit(EXIT_FAILURE); - } else if (pid != (pid_t) -1) { - logfile(LOG_WARNING, _("Spawning [%s %s]"), script, interface); -diff -Naupr ucarp-1.2/src/ucarp.c ucarp-1.3/src/ucarp.c ---- ucarp-1.2/src/ucarp.c 2006-02-21 00:06:08.000000000 +0100 -+++ ucarp-1.3/src/ucarp.c 2006-05-27 22:29:54.000000000 +0200 -@@ -39,6 +39,7 @@ static void usage(void) - "--shutdown (-z): call shutdown script at exit\n" - "--daemonize (-B): run in background\n" - "--facility= (-f): set syslog facility (default=daemon)\n" -+ "--xparam= (-x): extra parameter to send to up/down scripts\n" - "\n" - "Sample usage:\n" - "\n" -@@ -133,11 +134,13 @@ int main(int argc, char *argv[]) - break; - } - case 'a': { -+ free(vaddr_arg); - if (inet_pton(AF_INET, optarg, &vaddr) == 0) { - logfile(LOG_ERR, _("Invalid address: [%s]"), optarg); - return 1; -- } -- break; -+ } -+ vaddr_arg = strdup(optarg); -+ break; - } - case 'b': { - advbase = (unsigned char) strtoul(optarg, NULL, 0); -@@ -190,7 +193,14 @@ int main(int argc, char *argv[]) - logfile(LOG_ERR, _("Unknown syslog facility: [%s]"), optarg); - } - break; -- } -+ } -+ case 'm': { -+ free(xparam); -+ if ((xparam = strdup(optarg)) == NULL) { -+ die_mem(); -+ } -+ break; -+ } - default: { - usage(); - } -diff -Naupr ucarp-1.2/src/ucarp.h ucarp-1.3/src/ucarp.h ---- ucarp-1.2/src/ucarp.h 2004-08-28 18:10:28.000000000 +0200 -+++ ucarp-1.3/src/ucarp.h 2006-06-04 15:49:09.000000000 +0200 -@@ -210,6 +210,7 @@ struct carp_softc { - #define CARP_AUTHLEN 7 - #define DEFAULT_ADVBASE 1U - #define DEFAULT_DEAD_RATIO 3U -+#define SECONDS_TO_WAIT_AFTER_INTERFACE_IS_DOWN 10U - - #define DEFAULT_FACILITY LOG_DAEMON - -diff -Naupr ucarp-1.2/src/ucarp_p.h ucarp-1.3/src/ucarp_p.h ---- ucarp-1.2/src/ucarp_p.h 2006-02-18 23:36:33.000000000 +0100 -+++ ucarp-1.3/src/ucarp_p.h 2006-05-27 22:30:32.000000000 +0200 -@@ -1,7 +1,7 @@ - #ifndef __CARP_P_H__ - #define __CARP_P_H__ 1 - --static const char *GETOPT_OPTIONS = "i:s:v:p:Pa:hb:k:u:d:r:zf:B"; -+static const char *GETOPT_OPTIONS = "i:s:v:p:Pa:hb:k:m:nu:d:r:zf:B"; - - static struct option long_options[] = { - { "interface", 1, NULL, 'i' }, -@@ -20,6 +20,7 @@ static struct option long_options[] = { - { "shutdown", 0, NULL, 'z' }, - { "facility", 1, NULL, 'f' }, - { "daemonize", 0, NULL, 'B' }, -+ { "xparam", 1, NULL, 'm' }, - { NULL, 0, NULL, 0 } - }; - diff --git a/ucarp.init b/ucarp.init index 2512226..edaf06d 100755 --- a/ucarp.init +++ b/ucarp.init @@ -19,11 +19,10 @@ get_files() { } prog=$"common address redundancy protocol daemon" -OUR_INITLOG_ARGS="-n ucarp -e 2 -s" -OUR_INITLOG="initlog ${OUR_INITLOG_ARGS}" +LOGGER="/usr/bin/logger -p daemon.notice -t ucarp" CONFDIR=/etc/ucarp -UPSCRIPT=${CONFDIR}/vip-up -DOWNSCRIPT=${CONFDIR}/vip-down +UPSCRIPT=/usr/libexec/ucarp/vip-up +DOWNSCRIPT=/usr/libexec/ucarp/vip-down start() { RETVAL=-1 @@ -34,32 +33,38 @@ start() { get_files if [ -z "${FILES}" ]; then - failure $"no virtual addresses are configured in ${CONFDIR}:" + ${LOGGER} "no virtual addresses are configured in ${CONFDIR}" + failure 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}:" + ${LOGGER} "ID out of range (1-255) for ${FILE}, skipped VIP ID ${ID}" continue fi - unset PASSWORD BIND_INTERFACE BIND_ADDRESS VIP OPTIONS + unset PASSWORD BIND_INTERFACE SOURCE_ADDRESS VIP_ADDRESS OPTIONS # Source ucarp settings + . ${CONFDIR}/vip-common.conf . ${CONFDIR}/${FILE} TMP_RETVAL=0 if [ -z "${PASSWORD}" ]; then - ${OUR_INITLOG} $"no PASSWORD found in ${FILE}, skipped VIP ID ${ID}:" + ${LOGGER} "no PASSWORD found for ${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}:" + if [ -z "${BIND_INTERFACE}" ]; then + ${LOGGER} "no BIND_INTERFACE found for ${FILE}, skipped VIP ID ${ID}" + TMP_RETVAL=1 + fi + if [ -z "${SOURCE_ADDRESS}" ]; then + ${LOGGER} "no SOURCE_ADDRESS found for ${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}:" + ${LOGGER} "no VIP_ADDRESS found for ${FILE}, skipped VIP ID ${ID}" TMP_RETVAL=1 fi @@ -70,19 +75,22 @@ start() { 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 + daemon /usr/sbin/ucarp --daemonize --interface=${BIND_INTERFACE} --pass=${PASSWORD} --srcip=${SOURCE_ADDRESS} --vhid=${ID} --addr=${VIP_ADDRESS} ${OPTIONS} --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:" + ${LOGGER} "all ucarp configurations were applied successfully" + success 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:" + ${LOGGER} "error in one or more of the ucarp configurations" + warning else - failure $"error running one or more of the ucarp daemon instances:" + ${LOGGER} "error running one or more of the ucarp daemon instances" + failure fi fi echo @@ -93,27 +101,16 @@ stop() { 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 + # With "--shutdown" in the default OPTIONS, the down script is called + # when ucarp is stopped, so IP addresses are released, no "leftovers". # failure/success (no warning, too complicated to handle properly) if [ ${RETVAL} -eq 1 ]; then - failure $"it seems like no ucarp daemon were running:" + ${LOGGER} "it seems like no ucarp daemon were running" + failure else - success $"all ucarp daemons stopped and IP addresses unassigned:" + ${LOGGER} "all ucarp daemons stopped and IP addresses unassigned" + success rm -f /var/lock/subsys/ucarp fi echo diff --git a/ucarp.spec b/ucarp.spec index 606eb21..27b0d95 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,7 +1,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp -Version: 1.2 -Release: 9%{?dist} +Version: 1.4 +Release: 1%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -9,11 +9,10 @@ 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 +Source3: vip-common.conf Source4: vip-up Source5: vip-down -Source6: vip-helper.sh -Patch0: ucarp-1.3-pre.patch +#Source6: vip-helper.sh BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig, /sbin/service @@ -34,7 +33,6 @@ need for any dedicated extra network link between redundant hosts. %prep %setup -q -%patch -p1 %build @@ -52,14 +50,15 @@ need for any dedicated extra network link between redundant hosts. %{buildroot}/etc/rc.d/init.d/ucarp %{__mkdir_p} %{buildroot}/etc/ucarp +%{__mkdir_p} %{buildroot}%{_libexecdir}/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/ +%{__install} -D -p -m 0700 %{SOURCE4} %{SOURCE5} \ + %{buildroot}%{_libexecdir}/ucarp/ %clean @@ -93,15 +92,19 @@ fi %doc AUTHORS COPYING ChangeLog NEWS README /etc/rc.d/init.d/ucarp %attr(0700,root,root) %dir /etc/ucarp/ +%config(noreplace) /etc/ucarp/vip-common.conf /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 +%{_libexecdir}/ucarp/ %{_sbindir}/ucarp %changelog +* Sun Feb 3 2008 Matthias Saou 1.4-1 +- Update to 1.4. +- Rip out all of the "list" stuff and 255.255.255.255 address hack (#427495). +- Change from INITLOG (now deprecated) to LOGGER in the init script. +- Move helper scripts to /usr/libexec/ucarp/. + * Thu Aug 23 2007 Matthias Saou 1.2-9 - Rebuild for new BuildID feature. diff --git a/vip-001.conf.example b/vip-001.conf.example index cbfbf83..0bbc5ba 100644 --- a/vip-001.conf.example +++ b/vip-001.conf.example @@ -1,47 +1,10 @@ # 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" +# network to be taken over by one of the routers. +VIP_ADDRESS="10.0.0.254" -# 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" +# In more complex scenarios, check the "vip-common" file for values to override +# and how to add options. -# If you have extra options to add, see "ucarp --help" output -# (the lower the "-k " 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= (-b ): advertisement frequency -# --advskew= (-k ): advertisement skew (0-255) -# The rest of options list is built up by the UCARP initscript. - -OPTIONS="-k 128 -P" diff --git a/vip-001.list.example b/vip-001.list.example deleted file mode 100644 index ac5a5ad..0000000 --- a/vip-001.list.example +++ /dev/null @@ -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 - diff --git a/vip-down b/vip-down index bbe78c0..fab9a8f 100755 --- a/vip-down +++ b/vip-down @@ -1,26 +1,5 @@ #!/bin/sh +exec 2>/dev/null -usage() -{ - echo "This script is intended to be run by the UCARP daemon." - echo "Usage: $0 " - echo "Usage: $0 <255.255.255.255> " - 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 +/sbin/ip address del "$2"/32 dev "$1" diff --git a/vip-helper.sh b/vip-helper.sh deleted file mode 100755 index 46c9d47..0000000 --- a/vip-helper.sh +++ /dev/null @@ -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 - diff --git a/vip-up b/vip-up index b00106f..166729c 100755 --- a/vip-up +++ b/vip-up @@ -1,26 +1,5 @@ #!/bin/sh +exec 2>/dev/null -usage() -{ - echo "This script is intended to be run by the UCARP daemon." - echo "Usage: $0 " - echo "Usage: $0 <255.255.255.255> " - 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 +/sbin/ip address add "$2"/32 dev "$1" From eaa85561dccb23ccdcbe66b5f0bf13c394a9f722 Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Sun, 3 Feb 2008 19:52:36 +0000 Subject: [PATCH 19/72] Add vip-common.conf, missed in the previous commit. --- vip-common.conf | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 vip-common.conf diff --git a/vip-common.conf b/vip-common.conf new file mode 100644 index 0000000..1a858b4 --- /dev/null +++ b/vip-common.conf @@ -0,0 +1,8 @@ +# Common VIP settings which can be overridden in individual vip-.conf +PASSWORD="love" +BIND_INTERFACE="eth0" +SOURCE_ADDRESS="" + +# If you have extra options to add, see "ucarp --help" output +OPTIONS="--shutdown --preempt" + From ac8da6f49ef8b11502db190d96772e9eb2868d43 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 25 Feb 2009 22:26:34 +0000 Subject: [PATCH 20/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 27b0d95..658f225 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,7 +1,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.4 -Release: 1%{?dist} +Release: 2%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -99,6 +99,9 @@ fi %changelog +* Wed Feb 25 2009 Fedora Release Engineering - 1.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Sun Feb 3 2008 Matthias Saou 1.4-1 - Update to 1.4. - Rip out all of the "list" stuff and 255.255.255.255 address hack (#427495). From fd6dcdfb01b5f43147c4166d56a84a704d56f257 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Mon, 13 Apr 2009 13:56:19 +0000 Subject: [PATCH 21/72] 1.5, initscript fix. --- .cvsignore | 2 +- sources | 2 +- ucarp.init | 10 ++++++++++ ucarp.spec | 10 +++++++--- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 778206f..eb63788 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -ucarp-1.4.tar.bz2 +ucarp-1.5.tar.bz2 diff --git a/sources b/sources index 377eabe..5c48d2b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9e1765de2eea1bb59c9ad9c8596f4f89 ucarp-1.4.tar.bz2 +5b50ca5553bc520f4e639964c9ad5056 ucarp-1.5.tar.bz2 diff --git a/ucarp.init b/ucarp.init index edaf06d..c7f6296 100755 --- a/ucarp.init +++ b/ucarp.init @@ -4,6 +4,16 @@ # chkconfig: - 91 09 # description: Starts and stops the common address redundancy protocol daemon +### BEGIN INIT INFO +# Provides: lsb-ucarp +# Required-Start: $local_fs $network $remote_fs +# Required-Stop: $local_fs $network $remote_fs +# Default-Start: +# Default-Stop: 0 1 6 +# Short-Description: start and stop ucarp +# Description: Common Address Redundancy Protocol (CARP) for Unix +### END INIT INFO + # Source function library. . /etc/init.d/functions diff --git a/ucarp.spec b/ucarp.spec index 658f225..0da0a6f 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,7 +1,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp -Version: 1.4 -Release: 2%{?dist} +Version: 1.5 +Release: 1%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -97,8 +97,12 @@ fi %{_libexecdir}/ucarp/ %{_sbindir}/ucarp - %changelog +* Mon Apr 13 2009 Jon Ciesla - 1.5-1 +- Update to 1.5 BZ 458767. +- Added LSB header to init script, BZ 247082. +- New upstream should address BZ 427495, 449266, 455394. + * Wed Feb 25 2009 Fedora Release Engineering - 1.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild From c6a1471c08dd542da50457b8484da339918822d9 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Wed, 8 Jul 2009 18:39:20 +0000 Subject: [PATCH 22/72] 1.5.1 --- .cvsignore | 2 +- sources | 2 +- ucarp.spec | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index eb63788..481c503 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -ucarp-1.5.tar.bz2 +ucarp-1.5.1.tar.bz2 diff --git a/sources b/sources index 5c48d2b..0c1d427 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5b50ca5553bc520f4e639964c9ad5056 ucarp-1.5.tar.bz2 +9219ea8214198e8af751353a132087bb ucarp-1.5.1.tar.bz2 diff --git a/ucarp.spec b/ucarp.spec index 0da0a6f..77aaf4c 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,6 +1,6 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp -Version: 1.5 +Version: 1.5.1 Release: 1%{?dist} # See the COPYING file which details everything License: MIT and BSD @@ -98,6 +98,11 @@ fi %{_sbindir}/ucarp %changelog +* Wed Jul 08 2009 Jon Ciesla - 1.5.1-1 +- New upstream. +- New option (--nomcast / -M) to use broadcast +- advertisements instead of multicast ones. + * Mon Apr 13 2009 Jon Ciesla - 1.5-1 - Update to 1.5 BZ 458767. - Added LSB header to init script, BZ 247082. From 62d07c579c7947c92b36fd225c2ca8f72a90b980 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Mon, 27 Jul 2009 06:26:06 +0000 Subject: [PATCH 23/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 77aaf4c..5480809 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,7 +1,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.1 -Release: 1%{?dist} +Release: 2%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -98,6 +98,9 @@ fi %{_sbindir}/ucarp %changelog +* Sun Jul 26 2009 Fedora Release Engineering - 1.5.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Wed Jul 08 2009 Jon Ciesla - 1.5.1-1 - New upstream. - New option (--nomcast / -M) to use broadcast From c423aa22b8e895edb0d93dacf8be2c48c9dbb9a6 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 22:52:45 +0000 Subject: [PATCH 24/72] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 503525f..d64a615 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ 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 +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 563767d6185b2c4fc9dc1fdaa3866950d933505b Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Wed, 28 Apr 2010 18:27:30 +0000 Subject: [PATCH 25/72] New upstream, noreplace for vip-up and vip-down. --- .cvsignore | 2 +- sources | 2 +- ucarp.spec | 12 +++++++++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 481c503..23c53b8 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -ucarp-1.5.1.tar.bz2 +ucarp-1.5.2.tar.bz2 diff --git a/sources b/sources index 0c1d427..a0b412a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9219ea8214198e8af751353a132087bb ucarp-1.5.1.tar.bz2 +723636dbf79fc6abd329a71ec4ddf79d ucarp-1.5.2.tar.bz2 diff --git a/ucarp.spec b/ucarp.spec index 5480809..8560cb0 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,7 +1,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp -Version: 1.5.1 -Release: 2%{?dist} +Version: 1.5.2 +Release: 1%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -94,10 +94,16 @@ fi %attr(0700,root,root) %dir /etc/ucarp/ %config(noreplace) /etc/ucarp/vip-common.conf /etc/ucarp/vip-001.conf.example -%{_libexecdir}/ucarp/ +%config(noreplace) %{_libexecdir}/ucarp/ %{_sbindir}/ucarp %changelog +* Wed Apr 28 2010 Jon Ciesla - 1.5.2-1 +- New upstream. +- Uses arc4random() if available. +- Avoids adverts that might be twice as what they should be. +- Marked vip-up and vip-down config(noreplace), BZ 586893. + * Sun Jul 26 2009 Fedora Release Engineering - 1.5.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild From 30370f76758aeb5c42055b599ebeeb2406cfaeca Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 14:36:22 +0000 Subject: [PATCH 26/72] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- 2 files changed, 21 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index d64a615..0000000 --- a/Makefile +++ /dev/null @@ -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 $$d/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) From 5b318e1d06bbd44e2d972944898a28671df4bf49 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Mon, 7 Feb 2011 17:53:48 -0600 Subject: [PATCH 27/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 8560cb0..0e7c13b 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,7 +1,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 1%{?dist} +Release: 2%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -98,6 +98,9 @@ fi %{_sbindir}/ucarp %changelog +* Mon Feb 07 2011 Fedora Release Engineering - 1.5.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Wed Apr 28 2010 Jon Ciesla - 1.5.2-1 - New upstream. - Uses arc4random() if available. From 414ca79f7a72167cabe80a5b41e789f04cf77a15 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 14 Jan 2012 01:24:10 -0600 Subject: [PATCH 28/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 0e7c13b..140d261 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,7 +1,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 2%{?dist} +Release: 3%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -98,6 +98,9 @@ fi %{_sbindir}/ucarp %changelog +* Sat Jan 14 2012 Fedora Release Engineering - 1.5.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Mon Feb 07 2011 Fedora Release Engineering - 1.5.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From d6dd6869c49acd5d9ef318a28ed05c9f39aabc37 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Wed, 14 Mar 2012 10:50:03 -0500 Subject: [PATCH 29/72] Migrate to systemd. --- ucarp | 142 +++++++++++++++++++++++++++++++++++++++++++++++++++++ ucarp.spec | 50 +++++++++++++------ 2 files changed, 177 insertions(+), 15 deletions(-) create mode 100755 ucarp diff --git a/ucarp b/ucarp new file mode 100755 index 0000000..a9e0631 --- /dev/null +++ b/ucarp @@ -0,0 +1,142 @@ +#!/bin/bash + +# 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" +LOGGER="/usr/bin/logger -p daemon.notice -t ucarp" +CONFDIR=/etc/ucarp +UPSCRIPT=/usr/libexec/ucarp/vip-up +DOWNSCRIPT=/usr/libexec/ucarp/vip-down + +start() { + RETVAL=-1 + VIP_RETVAL=0 + + echo -n $"Starting ${prog}: " + + get_files + + if [ -z "${FILES}" ]; then + ${LOGGER} "no virtual addresses are configured in ${CONFDIR}" + failure + 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 + ${LOGGER} "ID out of range (1-255) for ${FILE}, skipped VIP ID ${ID}" + continue + fi + + unset PASSWORD BIND_INTERFACE SOURCE_ADDRESS VIP_ADDRESS OPTIONS + # Source ucarp settings + . ${CONFDIR}/vip-common.conf + . ${CONFDIR}/${FILE} + TMP_RETVAL=0 + + if [ -z "${PASSWORD}" ]; then + ${LOGGER} "no PASSWORD found for ${FILE}, skipped VIP ID ${ID}" + TMP_RETVAL=1 + fi + if [ -z "${BIND_INTERFACE}" ]; then + ${LOGGER} "no BIND_INTERFACE found for ${FILE}, skipped VIP ID ${ID}" + TMP_RETVAL=1 + fi + if [ -z "${SOURCE_ADDRESS}" ]; then + ${LOGGER} "no SOURCE_ADDRESS found for ${FILE}, skipped VIP ID ${ID}" + TMP_RETVAL=1 + fi + if [ -z "${VIP_ADDRESS}" ]; then + ${LOGGER} "no VIP_ADDRESS found for ${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 --daemonize --interface=${BIND_INTERFACE} --pass=${PASSWORD} --srcip=${SOURCE_ADDRESS} --vhid=${ID} --addr=${VIP_ADDRESS} ${OPTIONS} --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 + ${LOGGER} "all ucarp configurations were applied successfully" + success + touch /var/lock/subsys/ucarp + elif [ ${RETVAL} -eq 0 -a ${VIP_RETVAL} -eq 1 ]; then + ${LOGGER} "error in one or more of the ucarp configurations" + warning + else + ${LOGGER} "error running one or more of the ucarp daemon instances" + failure + fi + fi + echo +} + +stop() { + echo -n $"Stopping $prog: " + killproc /usr/sbin/ucarp >/dev/null + RETVAL=$? + + # With "--shutdown" in the default OPTIONS, the down script is called + # when ucarp is stopped, so IP addresses are released, no "leftovers". + + # failure/success (no warning, too complicated to handle properly) + if [ ${RETVAL} -eq 1 ]; then + ${LOGGER} "it seems like no ucarp daemon were running" + failure + else + ${LOGGER} "all ucarp daemons stopped and IP addresses unassigned" + success + 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 +start +exit $RETVAL + diff --git a/ucarp.spec b/ucarp.spec index 140d261..15c2359 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,22 +1,23 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 3%{?dist} +Release: 4%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons URL: http://www.ucarp.org/ Source0: http://download.pureftpd.org/pub/ucarp/ucarp-%{version}.tar.bz2 -Source1: ucarp.init +Source1: ucarp@.service Source2: vip-001.conf.example Source3: vip-common.conf Source4: vip-up Source5: vip-down #Source6: vip-helper.sh +Source7: ucarp BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -Requires(post): /sbin/chkconfig -Requires(preun): /sbin/chkconfig, /sbin/service -Requires(postun): /sbin/service +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units BuildRequires: gettext BuildRequires: autoconf, automake, libtool BuildRequires: libpcap-devel @@ -45,9 +46,9 @@ need for any dedicated extra network link between redundant hosts. %{__make} install DESTDIR=%{buildroot} %find_lang %{name} -# Install the init script +# Install the unit file %{__install} -D -p -m 0755 %{SOURCE1} \ - %{buildroot}/etc/rc.d/init.d/ucarp + %{buildroot}%{_unitdir}/ucarp@.service %{__mkdir_p} %{buildroot}/etc/ucarp %{__mkdir_p} %{buildroot}%{_libexecdir}/ucarp @@ -57,7 +58,7 @@ need for any dedicated extra network link between redundant hosts. %{buildroot}/etc/ucarp/ # Install helper scripts -%{__install} -D -p -m 0700 %{SOURCE4} %{SOURCE5} \ +%{__install} -D -p -m 0700 %{SOURCE4} %{SOURCE5} %{SOURCE7} \ %{buildroot}%{_libexecdir}/ucarp/ @@ -73,24 +74,40 @@ if [ -f /etc/rc.d/init.d/carp ]; then fi %post -/sbin/chkconfig --add ucarp +if [ $1 -eq 1 ] ; then + # Initial installation + /bin/systemctl daemon-reload >/dev/null 2>&1 || : +fi %preun -if [ $1 -eq 0 ]; then - /sbin/service ucarp stop &>/dev/null || : - /sbin/chkconfig --del ucarp +if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable ucarp@.service > /dev/null 2>&1 || : + /bin/systemctl stop ucarp@.service > /dev/null 2>&1 || : fi %postun -if [ $1 -ge 1 ]; then - /sbin/service ucarp condrestart &>/dev/null || : +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +if [ $1 -ge 1 ] ; then + # Package upgrade, not uninstall + /bin/systemctl try-restart ucarp@.service >/dev/null 2>&1 || : fi +%triggerun -- ucarp < 1.5.2-4 +# Save the current service runlevel info +# User must manually run systemd-sysv-convert --apply ucarp +# to migrate them to systemd targets +/usr/bin/systemd-sysv-convert --save ucarp >/dev/null 2>&1 ||: + +# Run these because the SysV package being removed won't do them +/sbin/chkconfig --del ucarp >/dev/null 2>&1 || : +/bin/systemctl try-restart ucarp@.service >/dev/null 2>&1 || : + %files -f %{name}.lang %defattr(-,root,root,-) %doc AUTHORS COPYING ChangeLog NEWS README -/etc/rc.d/init.d/ucarp +%{_unitdir}/ucarp@.service %attr(0700,root,root) %dir /etc/ucarp/ %config(noreplace) /etc/ucarp/vip-common.conf /etc/ucarp/vip-001.conf.example @@ -98,6 +115,9 @@ fi %{_sbindir}/ucarp %changelog +* Wed Mar 14 2012 Jon Ciesla - 1.5.2-4 +- Migrate to systemd, BZ 800498. + * Sat Jan 14 2012 Fedora Release Engineering - 1.5.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild From e53bbcc55ba7c18ac831c212f6c745ec223119f9 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Wed, 14 Mar 2012 10:53:57 -0500 Subject: [PATCH 30/72] Add unit file. --- ucarp@.service | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 ucarp@.service diff --git a/ucarp@.service b/ucarp@.service new file mode 100644 index 0000000..f5a63f0 --- /dev/null +++ b/ucarp@.service @@ -0,0 +1,11 @@ +[Unit] +Description=Common address redundancy protocol daemon on %I +After=syslog.target network.target + +[Service] +PrivateTmp=true +Type=forking +ExecStart=/usr/libexec/ucarp/ucarp + +[Install] +WantedBy=multi-user.target From a46ac137b6c34c4abd93607177c69b7d39495626 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Fri, 13 Apr 2012 07:16:33 -0500 Subject: [PATCH 31/72] Add hardened build. --- ucarp.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 15c2359..b2c02c6 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,7 +1,8 @@ +%define _hardened_build 1 Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 4%{?dist} +Release: 5%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -115,6 +116,9 @@ fi %{_sbindir}/ucarp %changelog +* Fri Apr 13 2012 Jon Ciesla - 1.5.2-5 +- Add hardened build. + * Wed Mar 14 2012 Jon Ciesla - 1.5.2-4 - Migrate to systemd, BZ 800498. From 9b61e32be34c5c7e4c8e9124008af8261331a2cf Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 21 Jul 2012 20:16:11 -0500 Subject: [PATCH 32/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index b2c02c6..531f85e 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 5%{?dist} +Release: 6%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -116,6 +116,9 @@ fi %{_sbindir}/ucarp %changelog +* Sun Jul 22 2012 Fedora Release Engineering - 1.5.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Fri Apr 13 2012 Jon Ciesla - 1.5.2-5 - Add hardened build. From ef008cc828bbeba1980d42a700b1ffcf35bb26e6 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Thu, 25 Oct 2012 09:28:56 -0500 Subject: [PATCH 33/72] Fix crash. --- ucarp.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 531f85e..379fc37 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 6%{?dist} +Release: 7%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -15,6 +15,7 @@ Source4: vip-up Source5: vip-down #Source6: vip-helper.sh Source7: ucarp +Patch0: ucarp-1.5.2-sighup.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires(post): systemd-units Requires(preun): systemd-units @@ -36,6 +37,7 @@ need for any dedicated extra network link between redundant hosts. %prep %setup -q +%patch0 -p0 %build %configure @@ -116,6 +118,9 @@ fi %{_sbindir}/ucarp %changelog +* Thu Oct 25 2012 Jon Ciesla - 1.5.2-7 +- Patch to fix crash, BZ 693762. + * Sun Jul 22 2012 Fedora Release Engineering - 1.5.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 35d35131f902d60308821ce1c8800c2956552f55 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Thu, 25 Oct 2012 09:31:00 -0500 Subject: [PATCH 34/72] Add patch. --- ucarp-1.5.2-sighup.patch | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 ucarp-1.5.2-sighup.patch diff --git a/ucarp-1.5.2-sighup.patch b/ucarp-1.5.2-sighup.patch new file mode 100644 index 0000000..8135233 --- /dev/null +++ b/ucarp-1.5.2-sighup.patch @@ -0,0 +1,10 @@ +--- src/carp.c~ 2010-01-31 15:59:12.000000000 -0600 ++++ src/carp.c 2012-10-25 09:25:54.949976635 -0500 +@@ -762,6 +762,7 @@ + + if (shutdown_at_exit != 0) { + (void) signal(SIGINT, sighandler_exit); ++ (void) signal(SIGHUP, sighandler_exit); + (void) signal(SIGQUIT, sighandler_exit); + (void) signal(SIGTERM, sighandler_exit); + } From e1f5a53f2e6fd948c60ef344b3e8abc87da3e7f5 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 14 Feb 2013 20:19:50 -0600 Subject: [PATCH 35/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 379fc37..5882863 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 7%{?dist} +Release: 8%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -118,6 +118,9 @@ fi %{_sbindir}/ucarp %changelog +* Fri Feb 15 2013 Fedora Release Engineering - 1.5.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Thu Oct 25 2012 Jon Ciesla - 1.5.2-7 - Patch to fix crash, BZ 693762. From 17028ce88086a0cdd4df906be9510aa904d2e8cc Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 4 Aug 2013 00:19:26 -0500 Subject: [PATCH 36/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 5882863..ee8083b 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 8%{?dist} +Release: 9%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -118,6 +118,9 @@ fi %{_sbindir}/ucarp %changelog +* Sun Aug 04 2013 Fedora Release Engineering - 1.5.2-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Fri Feb 15 2013 Fedora Release Engineering - 1.5.2-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild From 9f67b01cfc85e60687acc36ce731ee32a84f8de5 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Mon, 5 Aug 2013 12:27:44 -0500 Subject: [PATCH 37/72] Fix FTBFS. --- ucarp.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index ee8083b..be76416 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 9%{?dist} +Release: 10%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -23,6 +23,7 @@ Requires(postun): systemd-units BuildRequires: gettext BuildRequires: autoconf, automake, libtool BuildRequires: libpcap-devel +BuildRequires: systemd %description UCARP allows a couple of hosts to share common virtual IP addresses in order @@ -118,6 +119,9 @@ fi %{_sbindir}/ucarp %changelog +* Mon Aug 05 2013 Jon Ciesla - 1.5.2-10 +- Fix FTBFS, BZ 992829. + * Sun Aug 04 2013 Fedora Release Engineering - 1.5.2-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From f6d89addd0372934c547c1bbd4a4b8f97d3a31eb Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 21:28:05 -0500 Subject: [PATCH 38/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index be76416..045e1de 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 10%{?dist} +Release: 11%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -119,6 +119,9 @@ fi %{_sbindir}/ucarp %changelog +* Sun Jun 08 2014 Fedora Release Engineering - 1.5.2-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Mon Aug 05 2013 Jon Ciesla - 1.5.2-10 - Fix FTBFS, BZ 992829. From e79fe0396b660736defa417652739d08be7013a1 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 18 Aug 2014 06:38:58 +0000 Subject: [PATCH 39/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 045e1de..e9b0178 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 11%{?dist} +Release: 12%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -119,6 +119,9 @@ fi %{_sbindir}/ucarp %changelog +* Mon Aug 18 2014 Fedora Release Engineering - 1.5.2-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sun Jun 08 2014 Fedora Release Engineering - 1.5.2-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 186d33b8f1638853ef91beaef96c1f73088a8477 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 21 Aug 2014 11:53:42 -0600 Subject: [PATCH 40/72] Rebuild for rpm bug 1131960 --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index e9b0178..ee4429f 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 12%{?dist} +Release: 13%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -119,6 +119,9 @@ fi %{_sbindir}/ucarp %changelog +* Thu Aug 21 2014 Kevin Fenzi - 1.5.2-13 +- Rebuild for rpm bug 1131960 + * Mon Aug 18 2014 Fedora Release Engineering - 1.5.2-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 31cec7534a160e94c20b99108cc91b7cac2eb30e Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 19 Jun 2015 01:24:40 +0000 Subject: [PATCH 41/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index ee4429f..2ea69d6 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 13%{?dist} +Release: 14%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -119,6 +119,9 @@ fi %{_sbindir}/ucarp %changelog +* Fri Jun 19 2015 Fedora Release Engineering - 1.5.2-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Thu Aug 21 2014 Kevin Fenzi - 1.5.2-13 - Rebuild for rpm bug 1131960 From b210e49e0520ce2e5b1ab8a090c23508ad19b6f8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 5 Feb 2016 02:13:31 +0000 Subject: [PATCH 42/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 2ea69d6..f6e6d9b 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 14%{?dist} +Release: 15%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -119,6 +119,9 @@ fi %{_sbindir}/ucarp %changelog +* Fri Feb 05 2016 Fedora Release Engineering - 1.5.2-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Fri Jun 19 2015 Fedora Release Engineering - 1.5.2-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From 97aa08af629e04b25f44c7f7fb5564800076b924 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 16:35:58 +0000 Subject: [PATCH 43/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index f6e6d9b..207f4da 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 15%{?dist} +Release: 16%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -119,6 +119,9 @@ fi %{_sbindir}/ucarp %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 1.5.2-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Fri Feb 05 2016 Fedora Release Engineering - 1.5.2-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 5c7ce0317540d9c54b8b90fa8157644801766f64 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Tue, 14 Mar 2017 12:52:37 -0500 Subject: [PATCH 44/72] systemd cleanup --- ucarp.spec | 37 +++++++------------------------------ 1 file changed, 7 insertions(+), 30 deletions(-) diff --git a/ucarp.spec b/ucarp.spec index 207f4da..c8a994e 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,10 +2,9 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 16%{?dist} +Release: 17%{?dist} # See the COPYING file which details everything License: MIT and BSD -Group: System Environment/Daemons URL: http://www.ucarp.org/ Source0: http://download.pureftpd.org/pub/ucarp/ucarp-%{version}.tar.bz2 Source1: ucarp@.service @@ -16,10 +15,6 @@ Source5: vip-down #Source6: vip-helper.sh Source7: ucarp Patch0: ucarp-1.5.2-sighup.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -Requires(post): systemd-units -Requires(preun): systemd-units -Requires(postun): systemd-units BuildRequires: gettext BuildRequires: autoconf, automake, libtool BuildRequires: libpcap-devel @@ -78,34 +73,13 @@ if [ -f /etc/rc.d/init.d/carp ]; then fi %post -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi +%systemd_post ucarp@.service %preun -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable ucarp@.service > /dev/null 2>&1 || : - /bin/systemctl stop ucarp@.service > /dev/null 2>&1 || : -fi +%systemd_preun ucarp@.service %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart ucarp@.service >/dev/null 2>&1 || : -fi - -%triggerun -- ucarp < 1.5.2-4 -# Save the current service runlevel info -# User must manually run systemd-sysv-convert --apply ucarp -# to migrate them to systemd targets -/usr/bin/systemd-sysv-convert --save ucarp >/dev/null 2>&1 ||: - -# Run these because the SysV package being removed won't do them -/sbin/chkconfig --del ucarp >/dev/null 2>&1 || : -/bin/systemctl try-restart ucarp@.service >/dev/null 2>&1 || : +%systemd_postun_with_restart ucarp@.service %files -f %{name}.lang @@ -119,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Tue Mar 14 2017 Jon Ciesla - 1.5.2-17 +- systemd cleanup + * Sat Feb 11 2017 Fedora Release Engineering - 1.5.2-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 01909a11dec3b53ec26d9742e889a05824b2479b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 20:51:40 +0000 Subject: [PATCH 45/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index c8a994e..bd938d7 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 17%{?dist} +Release: 18%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 1.5.2-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Tue Mar 14 2017 Jon Ciesla - 1.5.2-17 - systemd cleanup From 4907124fd340b18d6ce5f3f4c116f09d5a52ced4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 09:41:32 +0000 Subject: [PATCH 46/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index bd938d7..ae19873 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 18%{?dist} +Release: 19%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 1.5.2-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Thu Jul 27 2017 Fedora Release Engineering - 1.5.2-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 1f9279f88627db33241859f67e2bb7353fa36052 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Tue, 8 Aug 2017 12:07:57 -0500 Subject: [PATCH 47/72] Unit file fix. --- ucarp.spec | 5 ++++- ucarp@.service | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ucarp.spec b/ucarp.spec index ae19873..123ba3e 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 19%{?dist} +Release: 20%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Tue Aug 08 2017 Gwyn Ciesla - 1.5.2-20 +- Correct unit file target. + * Thu Aug 03 2017 Fedora Release Engineering - 1.5.2-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild diff --git a/ucarp@.service b/ucarp@.service index f5a63f0..8097cf7 100644 --- a/ucarp@.service +++ b/ucarp@.service @@ -1,6 +1,6 @@ [Unit] Description=Common address redundancy protocol daemon on %I -After=syslog.target network.target +After=syslog.target network-online.target [Service] PrivateTmp=true From 63773ac56d0b58b7aaa34618a5c83e71f6216b46 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 19:50:47 +0000 Subject: [PATCH 48/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 123ba3e..e4daf0a 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 20%{?dist} +Release: 21%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 1.5.2-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Tue Aug 08 2017 Gwyn Ciesla - 1.5.2-20 - Correct unit file target. From 305f99180dddd63fb3e04e016df7539e225ad907 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Wed, 14 Feb 2018 09:13:50 +0100 Subject: [PATCH 49/72] 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 --- ucarp.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/ucarp.spec b/ucarp.spec index e4daf0a..c009716 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -61,9 +61,6 @@ need for any dedicated extra network link between redundant hosts. %{buildroot}%{_libexecdir}/ucarp/ -%clean -%{__rm} -rf %{buildroot} - %pre # Legacy, in case we update from an older package where the service was "carp" From d5dcab08e2356918a59b76d7615d7ea18898f83b Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Tue, 27 Feb 2018 08:23:51 -0600 Subject: [PATCH 50/72] Move from PASSWORD to PASSFILE. --- ucarp | 17 ++++++++++------- ucarp.spec | 9 +++++++-- ucarp@.service | 4 ++-- vip-001.pwd.example | 1 + vip-common.conf | 2 +- 5 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 vip-001.pwd.example diff --git a/ucarp b/ucarp index a9e0631..284de14 100755 --- a/ucarp +++ b/ucarp @@ -7,10 +7,11 @@ . /etc/sysconfig/network # Check that networking is up. -[ ${NETWORKING} = "no" ] && exit 0 +#[ ${NETWORKING} = "no" ] && exit 0 get_files() { - FILES=`find ${CONFDIR} -maxdepth 1 -type f -name 'vip-*.conf' \ + _cfg=$1 + FILES=`find ${CONFDIR} -maxdepth 1 -type f -name "vip-${_cfg}.conf" \ -printf "%f\n" | egrep '^vip-[[:digit:]]+\.conf$' | LC_COLLATE="C" sort` } @@ -20,13 +21,15 @@ CONFDIR=/etc/ucarp UPSCRIPT=/usr/libexec/ucarp/vip-up DOWNSCRIPT=/usr/libexec/ucarp/vip-down +config=$2 + start() { RETVAL=-1 VIP_RETVAL=0 echo -n $"Starting ${prog}: " - get_files + get_files $config if [ -z "${FILES}" ]; then ${LOGGER} "no virtual addresses are configured in ${CONFDIR}" @@ -41,14 +44,14 @@ start() { continue fi - unset PASSWORD BIND_INTERFACE SOURCE_ADDRESS VIP_ADDRESS OPTIONS + #unset PASSWORD BIND_INTERFACE SOURCE_ADDRESS VIP_ADDRESS OPTIONS # Source ucarp settings . ${CONFDIR}/vip-common.conf . ${CONFDIR}/${FILE} TMP_RETVAL=0 - if [ -z "${PASSWORD}" ]; then - ${LOGGER} "no PASSWORD found for ${FILE}, skipped VIP ID ${ID}" + if [ -z "${PASSFILE}" ]; then + ${LOGGER} "no PASSFILE found for ${FILE}, skipped VIP ID ${ID}" TMP_RETVAL=1 fi if [ -z "${BIND_INTERFACE}" ]; then @@ -71,7 +74,7 @@ start() { fi [ ${RETVAL} -eq -1 ] && RETVAL=0 - daemon /usr/sbin/ucarp --daemonize --interface=${BIND_INTERFACE} --pass=${PASSWORD} --srcip=${SOURCE_ADDRESS} --vhid=${ID} --addr=${VIP_ADDRESS} ${OPTIONS} --upscript=$UPSCRIPT --downscript=$DOWNSCRIPT >/dev/null + daemon /usr/sbin/ucarp --daemonize --interface=${BIND_INTERFACE} --passfile=${PASSFILE} --srcip=${SOURCE_ADDRESS} --vhid=${ID} --addr=${VIP_ADDRESS} ${OPTIONS} --upscript=$UPSCRIPT --downscript=$DOWNSCRIPT >/dev/null LAUNCH_RETVAL=$? [ ${LAUNCH_RETVAL} -ne 0 ] && RETVAL=1 done diff --git a/ucarp.spec b/ucarp.spec index c009716..6b7a269 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 21%{?dist} +Release: 22%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -14,6 +14,7 @@ Source4: vip-up Source5: vip-down #Source6: vip-helper.sh Source7: ucarp +Source8: vip-001.pwd.example Patch0: ucarp-1.5.2-sighup.patch BuildRequires: gettext BuildRequires: autoconf, automake, libtool @@ -53,7 +54,7 @@ need for any dedicated extra network link between redundant hosts. %{__mkdir_p} %{buildroot}%{_libexecdir}/ucarp # Install the example config files -%{__install} -D -p -m 0600 %{SOURCE2} %{SOURCE3} \ +%{__install} -D -p -m 0600 %{SOURCE2} %{SOURCE3} %{SOURCE8} \ %{buildroot}/etc/ucarp/ # Install helper scripts @@ -86,10 +87,14 @@ fi %attr(0700,root,root) %dir /etc/ucarp/ %config(noreplace) /etc/ucarp/vip-common.conf /etc/ucarp/vip-001.conf.example +/etc/ucarp/vip-001.pwd.example %config(noreplace) %{_libexecdir}/ucarp/ %{_sbindir}/ucarp %changelog +* Mon Feb 26 2018 Gwyn Ciesla - 1.5.2-22 +- Incorporate systemd tweaks from Hans-Werner Jouy. + * Fri Feb 09 2018 Fedora Release Engineering - 1.5.2-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/ucarp@.service b/ucarp@.service index 8097cf7..e4ef795 100644 --- a/ucarp@.service +++ b/ucarp@.service @@ -1,11 +1,11 @@ [Unit] -Description=Common address redundancy protocol daemon on %I +Description=Common address redundancy protocol daemon, config: vip-%I.conf After=syslog.target network-online.target [Service] PrivateTmp=true Type=forking -ExecStart=/usr/libexec/ucarp/ucarp +ExecStart=/usr/libexec/ucarp/ucarp start %i [Install] WantedBy=multi-user.target diff --git a/vip-001.pwd.example b/vip-001.pwd.example new file mode 100644 index 0000000..00e6690 --- /dev/null +++ b/vip-001.pwd.example @@ -0,0 +1 @@ +love diff --git a/vip-common.conf b/vip-common.conf index 1a858b4..85dae52 100644 --- a/vip-common.conf +++ b/vip-common.conf @@ -1,5 +1,5 @@ # Common VIP settings which can be overridden in individual vip-.conf -PASSWORD="love" +PASSFILE=/etc/ucarp/vip-001.pwd BIND_INTERFACE="eth0" SOURCE_ADDRESS="" From 5a85ed75369d058b46d40f421c83bcf6ed8a5a21 Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Tue, 10 Jul 2018 01:40:30 -0500 Subject: [PATCH 51/72] Remove needless use of %defattr --- ucarp.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 6b7a269..edda46b 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -81,7 +81,6 @@ fi %files -f %{name}.lang -%defattr(-,root,root,-) %doc AUTHORS COPYING ChangeLog NEWS README %{_unitdir}/ucarp@.service %attr(0700,root,root) %dir /etc/ucarp/ From 1f0f5d5b4539c5ea64c444dfe38195d0d29120ad Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 08:07:29 +0000 Subject: [PATCH 52/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index edda46b..3126d94 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 22%{?dist} +Release: 23%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -91,6 +91,9 @@ fi %{_sbindir}/ucarp %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 1.5.2-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Mon Feb 26 2018 Gwyn Ciesla - 1.5.2-22 - Incorporate systemd tweaks from Hans-Werner Jouy. From 5a1034bcdcacaaf0982caf9358ade511bee2ea49 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 3 Feb 2019 10:38:19 +0000 Subject: [PATCH 53/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 3126d94..0fbc95b 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 23%{?dist} +Release: 24%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -91,6 +91,9 @@ fi %{_sbindir}/ucarp %changelog +* Sun Feb 03 2019 Fedora Release Engineering - 1.5.2-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Sat Jul 14 2018 Fedora Release Engineering - 1.5.2-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 776b2f8823a57314091eba365ca028761a7b0cb1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jul 2019 02:17:30 +0000 Subject: [PATCH 54/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 0fbc95b..1ce5300 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 24%{?dist} +Release: 25%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -91,6 +91,9 @@ fi %{_sbindir}/ucarp %changelog +* Sat Jul 27 2019 Fedora Release Engineering - 1.5.2-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sun Feb 03 2019 Fedora Release Engineering - 1.5.2-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From de9172954165a63410720e0ad70189fad6725075 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 31 Jan 2020 02:24:09 +0000 Subject: [PATCH 55/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 1ce5300..8124a7b 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 25%{?dist} +Release: 26%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -91,6 +91,9 @@ fi %{_sbindir}/ucarp %changelog +* Fri Jan 31 2020 Fedora Release Engineering - 1.5.2-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Sat Jul 27 2019 Fedora Release Engineering - 1.5.2-25 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 175818c8e1f4ba72e78f9331a105db77b69d2789 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Mon, 10 Feb 2020 13:46:07 -0600 Subject: [PATCH 56/72] Fix FTBFS. --- ucarp.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ucarp.spec b/ucarp.spec index 8124a7b..a145205 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 26%{?dist} +Release: 27%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -37,12 +37,12 @@ need for any dedicated extra network link between redundant hosts. %patch0 -p0 %build +export CPPFLAGS="$CPPFLAGS -fcommon" %configure %{__make} %{?_smp_mflags} %install -%{__rm} -rf %{buildroot} %{__make} install DESTDIR=%{buildroot} %find_lang %{name} @@ -81,7 +81,8 @@ fi %files -f %{name}.lang -%doc AUTHORS COPYING ChangeLog NEWS README +%license COPYING +%doc AUTHORS ChangeLog NEWS README %{_unitdir}/ucarp@.service %attr(0700,root,root) %dir /etc/ucarp/ %config(noreplace) /etc/ucarp/vip-common.conf @@ -91,6 +92,9 @@ fi %{_sbindir}/ucarp %changelog +* Mon Feb 10 2020 Gwyn Ciesla - 1.5.2-27 +- Fix FTBFS. + * Fri Jan 31 2020 Fedora Release Engineering - 1.5.2-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From f50886b60c8f08415e70f726c6aeacb6cbaec31d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 13:08:27 +0000 Subject: [PATCH 57/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index a145205..870f26b 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 27%{?dist} +Release: 28%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -92,6 +92,9 @@ fi %{_sbindir}/ucarp %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 1.5.2-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Mon Feb 10 2020 Gwyn Ciesla - 1.5.2-27 - Fix FTBFS. From cc1a63916fdf5823a608c49846d26d3e59799214 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 9 Jan 2021 00:16:38 +0000 Subject: [PATCH 58/72] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- ucarp.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ucarp.spec b/ucarp.spec index 870f26b..29c1010 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -16,6 +16,7 @@ Source5: vip-down Source7: ucarp Source8: vip-001.pwd.example Patch0: ucarp-1.5.2-sighup.patch +BuildRequires: make BuildRequires: gettext BuildRequires: autoconf, automake, libtool BuildRequires: libpcap-devel From 3b54f725247464c499e489448309e3d384a34bf2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 22:32:18 +0000 Subject: [PATCH 59/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 29c1010..b9a8768 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 28%{?dist} +Release: 29%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 1.5.2-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Wed Jul 29 2020 Fedora Release Engineering - 1.5.2-28 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From ac371a9a0f8e0e91626db61b0bd248dda79e323b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 2 Mar 2021 16:12:07 +0100 Subject: [PATCH 60/72] Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. --- ucarp.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index b9a8768..71ea3c4 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 29%{?dist} +Release: 30%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -93,6 +93,10 @@ fi %{_sbindir}/ucarp %changelog +* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 1.5.2-30 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + * Wed Jan 27 2021 Fedora Release Engineering - 1.5.2-29 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 35e9a36e52d4f7fe9b4d649ab029653e6ff25d4b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 19:53:33 +0000 Subject: [PATCH 61/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 71ea3c4..64f7b72 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 30%{?dist} +Release: 31%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 1.5.2-31 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 1.5.2-30 - Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. From 9bf991c5715fcc1fa13b6f0224243de07c121a07 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jan 2022 03:22:35 +0000 Subject: [PATCH 62/72] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 64f7b72..6002ad0 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 31%{?dist} +Release: 32%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Sat Jan 22 2022 Fedora Release Engineering - 1.5.2-32 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Jul 23 2021 Fedora Release Engineering - 1.5.2-31 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 1daec872df9ddc3b7d69b6d7ef9d1630c5508d03 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 11:14:05 +0000 Subject: [PATCH 63/72] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 6002ad0..fa57539 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 32%{?dist} +Release: 33%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 1.5.2-33 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Sat Jan 22 2022 Fedora Release Engineering - 1.5.2-32 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 67176127f72d7b47096ac03854608403f4ba7767 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 05:38:53 +0000 Subject: [PATCH 64/72] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index fa57539..b6d615f 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 33%{?dist} +Release: 34%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Sat Jan 21 2023 Fedora Release Engineering - 1.5.2-34 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Sat Jul 23 2022 Fedora Release Engineering - 1.5.2-33 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 3d0685ad49bd31f295fed92756a119c40d0dd8d6 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Tue, 7 Mar 2023 11:38:24 -0600 Subject: [PATCH 65/72] migrated to SPDX license --- ucarp.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ucarp.spec b/ucarp.spec index b6d615f..0ad6162 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,9 +2,9 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 34%{?dist} +Release: 35%{?dist} # See the COPYING file which details everything -License: MIT and BSD +License: ISC AND BSD-2-Clause URL: http://www.ucarp.org/ Source0: http://download.pureftpd.org/pub/ucarp/ucarp-%{version}.tar.bz2 Source1: ucarp@.service @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Tue Mar 07 2023 Gwyn Ciesla - 1.5.2-35 +- migrated to SPDX license + * Sat Jan 21 2023 Fedora Release Engineering - 1.5.2-34 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 45c2bbe93c76bc9204c49f17c2b938f8f3fa9451 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 16:57:35 +0000 Subject: [PATCH 66/72] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 0ad6162..81b9191 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 35%{?dist} +Release: 36%{?dist} # See the COPYING file which details everything License: ISC AND BSD-2-Clause URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 1.5.2-36 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Tue Mar 07 2023 Gwyn Ciesla - 1.5.2-35 - migrated to SPDX license From 1e6ea6df1ff0e4e27f57ab2f02f146c22ed219cd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jan 2024 06:56:49 +0000 Subject: [PATCH 67/72] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 81b9191..562d0ef 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 36%{?dist} +Release: 37%{?dist} # See the COPYING file which details everything License: ISC AND BSD-2-Clause URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Sat Jan 27 2024 Fedora Release Engineering - 1.5.2-37 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sat Jul 22 2023 Fedora Release Engineering - 1.5.2-36 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From c102942de237aac4aaca16d8d80a8fb8b3bdcdb8 Mon Sep 17 00:00:00 2001 From: Software Management Team Date: Thu, 30 May 2024 12:46:49 +0200 Subject: [PATCH 68/72] Eliminate use of obsolete %patchN syntax (#2283636) --- ucarp.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 562d0ef..a93f114 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -35,7 +35,7 @@ need for any dedicated extra network link between redundant hosts. %prep %setup -q -%patch0 -p0 +%patch -P0 -p0 %build export CPPFLAGS="$CPPFLAGS -fcommon" From a90c26ed6693bfd0526a37bebd021358db5048c8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 08:06:13 +0000 Subject: [PATCH 69/72] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index a93f114..9a3466c 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 37%{?dist} +Release: 38%{?dist} # See the COPYING file which details everything License: ISC AND BSD-2-Clause URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 1.5.2-38 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Sat Jan 27 2024 Fedora Release Engineering - 1.5.2-37 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From a940a0f63cd8f2460815e805bbc9cd0e85ade43c Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Tue, 26 Nov 2024 09:29:58 -0600 Subject: [PATCH 70/72] Require initscripts --- ucarp.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ucarp.spec b/ucarp.spec index 9a3466c..d22124a 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,8 +1,7 @@ -%define _hardened_build 1 Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 38%{?dist} +Release: 39%{?dist} # See the COPYING file which details everything License: ISC AND BSD-2-Clause URL: http://www.ucarp.org/ @@ -21,6 +20,7 @@ BuildRequires: gettext BuildRequires: autoconf, automake, libtool BuildRequires: libpcap-devel BuildRequires: systemd +Requires: initscripts %description UCARP allows a couple of hosts to share common virtual IP addresses in order @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Tue Nov 26 2024 Gwyn Ciesla - 1.5.2-39 +- Require initscripts + * Sat Jul 20 2024 Fedora Release Engineering - 1.5.2-38 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From ddd2056b329069e71dbfaef16352efbee143bdcc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 13:34:34 +0000 Subject: [PATCH 71/72] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index d22124a..373b9ae 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,7 +1,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 39%{?dist} +Release: 40%{?dist} # See the COPYING file which details everything License: ISC AND BSD-2-Clause URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Sun Jan 19 2025 Fedora Release Engineering - 1.5.2-40 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Tue Nov 26 2024 Gwyn Ciesla - 1.5.2-39 - Require initscripts From 5c633991d89f8a936023b0d7fff2f0350c079f94 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Thu, 8 May 2025 09:31:17 -0500 Subject: [PATCH 72/72] Dead upstream, old website NSFW --- .gitignore | 1 - dead.package | 1 + sources | 1 - ucarp | 145 ------------------- ucarp-1.5.2-sighup.patch | 10 -- ucarp.init | 156 --------------------- ucarp.spec | 296 --------------------------------------- ucarp@.service | 11 -- vip-001.conf.example | 10 -- vip-001.pwd.example | 1 - vip-common.conf | 8 -- vip-down | 5 - vip-up | 5 - 13 files changed, 1 insertion(+), 649 deletions(-) delete mode 100644 .gitignore create mode 100644 dead.package delete mode 100644 sources delete mode 100755 ucarp delete mode 100644 ucarp-1.5.2-sighup.patch delete mode 100755 ucarp.init delete mode 100644 ucarp.spec delete mode 100644 ucarp@.service delete mode 100644 vip-001.conf.example delete mode 100644 vip-001.pwd.example delete mode 100644 vip-common.conf delete mode 100755 vip-down delete mode 100755 vip-up diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 23c53b8..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -ucarp-1.5.2.tar.bz2 diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..4f2ec91 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Dead upstream, old website NSFW diff --git a/sources b/sources deleted file mode 100644 index a0b412a..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -723636dbf79fc6abd329a71ec4ddf79d ucarp-1.5.2.tar.bz2 diff --git a/ucarp b/ucarp deleted file mode 100755 index 284de14..0000000 --- a/ucarp +++ /dev/null @@ -1,145 +0,0 @@ -#!/bin/bash - -# Source function library. -. /etc/init.d/functions - -# Source networking configuration. -. /etc/sysconfig/network - -# Check that networking is up. -#[ ${NETWORKING} = "no" ] && exit 0 - -get_files() { - _cfg=$1 - FILES=`find ${CONFDIR} -maxdepth 1 -type f -name "vip-${_cfg}.conf" \ - -printf "%f\n" | egrep '^vip-[[:digit:]]+\.conf$' | LC_COLLATE="C" sort` -} - -prog=$"common address redundancy protocol daemon" -LOGGER="/usr/bin/logger -p daemon.notice -t ucarp" -CONFDIR=/etc/ucarp -UPSCRIPT=/usr/libexec/ucarp/vip-up -DOWNSCRIPT=/usr/libexec/ucarp/vip-down - -config=$2 - -start() { - RETVAL=-1 - VIP_RETVAL=0 - - echo -n $"Starting ${prog}: " - - get_files $config - - if [ -z "${FILES}" ]; then - ${LOGGER} "no virtual addresses are configured in ${CONFDIR}" - failure - 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 - ${LOGGER} "ID out of range (1-255) for ${FILE}, skipped VIP ID ${ID}" - continue - fi - - #unset PASSWORD BIND_INTERFACE SOURCE_ADDRESS VIP_ADDRESS OPTIONS - # Source ucarp settings - . ${CONFDIR}/vip-common.conf - . ${CONFDIR}/${FILE} - TMP_RETVAL=0 - - if [ -z "${PASSFILE}" ]; then - ${LOGGER} "no PASSFILE found for ${FILE}, skipped VIP ID ${ID}" - TMP_RETVAL=1 - fi - if [ -z "${BIND_INTERFACE}" ]; then - ${LOGGER} "no BIND_INTERFACE found for ${FILE}, skipped VIP ID ${ID}" - TMP_RETVAL=1 - fi - if [ -z "${SOURCE_ADDRESS}" ]; then - ${LOGGER} "no SOURCE_ADDRESS found for ${FILE}, skipped VIP ID ${ID}" - TMP_RETVAL=1 - fi - if [ -z "${VIP_ADDRESS}" ]; then - ${LOGGER} "no VIP_ADDRESS found for ${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 --daemonize --interface=${BIND_INTERFACE} --passfile=${PASSFILE} --srcip=${SOURCE_ADDRESS} --vhid=${ID} --addr=${VIP_ADDRESS} ${OPTIONS} --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 - ${LOGGER} "all ucarp configurations were applied successfully" - success - touch /var/lock/subsys/ucarp - elif [ ${RETVAL} -eq 0 -a ${VIP_RETVAL} -eq 1 ]; then - ${LOGGER} "error in one or more of the ucarp configurations" - warning - else - ${LOGGER} "error running one or more of the ucarp daemon instances" - failure - fi - fi - echo -} - -stop() { - echo -n $"Stopping $prog: " - killproc /usr/sbin/ucarp >/dev/null - RETVAL=$? - - # With "--shutdown" in the default OPTIONS, the down script is called - # when ucarp is stopped, so IP addresses are released, no "leftovers". - - # failure/success (no warning, too complicated to handle properly) - if [ ${RETVAL} -eq 1 ]; then - ${LOGGER} "it seems like no ucarp daemon were running" - failure - else - ${LOGGER} "all ucarp daemons stopped and IP addresses unassigned" - success - 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 -start -exit $RETVAL - diff --git a/ucarp-1.5.2-sighup.patch b/ucarp-1.5.2-sighup.patch deleted file mode 100644 index 8135233..0000000 --- a/ucarp-1.5.2-sighup.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- src/carp.c~ 2010-01-31 15:59:12.000000000 -0600 -+++ src/carp.c 2012-10-25 09:25:54.949976635 -0500 -@@ -762,6 +762,7 @@ - - if (shutdown_at_exit != 0) { - (void) signal(SIGINT, sighandler_exit); -+ (void) signal(SIGHUP, sighandler_exit); - (void) signal(SIGQUIT, sighandler_exit); - (void) signal(SIGTERM, sighandler_exit); - } diff --git a/ucarp.init b/ucarp.init deleted file mode 100755 index c7f6296..0000000 --- a/ucarp.init +++ /dev/null @@ -1,156 +0,0 @@ -#!/bin/bash -# $Id$ -# -# chkconfig: - 91 09 -# description: Starts and stops the common address redundancy protocol daemon - -### BEGIN INIT INFO -# Provides: lsb-ucarp -# Required-Start: $local_fs $network $remote_fs -# Required-Stop: $local_fs $network $remote_fs -# Default-Start: -# Default-Stop: 0 1 6 -# Short-Description: start and stop ucarp -# Description: Common Address Redundancy Protocol (CARP) for Unix -### END INIT INFO - -# 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" -LOGGER="/usr/bin/logger -p daemon.notice -t ucarp" -CONFDIR=/etc/ucarp -UPSCRIPT=/usr/libexec/ucarp/vip-up -DOWNSCRIPT=/usr/libexec/ucarp/vip-down - -start() { - RETVAL=-1 - VIP_RETVAL=0 - - echo -n $"Starting ${prog}: " - - get_files - - if [ -z "${FILES}" ]; then - ${LOGGER} "no virtual addresses are configured in ${CONFDIR}" - failure - 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 - ${LOGGER} "ID out of range (1-255) for ${FILE}, skipped VIP ID ${ID}" - continue - fi - - unset PASSWORD BIND_INTERFACE SOURCE_ADDRESS VIP_ADDRESS OPTIONS - # Source ucarp settings - . ${CONFDIR}/vip-common.conf - . ${CONFDIR}/${FILE} - TMP_RETVAL=0 - - if [ -z "${PASSWORD}" ]; then - ${LOGGER} "no PASSWORD found for ${FILE}, skipped VIP ID ${ID}" - TMP_RETVAL=1 - fi - if [ -z "${BIND_INTERFACE}" ]; then - ${LOGGER} "no BIND_INTERFACE found for ${FILE}, skipped VIP ID ${ID}" - TMP_RETVAL=1 - fi - if [ -z "${SOURCE_ADDRESS}" ]; then - ${LOGGER} "no SOURCE_ADDRESS found for ${FILE}, skipped VIP ID ${ID}" - TMP_RETVAL=1 - fi - if [ -z "${VIP_ADDRESS}" ]; then - ${LOGGER} "no VIP_ADDRESS found for ${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 --daemonize --interface=${BIND_INTERFACE} --pass=${PASSWORD} --srcip=${SOURCE_ADDRESS} --vhid=${ID} --addr=${VIP_ADDRESS} ${OPTIONS} --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 - ${LOGGER} "all ucarp configurations were applied successfully" - success - touch /var/lock/subsys/ucarp - elif [ ${RETVAL} -eq 0 -a ${VIP_RETVAL} -eq 1 ]; then - ${LOGGER} "error in one or more of the ucarp configurations" - warning - else - ${LOGGER} "error running one or more of the ucarp daemon instances" - failure - fi - fi - echo -} - -stop() { - echo -n $"Stopping $prog: " - killproc /usr/sbin/ucarp >/dev/null - RETVAL=$? - - # With "--shutdown" in the default OPTIONS, the down script is called - # when ucarp is stopped, so IP addresses are released, no "leftovers". - - # failure/success (no warning, too complicated to handle properly) - if [ ${RETVAL} -eq 1 ]; then - ${LOGGER} "it seems like no ucarp daemon were running" - failure - else - ${LOGGER} "all ucarp daemons stopped and IP addresses unassigned" - success - 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 - diff --git a/ucarp.spec b/ucarp.spec deleted file mode 100644 index 373b9ae..0000000 --- a/ucarp.spec +++ /dev/null @@ -1,296 +0,0 @@ -Summary: Common Address Redundancy Protocol (CARP) for Unix -Name: ucarp -Version: 1.5.2 -Release: 40%{?dist} -# See the COPYING file which details everything -License: ISC AND BSD-2-Clause -URL: http://www.ucarp.org/ -Source0: http://download.pureftpd.org/pub/ucarp/ucarp-%{version}.tar.bz2 -Source1: ucarp@.service -Source2: vip-001.conf.example -Source3: vip-common.conf -Source4: vip-up -Source5: vip-down -#Source6: vip-helper.sh -Source7: ucarp -Source8: vip-001.pwd.example -Patch0: ucarp-1.5.2-sighup.patch -BuildRequires: make -BuildRequires: gettext -BuildRequires: autoconf, automake, libtool -BuildRequires: libpcap-devel -BuildRequires: systemd -Requires: initscripts - -%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 -q - -%patch -P0 -p0 - -%build -export CPPFLAGS="$CPPFLAGS -fcommon" -%configure -%{__make} %{?_smp_mflags} - - -%install -%{__make} install DESTDIR=%{buildroot} -%find_lang %{name} - -# Install the unit file -%{__install} -D -p -m 0755 %{SOURCE1} \ - %{buildroot}%{_unitdir}/ucarp@.service - -%{__mkdir_p} %{buildroot}/etc/ucarp -%{__mkdir_p} %{buildroot}%{_libexecdir}/ucarp - -# Install the example config files -%{__install} -D -p -m 0600 %{SOURCE2} %{SOURCE3} %{SOURCE8} \ - %{buildroot}/etc/ucarp/ - -# Install helper scripts -%{__install} -D -p -m 0700 %{SOURCE4} %{SOURCE5} %{SOURCE7} \ - %{buildroot}%{_libexecdir}/ucarp/ - - - -%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 -%systemd_post ucarp@.service - -%preun -%systemd_preun ucarp@.service - -%postun -%systemd_postun_with_restart ucarp@.service - - -%files -f %{name}.lang -%license COPYING -%doc AUTHORS ChangeLog NEWS README -%{_unitdir}/ucarp@.service -%attr(0700,root,root) %dir /etc/ucarp/ -%config(noreplace) /etc/ucarp/vip-common.conf -/etc/ucarp/vip-001.conf.example -/etc/ucarp/vip-001.pwd.example -%config(noreplace) %{_libexecdir}/ucarp/ -%{_sbindir}/ucarp - -%changelog -* Sun Jan 19 2025 Fedora Release Engineering - 1.5.2-40 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Tue Nov 26 2024 Gwyn Ciesla - 1.5.2-39 -- Require initscripts - -* Sat Jul 20 2024 Fedora Release Engineering - 1.5.2-38 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Sat Jan 27 2024 Fedora Release Engineering - 1.5.2-37 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sat Jul 22 2023 Fedora Release Engineering - 1.5.2-36 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Tue Mar 07 2023 Gwyn Ciesla - 1.5.2-35 -- migrated to SPDX license - -* Sat Jan 21 2023 Fedora Release Engineering - 1.5.2-34 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Sat Jul 23 2022 Fedora Release Engineering - 1.5.2-33 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Sat Jan 22 2022 Fedora Release Engineering - 1.5.2-32 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jul 23 2021 Fedora Release Engineering - 1.5.2-31 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 1.5.2-30 -- Rebuilt for updated systemd-rpm-macros - See https://pagure.io/fesco/issue/2583. - -* Wed Jan 27 2021 Fedora Release Engineering - 1.5.2-29 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Jul 29 2020 Fedora Release Engineering - 1.5.2-28 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Mon Feb 10 2020 Gwyn Ciesla - 1.5.2-27 -- Fix FTBFS. - -* Fri Jan 31 2020 Fedora Release Engineering - 1.5.2-26 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Sat Jul 27 2019 Fedora Release Engineering - 1.5.2-25 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sun Feb 03 2019 Fedora Release Engineering - 1.5.2-24 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Sat Jul 14 2018 Fedora Release Engineering - 1.5.2-23 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Mon Feb 26 2018 Gwyn Ciesla - 1.5.2-22 -- Incorporate systemd tweaks from Hans-Werner Jouy. - -* Fri Feb 09 2018 Fedora Release Engineering - 1.5.2-21 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Tue Aug 08 2017 Gwyn Ciesla - 1.5.2-20 -- Correct unit file target. - -* Thu Aug 03 2017 Fedora Release Engineering - 1.5.2-19 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 1.5.2-18 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Tue Mar 14 2017 Jon Ciesla - 1.5.2-17 -- systemd cleanup - -* Sat Feb 11 2017 Fedora Release Engineering - 1.5.2-16 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Fri Feb 05 2016 Fedora Release Engineering - 1.5.2-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Fri Jun 19 2015 Fedora Release Engineering - 1.5.2-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Thu Aug 21 2014 Kevin Fenzi - 1.5.2-13 -- Rebuild for rpm bug 1131960 - -* Mon Aug 18 2014 Fedora Release Engineering - 1.5.2-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Sun Jun 08 2014 Fedora Release Engineering - 1.5.2-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Mon Aug 05 2013 Jon Ciesla - 1.5.2-10 -- Fix FTBFS, BZ 992829. - -* Sun Aug 04 2013 Fedora Release Engineering - 1.5.2-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Fri Feb 15 2013 Fedora Release Engineering - 1.5.2-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Thu Oct 25 2012 Jon Ciesla - 1.5.2-7 -- Patch to fix crash, BZ 693762. - -* Sun Jul 22 2012 Fedora Release Engineering - 1.5.2-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Fri Apr 13 2012 Jon Ciesla - 1.5.2-5 -- Add hardened build. - -* Wed Mar 14 2012 Jon Ciesla - 1.5.2-4 -- Migrate to systemd, BZ 800498. - -* Sat Jan 14 2012 Fedora Release Engineering - 1.5.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Mon Feb 07 2011 Fedora Release Engineering - 1.5.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Wed Apr 28 2010 Jon Ciesla - 1.5.2-1 -- New upstream. -- Uses arc4random() if available. -- Avoids adverts that might be twice as what they should be. -- Marked vip-up and vip-down config(noreplace), BZ 586893. - -* Sun Jul 26 2009 Fedora Release Engineering - 1.5.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Jul 08 2009 Jon Ciesla - 1.5.1-1 -- New upstream. -- New option (--nomcast / -M) to use broadcast -- advertisements instead of multicast ones. - -* Mon Apr 13 2009 Jon Ciesla - 1.5-1 -- Update to 1.5 BZ 458767. -- Added LSB header to init script, BZ 247082. -- New upstream should address BZ 427495, 449266, 455394. - -* Wed Feb 25 2009 Fedora Release Engineering - 1.4-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Sun Feb 3 2008 Matthias Saou 1.4-1 -- Update to 1.4. -- Rip out all of the "list" stuff and 255.255.255.255 address hack (#427495). -- Change from INITLOG (now deprecated) to LOGGER in the init script. -- Move helper scripts to /usr/libexec/ucarp/. - -* Thu Aug 23 2007 Matthias Saou 1.2-9 -- Rebuild for new BuildID feature. - -* Sun Aug 5 2007 Matthias Saou 1.2-8 -- Update License field. - -* Fri Feb 2 2007 Matthias Saou 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 1.2-6 -- Rebuild against new libpcap. - -* Mon Nov 13 2006 Matthias Saou 1.2-5 -- Include all improvements from Denis Ovsienko (#200395). - -* Mon Aug 28 2006 Matthias Saou 1.2-4 -- FC6 rebuild. - -* Tue Aug 22 2006 Matthias Saou 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 1.2-3 -- Fix init script for recent find versions (#200395). - -* Thu Jun 22 2006 Matthias Saou 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 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 1.1-5 -- FC5 rebuild. - -* Thu Feb 9 2006 Matthias Saou 1.1-4 -- Rebuild for new gcc/glibc. - -* Thu Nov 17 2005 Matthias Saou 1.1-3 -- Rebuild against new libpcap library. - -* Fri Apr 1 2005 Michael Schwendt - 1.1-2 -- Add %%dir entry for /etc/sysconfig/carp directory. - -* Thu Jan 13 2005 Matthias Saou 1.1-1 -- Update to 1.1. -- Update source location. - -* Fri Jul 9 2004 Matthias Saou 1.0-1 -- Initial RPM release. - diff --git a/ucarp@.service b/ucarp@.service deleted file mode 100644 index e4ef795..0000000 --- a/ucarp@.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Common address redundancy protocol daemon, config: vip-%I.conf -After=syslog.target network-online.target - -[Service] -PrivateTmp=true -Type=forking -ExecStart=/usr/libexec/ucarp/ucarp start %i - -[Install] -WantedBy=multi-user.target diff --git a/vip-001.conf.example b/vip-001.conf.example deleted file mode 100644 index 0bbc5ba..0000000 --- a/vip-001.conf.example +++ /dev/null @@ -1,10 +0,0 @@ -# Virtual IP configuration file for UCARP -# The number (from 001 to 255) in the name of the file is the identifier - -# In the simple scenario, you want a single virtual IP address from the _same_ -# network to be taken over by one of the routers. -VIP_ADDRESS="10.0.0.254" - -# In more complex scenarios, check the "vip-common" file for values to override -# and how to add options. - diff --git a/vip-001.pwd.example b/vip-001.pwd.example deleted file mode 100644 index 00e6690..0000000 --- a/vip-001.pwd.example +++ /dev/null @@ -1 +0,0 @@ -love diff --git a/vip-common.conf b/vip-common.conf deleted file mode 100644 index 85dae52..0000000 --- a/vip-common.conf +++ /dev/null @@ -1,8 +0,0 @@ -# Common VIP settings which can be overridden in individual vip-.conf -PASSFILE=/etc/ucarp/vip-001.pwd -BIND_INTERFACE="eth0" -SOURCE_ADDRESS="" - -# If you have extra options to add, see "ucarp --help" output -OPTIONS="--shutdown --preempt" - diff --git a/vip-down b/vip-down deleted file mode 100755 index fab9a8f..0000000 --- a/vip-down +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -exec 2>/dev/null - -/sbin/ip address del "$2"/32 dev "$1" - diff --git a/vip-up b/vip-up deleted file mode 100755 index 166729c..0000000 --- a/vip-up +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -exec 2>/dev/null - -/sbin/ip address add "$2"/32 dev "$1" -