View | Details | Raw Unified | Return to bug 173543 | Differences between
and this patch

Collapse All | Expand All

(-)ucarp/Makefile (-10 / +9 lines)
Lines 1-13 Link Here
1
# New ports collection makefile for:   ucarp
1
# Created by: Meno Abels <meno.abels@adviser.com>
2
# Date created:                2005-05-06
3
# Whom:                        Meno Abels <meno.abels@adviser.com>
4
#
5
# $FreeBSD: head/net/ucarp/Makefile 300897 2012-07-14 14:29:18Z beat $
2
# $FreeBSD: head/net/ucarp/Makefile 300897 2012-07-14 14:29:18Z beat $
6
#
7
3
8
PORTNAME=	ucarp
4
PORTNAME=	ucarp
9
PORTVERSION=	1.5.2
5
PORTVERSION=	1.5.2
10
PORTREVISION=	1
6
PORTREVISION=	2
11
CATEGORIES=	net
7
CATEGORIES=	net
12
MASTER_SITES=	ftp://ftp.pureftpd.org/pub/pure-ftpd/misc/ucarp/ \
8
MASTER_SITES=	ftp://ftp.pureftpd.org/pub/pure-ftpd/misc/ucarp/ \
13
		http://download.pureftpd.org/pub/ucarp/
9
		http://download.pureftpd.org/pub/ucarp/
Lines 17-25 Link Here
17
13
18
USE_BZIP2=	yes
14
USE_BZIP2=	yes
19
15
20
OPTIONS=	UCARP_SCRIPTS "Install scripts to manage virtual IP" on
16
OPTIONS_DEFINE=	SCRIPTS
17
OPTIONS_DEFAULT=SCRIPTS
21
18
22
.include <bsd.port.pre.mk>
19
SCRIPTS_DESC=	Install scripts to manage virtual IP
20
21
.include <bsd.port.options.mk>
23
22
24
GNU_CONFIGURE=	yes
23
GNU_CONFIGURE=	yes
25
CONFIGURE_ARGS=	--disable-nls
24
CONFIGURE_ARGS=	--disable-nls
Lines 28-34 Link Here
28
27
29
PLIST_FILES=	sbin/ucarp
28
PLIST_FILES=	sbin/ucarp
30
29
31
.if defined(WITH_UCARP_SCRIPTS)
30
.if ${PORT_OPTIONS:MSCRIPTS}
32
PLIST_FILES+=	sbin/ucarp-up \
31
PLIST_FILES+=	sbin/ucarp-up \
33
		sbin/ucarp-down
32
		sbin/ucarp-down
34
post-install:
33
post-install:
Lines 36-39 Link Here
36
		${INSTALL_SCRIPT} ${WRKSRC}/examples/bsd/vip-down.sh ${PREFIX}/sbin/ucarp-down
35
		${INSTALL_SCRIPT} ${WRKSRC}/examples/bsd/vip-down.sh ${PREFIX}/sbin/ucarp-down
37
.endif
36
.endif
38
37
39
.include <bsd.port.post.mk>
38
.include <bsd.port.mk>
(-)ucarp/files/patch-examples:bsd:vip-down.sh (-24 lines)
Lines 1-24 Link Here
1
--- examples/bsd/vip-down.sh.orig	2006-05-27 20:38:40.000000000 +0000
2
+++ examples/bsd/vip-down.sh	2010-05-30 20:40:19.000000000 +0000
3
@@ -1,4 +1,21 @@
4
 #! /bin/sh
