rpms/ucarp/devel .cvsignore, 1.4, 1.5 sources, 1.4, 1.5 ucarp.init, 1.1, 1.2 ucarp.spec, 1.15, 1.16 vip-001.conf.example, 1.3, 1.4 vip-down, 1.2, 1.3 vip-up, 1.2, 1.3 ucarp-1.3-pre.patch, 1.1, NONE vip-001.list.example, 1.2, NONE vip-helper.sh, 1.2, NONE
Matthias Saou (thias)
fedora-extras-commits at redhat.com
Sun Feb 3 19:52:25 UTC 2008
- Previous message (by thread): rpms/gt/F-7 gt-0.4-unsf-bigendian-fix.patch, NONE, 1.1 gt-0.4-unsf-tremolo.patch, NONE, 1.1 gt-0.4-config-default-velocity-layer.patch, 1.1, 1.2 gt.spec, 1.1, 1.2
- Next message (by thread): rpms/ucarp/devel vip-common.conf,NONE,1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: thias
Update of /cvs/extras/rpms/ucarp/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23309
Modified Files:
.cvsignore sources ucarp.init ucarp.spec vip-001.conf.example
vip-down vip-up
Removed Files:
ucarp-1.3-pre.patch vip-001.list.example vip-helper.sh
Log Message:
Update to 1.4 and major changes in the configuration (#427495).
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/ucarp/devel/.cvsignore,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- .cvsignore 20 Jun 2006 22:55:39 -0000 1.4
+++ .cvsignore 3 Feb 2008 19:51:43 -0000 1.5
@@ -1 +1 @@
-ucarp-1.2.tar.bz2
+ucarp-1.4.tar.bz2
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/ucarp/devel/sources,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- sources 20 Jun 2006 22:55:39 -0000 1.4
+++ sources 3 Feb 2008 19:51:44 -0000 1.5
@@ -1 +1 @@
-bed7ae84520f2e0faf3e68e9cfe4e1aa ucarp-1.2.tar.bz2
+9e1765de2eea1bb59c9ad9c8596f4f89 ucarp-1.4.tar.bz2
Index: ucarp.init
===================================================================
RCS file: /cvs/extras/rpms/ucarp/devel/ucarp.init,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ucarp.init 5 Feb 2007 13:06:40 -0000 1.1
+++ ucarp.init 3 Feb 2008 19:51:44 -0000 1.2
@@ -19,11 +19,10 @@
}
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 @@
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 @@
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 @@
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
Index: ucarp.spec
===================================================================
RCS file: /cvs/extras/rpms/ucarp/devel/ucarp.spec,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ucarp.spec 23 Aug 2007 08:06:06 -0000 1.15
+++ ucarp.spec 3 Feb 2008 19:51:44 -0000 1.16
@@ -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 @@
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 @@
%prep
%setup -q
-%patch -p1
%build
@@ -52,14 +50,15 @@
%{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 @@
%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 <http://freshrpms.net/> 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 <http://freshrpms.net/> 1.2-9
- Rebuild for new BuildID feature.
Index: vip-001.conf.example
===================================================================
RCS file: /cvs/extras/rpms/ucarp/devel/vip-001.conf.example,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- vip-001.conf.example 29 Nov 2006 12:00:11 -0000 1.3
+++ vip-001.conf.example 3 Feb 2008 19:51:44 -0000 1.4
@@ -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$
-
-# Set the same password on all machines sharing the same virtual router ID.
-PASSWORD="love"
-
-# UCARP daemon by default uses the first PCAP-capable interface as returned by
-# pcap_lookupdev(), this is often "eth0". This option allows you to change
-# this behaviour.
-BIND_INTERFACE="eth0"
-
-# This is a mandatory option. UCARP daemon will use this IP address for its
-# announces regardless of the addresses actually assigned to the interface.
-#BIND_ADDRESS="10.0.0.2"
-
-# There is a simple and an advanced way to configure UCARP. In both ways you
-# have two physical routers with distinct IP addresses on the same IP network.
# In the simple scenario, you want a single virtual IP address from the _same_
-# network to be taken over by one of the routers. You configure this VIP right
-# here then:
-#VIP_ADDRESS="10.10.10.10"
-
-# In the complex scenario, your virtual router consists of more than one IP
-# address. For example, you might want to assign to the virtual router not only
-# the address which is used as the default gateway on the LAN, but also the only
-# real IP address, which you got from your ISP. Your configuration would have
-# two steps then:
-# 1. Configure the VIP_ADDRESS to "255.255.255.255"
-# 2. Create a file in the same directory which holds vip-XXX.conf, with a name
-# vip-XXX.list. For example, if the .conf file is named vip-001.conf, the .list
-# file would be vip-001.list. Each meaningful line of this file will be used as
-# an argument for "ip address add" and "ip address del" commands. This way you
-# can control, which IP addresses will be assigned to which interfaces.
-#VIP_ADDRESS="255.255.255.255"
+# network to be taken over by one of the routers.
+VIP_ADDRESS="10.0.0.254"
-# If you have extra options to add, see "ucarp --help" output
-# (the lower the "-k <val>" the higher priority and "-P" to become master ASAP)
-# Please note you can use only the following options here:
-# --preempt (-P): becomes a master as soon as possible
-# --neutral (-n): don't run downscript at start if backup
-# --advbase=<seconds> (-b <seconds>): advertisement frequency
-# --advskew=<skew> (-k <skew>): advertisement skew (0-255)
-# The rest of options list is built up by the UCARP initscript.
+# In more complex scenarios, check the "vip-common" file for values to override
+# and how to add options.
-OPTIONS="-k 128 -P"
Index: vip-down
===================================================================
RCS file: /cvs/extras/rpms/ucarp/devel/vip-down,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vip-down 5 Feb 2007 13:06:40 -0000 1.2
+++ vip-down 3 Feb 2008 19:51:44 -0000 1.3
@@ -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 <network interface> <IP address> <anything>"
- echo "Usage: $0 <anything> <255.255.255.255> <virtual router ID>"
- exit 1
-}
-
-[ $# -eq 3 ] || usage
-
-case $2 in
- 255.255.255.255)
- # New-style invocation. Process the the list of addresses
- # specific to this virtual router.
- MYDIR=`dirname $0`
- $MYDIR/vip-helper.sh $3 del
- ;;
- *)
- # Old-style invocation. Just add a single address to the same
- # interface UCARP daemon is working on.
- ip address del $2/32 dev $1
- ;;
-esac
+/sbin/ip address del "$2"/32 dev "$1"
Index: vip-up
===================================================================
RCS file: /cvs/extras/rpms/ucarp/devel/vip-up,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vip-up 5 Feb 2007 13:06:40 -0000 1.2
+++ vip-up 3 Feb 2008 19:51:44 -0000 1.3
@@ -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 <network interface> <IP address> <anything>"
- echo "Usage: $0 <anything> <255.255.255.255> <virtual router ID>"
- exit 1
-}
-
-[ $# -eq 3 ] || usage
-
-case $2 in
- 255.255.255.255)
- # New-style invocation. Process the the list of addresses
- # specific to this virtual router.
- MYDIR=`dirname $0`
- $MYDIR/vip-helper.sh $3 add
- ;;
- *)
- # Old-style invocation. Just add a single address to the same
- # interface the UCARP daemon is working on.
- ip address add $2/32 dev $1
- ;;
-esac
+/sbin/ip address add "$2"/32 dev "$1"
--- ucarp-1.3-pre.patch DELETED ---
--- vip-001.list.example DELETED ---
--- vip-helper.sh DELETED ---
- Previous message (by thread): rpms/gt/F-7 gt-0.4-unsf-bigendian-fix.patch, NONE, 1.1 gt-0.4-unsf-tremolo.patch, NONE, 1.1 gt-0.4-config-default-velocity-layer.patch, 1.1, 1.2 gt.spec, 1.1, 1.2
- Next message (by thread): rpms/ucarp/devel vip-common.conf,NONE,1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list