rpms/ucarp/devel ucarp.init, NONE, 1.1 ucarp.spec, 1.12, 1.13 vip-001.list.example, 1.1, 1.2 vip-down, 1.1, 1.2 vip-helper.sh, 1.1, 1.2 vip-up, 1.1, 1.2 carp.init, 1.4, NONE
Matthias Saou (thias)
fedora-extras-commits at redhat.com
Mon Feb 5 13:07:12 UTC 2007
- Previous message: rpms/djvulibre/devel .cvsignore, 1.8, 1.9 djvulibre.spec, 1.18, 1.19 sources, 1.8, 1.9
- Next message: rpms/ncftp/devel .cvsignore, 1.4, 1.5 ncftp.spec, 1.10, 1.11 sources, 1.4, 1.5
- 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-serv22700
Modified Files:
ucarp.spec vip-001.list.example vip-down vip-helper.sh vip-up
Added Files:
ucarp.init
Removed Files:
carp.init
Log Message:
Move all configuration to /etc/ucarp and other minor changes.
***** Error reading new file: [Errno 2] No such file or directory: 'ucarp.init'
Index: ucarp.spec
===================================================================
RCS file: /cvs/extras/rpms/ucarp/devel/ucarp.spec,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ucarp.spec 29 Nov 2006 12:00:11 -0000 1.12
+++ ucarp.spec 5 Feb 2007 13:06:40 -0000 1.13
@@ -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(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 @@
# 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
+%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 carp stop &>/dev/null || :
- /sbin/chkconfig --del carp
+ /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 <http://freshrpms.net/> 1.2-7
+- Rename service from carp to ucarp, to be more consistent.
+- Move /etc/sysconfig/carp to /etc/ucarp since it has become a config directory
+ of its own.
+
* Wed Nov 29 2006 Matthias Saou <http://freshrpms.net/> 1.2-6
- Rebuild against new libpcap.
Index: vip-001.list.example
===================================================================
RCS file: /cvs/extras/rpms/ucarp/devel/vip-001.list.example,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vip-001.list.example 29 Nov 2006 12:00:11 -0000 1.1
+++ vip-001.list.example 5 Feb 2007 13:06:40 -0000 1.2
@@ -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
+
Index: vip-down
===================================================================
RCS file: /cvs/extras/rpms/ucarp/devel/vip-down,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vip-down 29 Nov 2006 12:00:11 -0000 1.1
+++ vip-down 5 Feb 2007 13:06:40 -0000 1.2
@@ -2,25 +2,25 @@
usage()
{
- echo "This script is intended to be run by UCARP daemon."
- echo "Usage: $0 <network interface> <IP address> <anything>"
- echo "Usage: $0 <anything> <255.255.255.255> <virtual router ID>"
- exit 1
+ 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
- ;;
+ 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
Index: vip-helper.sh
===================================================================
RCS file: /cvs/extras/rpms/ucarp/devel/vip-helper.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vip-helper.sh 29 Nov 2006 12:00:11 -0000 1.1
+++ vip-helper.sh 5 Feb 2007 13:06:40 -0000 1.2
@@ -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 @@
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
Index: vip-up
===================================================================
RCS file: /cvs/extras/rpms/ucarp/devel/vip-up,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vip-up 29 Nov 2006 12:00:11 -0000 1.1
+++ vip-up 5 Feb 2007 13:06:40 -0000 1.2
@@ -2,25 +2,25 @@
usage()
{
- echo "This script is intended to be run by UCARP daemon."
- echo "Usage: $0 <network interface> <IP address> <anything>"
- echo "Usage: $0 <anything> <255.255.255.255> <virtual router ID>"
- exit 1
+ 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
- ;;
+ 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
--- carp.init DELETED ---
- Previous message: rpms/djvulibre/devel .cvsignore, 1.8, 1.9 djvulibre.spec, 1.18, 1.19 sources, 1.8, 1.9
- Next message: rpms/ncftp/devel .cvsignore, 1.4, 1.5 ncftp.spec, 1.10, 1.11 sources, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list