On Sun, Sep 24, 2006 at 09:01:51PM -0500, Eric Evans wrote:
> [ Jonathan McDowell ]
> 
> Sorry it's taken so long to get back to you, real-life has been a little
> hectic lately.

No problem. I know how that works. :)

> > Package: ucarp
> > Version: 1.2-1
> > Followup-For: Bug #264007
> > 
> > The attached patch allows configuration of ucarp via
> > /etc/network/interfaces; I think it's probably the sanest way of
> > configuring ucarp and allowing multiple interfaces while still fitting
> > in with the Debian way of doing things.
> 
> I agree completely, this is a great idea. 

Cool. I attach a patch that also allows setting the advbase/skew options
and forcing a host to try to be the master. I'm not sure I'll get time
to try your shutdown patch, but if I do I'll let you know how it goes.

J.

-- 
Web [          The first version always gets thrown away.          ]
site: http:// [                                          ]       Made by
www.earth.li/~noodles/  [                      ]         HuggieTag 0.0.23
--- /home/noodles/debian/ucarp-1.2-new/debian/if-up     2006-09-25 
12:59:18.000000000 +0100
+++ ucarp-1.2/debian/if-up      2006-09-25 12:39:59.000000000 +0100
@@ -1,6 +1,7 @@
 #!/bin/sh
 
 UCARP=/usr/sbin/ucarp
+EXTRA_PARAMS=""
 
 if [ ! -x $UCARP ]; then
        exit 0
@@ -14,9 +15,22 @@
        IF_UCARP_DOWNSCRIPT=/usr/share/ucarp/vip-down
 fi
 
+if [ -n "$IF_UCARP_MASTER" ]; then
+       EXTRA_PARAMS="-P"
+fi
+
+if [ -n "$IF_UCARP_ADVSKEW" ]; then
+       EXTRA_PARAMS="$EXTRA_PARAMS -k $IF_UCARP_ADVSKEW"
+fi
+
+if [ -n "$IF_UCARP_ADVBASE" ]; then
+       EXTRA_PARAMS="$EXTRA_PARAMS -b $IF_UCARP_ADVBASE"
+fi
+
 if [ -n "$IF_UCARP_VID" -a -n "$IF_UCARP_VIP" -a \
                -n "$IF_UCARP_PASSWORD" ]; then
        $UCARP -i $IFACE -s $IF_ADDRESS -B -z \
                -v $IF_UCARP_VID -p $IF_UCARP_PASSWORD -a $IF_UCARP_VIP \
-               -u $IF_UCARP_UPSCRIPT -d $IF_UCARP_DOWNSCRIPT
+               -u $IF_UCARP_UPSCRIPT -d $IF_UCARP_DOWNSCRIPT \
+               $EXTRA_PARAMS
 fi

Attachment: signature.asc
Description: Digital signature

Reply via email to