From matthias.andree@gmx.de  Sun Sep 18 02:41:20 2005
Return-Path: <matthias.andree@gmx.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 84E8E16A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 18 Sep 2005 02:41:20 +0000 (GMT)
	(envelope-from matthias.andree@gmx.de)
Received: from unimail.uni-dortmund.de (mx1.HRZ.Uni-Dortmund.DE [129.217.128.51])
	by mx1.FreeBSD.org (Postfix) with ESMTP id DFE3B43D45
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 18 Sep 2005 02:41:19 +0000 (GMT)
	(envelope-from matthias.andree@gmx.de)
Received: from m2a2.myip.org (p50911A46.dip0.t-ipconnect.de [80.145.26.70])
	(authenticated bits=0)
	by unimail.uni-dortmund.de (8.13.4/8.13.4) with ESMTP id j8I2f8X6027917;
	Sun, 18 Sep 2005 04:41:13 +0200 (CEST)
Received: by merlin.emma.line.org (Postfix, from userid 0)
	id 7ABA01B2F5; Sun, 18 Sep 2005 04:41:02 +0200 (CEST)
Message-Id: <20050918023354.BB7251B7C3@merlin.emma.line.org>
Date: Sun, 18 Sep 2005 04:33:54 +0200 (CEST)
From: Matthias Andree <matthias.andree@gmx.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [MAINTAINER] security/openvpn: update RC script for FreeBSD 6
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         86286
>Category:       ports
>Synopsis:       [MAINTAINER] security/openvpn: update RC script for FreeBSD 6
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 18 02:50:00 GMT 2005
>Closed-Date:    Sun Sep 18 12:02:28 GMT 2005
>Last-Modified:  Sun Sep 18 12:02:28 GMT 2005
>Originator:     Matthias Andree
>Release:        FreeBSD 5.4-STABLE i386 Environment:
>Organization:
>Environment:
>Description:
FreeBSD 6 no longer adds debug.if_* sysctl variables in its default kernel
(according to the release notes), so our heuristic assumes the module is
missing and tries to load it, which fails as the module already exists.

Workaround is possible: drop the interface that is preloaded from openvpn_if.

This is the fix: It adds a second check that uses kldstat -m if_$NAME. Leave
the old check in place for FreeBSD 5.4-RELEASE and older.

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- openvpn-2.0.2_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/security/openvpn/Makefile /root/ports/security/openvpn/Makefile
--- /usr/ports/security/openvpn/Makefile	Tue Sep  6 04:00:30 2005
+++ /root/ports/security/openvpn/Makefile	Sun Sep 18 04:14:06 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	openvpn
 DISTVERSION=	2.0.2
+PORTREVISION=	1
 CATEGORIES=	security
 MASTER_SITES=	http://openvpn.net/release/
 
diff -ruN --exclude=CVS /usr/ports/security/openvpn/files/openvpn.sh.in /root/ports/security/openvpn/files/openvpn.sh.in
--- /usr/ports/security/openvpn/files/openvpn.sh.in	Tue Sep  6 04:00:31 2005
+++ /root/ports/security/openvpn/files/openvpn.sh.in	Sun Sep 18 04:27:09 2005
@@ -59,7 +59,11 @@
 openvpn_precmd()
 {
 	for i in $openvpn_if ; do
-		if ! sysctl debug.if_${i}_debug >/dev/null 2>&1 ; then
+		# FreeBSD <= 5.4 does not know kldstat's -m option
+		# FreeBSD >= 6.0 does not add debug.* sysctl information
+		# in the default build - we check both to keep things simple
+		if ! sysctl debug.if_${i}_debug >/dev/null 2>&1 \
+			&& ! kldstat -m if_${i} >/dev/null 2>&1 ; then
 			if ! kldload if_${i} ; then
 				warn "Could not load $i module."
 				return 1
--- openvpn-2.0.2_1.patch ends here ---


--BB7251B7C3.1127010846/merlin.emma.line.org--
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: vs 
State-Changed-When: Sun Sep 18 12:02:13 GMT 2005 
State-Changed-Why:  
Commited, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=86286 
>Unformatted:
 System: FreeBSD merlin.emma.line.org 5.4-STABLE FreeBSD 5.4-STABLE #12: Fri Sep
 16 22:41:30 CEST 2005