5
+
6
+if [ -z "$1" -o -z "$2" ]; then
7
+	cat <<EOF
8
+Usage: ${0##*/} interface virtual-address [if-keep-ip]
9
+  interface        - interface name where virtual IP-address to be assigned;
10
+  virtual-address  - virtual IP-address;
11
+  if-keep-ip       - interface name where virtual IP-address should be kept
12
+                     when ucarp changes state to BACKUP;
13
+
14
+EOF
15
+	exit 255
16
+fi
17
+
18
 exec 2> /dev/null
19
 
20
 /sbin/ifconfig "$1" -alias "$2"
21
+
22
+if [ ! -z "$3" ]; then
23
+	/sbin/ifconfig "$3" alias "$2" netmask 255.255.255.255
24
+fi
(-)ucarp/files/patch-examples:bsd:vip-up.sh (-24 lines)
Lines 1-24 Link Here
1
--- examples/bsd/vip-up.sh.orig	2006-05-27 20:38:34.000000000 +0000
2
+++ examples/bsd/vip-up.sh	2010-05-30 20:40:19.000000000 +0000
3
@@ -1,4 +1,21 @@
4
 #! /bin/sh
5
+
6
+if [ -z "$1" -o -z "$2" ]; then
7
+	cat <<EOF
8
+Usage: ${0##*/} interface virtual-address [if-keep-ip]
9
+  interface        - interface name where virtual IP-address to be assigned;
10
+  virtual-address  - virtual IP-address;
11
+  if-keep-ip       - interface name where virtual IP-address should be kept
12
+                     when ucarp changes state to BACKUP;
13
+
14
+EOF
15
+	exit 255
16
+fi
17
+
18
 exec 2> /dev/null
19
 
20
+if [ ! -z "$3" ]; then
21
+	/sbin/ifconfig "$3" -alias "$2"
22
+fi
23
+
24
 /sbin/ifconfig "$1" alias "$2" netmask 255.255.255.255
(-)ucarp/files/patch-l2vlan (+14 lines)
Line 0 Link Here
1
# http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/164060
2
# http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/173543
3
--- src/fillmac.c.orig	2007-07-04 15:34:59.000000000 +0200
4
+++ src/fillmac.c	2012-11-11 01:50:29.000000000 +0100
5
@@ -86,7 +86,8 @@
6
             if (strcmp(ifa->ifa_name, interface) == 0 &&
7
                 ifa->ifa_addr->sa_family == AF_LINK) {
8
                 sadl = (struct sockaddr_dl *) ifa->ifa_addr;
9
-                if (sadl == NULL || sadl->sdl_type != IFT_ETHER ||
10
+                if (sadl == NULL || ((sadl->sdl_type != IFT_ETHER) && 
11
+                    (sadl->sdl_type != IFT_L2VLAN)) ||
12
                     sadl->sdl_alen <= 0) {
13
                     logfile(LOG_ERR,
14
                             _("Invalid media / hardware address for [%s]"),
(-)ucarp/files/patch-vip-down (+24 lines)
Line 0 Link Here
1
--- examples/bsd/vip-down.sh.orig	2006-05-27 20:38:40.000000000 +0000
2
+++ examples/bsd/vip-down.sh	2010-05-30 20:40:19.000000000 +0000
3
@@ -1,4 +1,21 @@
4
 #! /bin/sh
5
+
6
+if [ -z "$1" -o -z "$2" ]; then
7
+	cat <<EOF
8
+Usage: ${0##*/} interface virtual-address [if-keep-ip]
9
+  interface        - interface name where virtual IP-address to be assigned;
10
+  virtual-address  - virtual IP-address;
11
+  if-keep-ip       - interface name where virtual IP-address should be kept
12
+                     when ucarp changes state to BACKUP;
13
+
14
+EOF
15
+	exit 255
16
+fi
17
+
18
 exec 2> /dev/null
19
 
20
 /sbin/ifconfig "$1" -alias "$2"
21
+
22
+if [ ! -z "$3" ]; then
23
+	/sbin/ifconfig "$3" alias "$2" netmask 255.255.255.255
24
+fi
(-)ucarp/files/patch-vip-up (+24 lines)
Line 0 Link Here
1
--- examples/bsd/vip-up.sh.orig	2006-05-27 20:38:34.000000000 +0000
2
+++ examples/bsd/vip-up.sh	2010-05-30 20:40:19.000000000 +0000
3
@@ -1,4 +1,21 @@
4
 #! /bin/sh
5
+
6
+if [ -z "$1" -o -z "$2" ]; then
7
+	cat <<EOF
8
+Usage: ${0##*/} interface virtual-address [if-keep-ip]
9
+  interface        - interface name where virtual IP-address to be assigned;
10
+  virtual-address  - virtual IP-address;
11
+  if-keep-ip       - interface name where virtual IP-address should be kept
12
+                     when ucarp changes state to BACKUP;
13
+
14
+EOF
15
+	exit 255
16
+fi
17
+
18
 exec 2> /dev/null
19
 
20
+if [ ! -z "$3" ]; then
21
+	/sbin/ifconfig "$3" -alias "$2"
22
+fi
23
+
24
 /sbin/ifconfig "$1" alias "$2" netmask 255.255.255.255

Return to bug 173543