From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Jan 14 10:50:02 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39DD416A41A for ; Mon, 14 Jan 2008 10:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 284C513C465 for ; Mon, 14 Jan 2008 10:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m0EAo1xF038463 for ; Mon, 14 Jan 2008 10:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m0EAo1Rr038462; Mon, 14 Jan 2008 10:50:01 GMT (envelope-from gnats) Resent-Date: Mon, 14 Jan 2008 10:50:01 GMT Resent-Message-Id: <200801141050.m0EAo1Rr038462@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jason DiCioccio Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBE9A16A41A for ; Mon, 14 Jan 2008 10:41:38 +0000 (UTC) (envelope-from root@update.ods.org) Received: from update.ods.org (update.ods.org [66.246.72.188]) by mx1.freebsd.org (Postfix) with ESMTP id 9105813C4D5 for ; Mon, 14 Jan 2008 10:41:38 +0000 (UTC) (envelope-from root@update.ods.org) Received: by update.ods.org (Postfix, from userid 0) id 20F0D36254; Mon, 14 Jan 2008 05:25:57 -0500 (EST) Message-Id: <20080114102557.20F0D36254@update.ods.org> Date: Mon, 14 Jan 2008 05:25:57 -0500 (EST) From: Jason DiCioccio To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/119655: stunnel start script does not honor stunnel_config on boot X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jason DiCioccio List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2008 10:50:02 -0000 >Number: 119655 >Category: ports >Synopsis: stunnel start script does not honor stunnel_config on boot >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jan 14 10:50:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Jason DiCioccio >Release: FreeBSD 6.2-RELEASE-p9 i386 >Organization: Open Domain Service >Environment: System: FreeBSD update.ods.org 6.2-RELEASE-p9 FreeBSD 6.2-RELEASE-p9 #1: Sun Jan 13 19:11:14 EST 2008 geniusj@update.ods.org:/usr/obj/usr/src/sys/UPDATE i386 >Description: It's an odd issue. When using the stunnel start script that comes with the port, executing the script manually (rc.d/stunnel.sh start) will correctly start the service. However, this is not the case on boot. It fails to grab the stunnel_config line from rc.conf and instead uses the hardcoded one in the script. >How-To-Repeat: >Fix: diff -urN stunnel.old/Makefile stunnel/Makefile --- stunnel.old/Makefile Tue Nov 13 05:09:51 2007 +++ stunnel/Makefile Mon Jan 14 05:17:31 2008 @@ -78,8 +78,8 @@ post-install: ${SED} "s+!!PREFIX!!+${PREFIX}+g; s+!!RC_SUBR!!+${RC_SUBR}+g" \ - < ${FILESDIR}/stunnel.sh > ${WRKDIR}/stunnel.sh - ${INSTALL_SCRIPT} ${WRKDIR}/stunnel.sh ${PREFIX}/etc/rc.d/ + < ${FILESDIR}/stunnel > ${WRKDIR}/stunnel + ${INSTALL_SCRIPT} ${WRKDIR}/stunnel ${PREFIX}/etc/rc.d/ @${SETENV} PKG_PREFIX=${PREFIX} ${SH} \ ${PKGINSTALL} ${PKGNAME} POST-INSTALL @${ECHO} "" diff -urN stunnel.old/files/stunnel stunnel/files/stunnel --- stunnel.old/files/stunnel Wed Dec 31 19:00:00 1969 +++ stunnel/files/stunnel Mon Jan 14 05:17:14 2008 @@ -0,0 +1,41 @@ +#!/bin/sh +# +# $FreeBSD: ports/security/stunnel/files/stunnel.sh,v 1.7 2007/10/29 16:45:19 roam Exp $ +# + +# PROVIDE: stunnel +# REQUIRE: NETWORKING SERVERS +# BEFORE: DAEMON +# KEYWORD: shutdown + +# +# Add some of the following variables to /etc/rc.conf to configure stunnel: +# stunnel_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable stunnel. +# stunnel_config (str): Default "!!PREFIX!!/etc/stunnel/stunnel.conf" +# Set it to the full path to the config file +# that stunnel will use during the automated +# start-up. +# stunnel_pidfile (str): Default "!!PREFIX!!/var/stunnel/stunnel.pid" +# Set it to the value of 'pid' in +# the stunnel.conf file. +# + +. !!RC_SUBR!! + +name="stunnel" +rcvar=`set_rcvar` + +load_rc_config $name + +: ${stunnel_enable="NO"} +: ${stunnel_config="!!PREFIX!!/etc/stunnel/${name}.conf"} +: ${stunnel_pidfile="/var/run/${name}.pid"} + +command="!!PREFIX!!/bin/stunnel" +command_args=${stunnel_config} +pidfile=${stunnel_pidfile} + +required_files="${stunnel_config}" + +run_rc_command "$1" diff -urN stunnel.old/files/stunnel.sh stunnel/files/stunnel.sh --- stunnel.old/files/stunnel.sh Mon Jan 14 05:14:35 2008 +++ stunnel/files/stunnel.sh Wed Dec 31 19:00:00 1969 @@ -1,41 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: ports/security/stunnel/files/stunnel.sh,v 1.7 2007/10/29 16:45:19 roam Exp $ -# - -# PROVIDE: stunnel -# REQUIRE: NETWORKING SERVERS -# BEFORE: DAEMON -# KEYWORD: shutdown - -# -# Add some of the following variables to /etc/rc.conf to configure stunnel: -# stunnel_enable (bool): Set to "NO" by default. -# Set it to "YES" to enable stunnel. -# stunnel_config (str): Default "!!PREFIX!!/etc/stunnel/stunnel.conf" -# Set it to the full path to the config file -# that stunnel will use during the automated -# start-up. -# stunnel_pidfile (str): Default "!!PREFIX!!/var/stunnel/stunnel.pid" -# Set it to the value of 'pid' in -# the stunnel.conf file. -# - -. !!RC_SUBR!! - -name="stunnel" -rcvar=`set_rcvar` -stunnel_config="!!PREFIX!!/etc/stunnel/${name}.conf" -stunnel_pidfile="/var/run/${name}.pid" -command="!!PREFIX!!/bin/stunnel" - -[ -z "$stunnel_enable" ] && stunnel_enable="NO" - -load_rc_config $name - -command_args=${stunnel_config} -pidfile=${stunnel_pidfile} - -required_files="${stunnel_config}" - -run_rc_command "$1" diff -urN stunnel.old/pkg-plist stunnel/pkg-plist --- stunnel.old/pkg-plist Mon Oct 29 12:45:19 2007 +++ stunnel/pkg-plist Mon Jan 14 05:18:57 2008 @@ -1,6 +1,6 @@ bin/stunnel bin/stunnel3 -etc/rc.d/stunnel.sh +etc/rc.d/stunnel etc/stunnel/stunnel.conf-sample lib/stunnel/libstunnel.a lib/stunnel/libstunnel.la >Release-Note: >Audit-Trail: >Unformatted: