ports/86286: [MAINTAINER] security/openvpn: update RC script for FreeBSD 6

Matthias Andree matthias.andree at gmx.de
Sun Sep 18 02:50:02 UTC 2005


>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:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 18 02:50:00 GMT 2005
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:
 System: FreeBSD merlin.emma.line.org 5.4-STABLE FreeBSD 5.4-STABLE #12: Fri Sep
 16 22:41:30 CEST 2005



More information about the freebsd-ports-bugs mailing list