From butcher@heavennet.ru  Thu Jun  8 07:02:11 2006
Return-Path: <butcher@heavennet.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 4F01216C7EC
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  8 Jun 2006 04:33:12 +0000 (UTC)
	(envelope-from butcher@heavennet.ru)
Received: from mail.insysnet.ru (ns2.insysnet.ru [81.18.141.4])
	by mx1.FreeBSD.org (Postfix) with SMTP id 571E843D45
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  8 Jun 2006 04:33:10 +0000 (GMT)
	(envelope-from butcher@heavennet.ru)
Received: (qmail 10781 invoked by uid 3005); 8 Jun 2006 04:33:09 -0000
Received: from butcher@heavennet.ru by mail.insysnet.ru by uid 3002 with qmail-scanner-1.15 
 (Virus scan  Clear:. 
 Processed in 0.116404 secs); 08 Jun 2006 04:33:09 -0000
Received: from unknown (HELO mail.heavennet.ru) (81.18.141.41)
  by mail.insysnet.ru with SMTP; 8 Jun 2006 04:33:08 -0000
Received: by mail.heavennet.ru (Postfix, from userid 1000)
	id CA41815C4A; Thu,  8 Jun 2006 08:33:08 +0400 (MSD)
Message-Id: <20060608043308.CA41815C4A@mail.heavennet.ru>
Date: Thu,  8 Jun 2006 08:33:08 +0400 (MSD)
From: Andrey V. Elsukov <bu7cher@yandex.ru>
Reply-To: Andrey V. Elsukov <bu7cher@yandex.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Doug Barton <dougb@FreeBSD.org>
Subject: [patch][update] Small fix for devel/cvsd
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         98692
>Category:       ports
>Synopsis:       [patch][update] Small fix for devel/cvsd
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dougb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 08 07:10:10 GMT 2006
>Closed-Date:    Thu Jun 08 17:02:17 GMT 2006
>Last-Modified:  Thu Jun 08 17:02:17 GMT 2006
>Originator:     Andrey V. Elsukov
>Release:        FreeBSD
>Organization:
>Environment:
	FreeBSD 6.1, 4.8, 4.11
>Description:
	Fix startup script.
	Requested by: dougb@
>How-To-Repeat:
>Fix:

--- cvsd.diff begins here ---
--- cvsd/Makefile	Tue Jun  6 09:33:00 2006
+++ cvsd/Makefile	Thu Jun  8 09:06:42 2006
@@ -8,7 +8,7 @@
 
 PORTNAME=	cvsd
 PORTVERSION=	1.0.12
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	devel
 MASTER_SITES=	http://ch.tudelft.nl/~arthur/cvsd/
 
@@ -31,7 +31,7 @@
 PLIST_FILES=	etc/cvsd/cvsd.conf.sample sbin/cvsd sbin/cvsd-buginfo \
 		sbin/cvsd-buildroot sbin/cvsd-passwd
 PLIST_DIRS=	etc/cvsd
-USE_RC_SUBR=	cvsd.sh
+USE_RC_SUBR=	cvsd
 
 .include <bsd.port.pre.mk>
 
--- cvsd/files/cvsd.in	Thu Jan  1 00:00:00 1970
+++ cvsd/files/cvsd.in	Thu Jun  8 09:08:04 2006
@@ -0,0 +1,59 @@
+#!/bin/sh
+# $FreeBSD$
+#
+# PROVIDE: cvsd
+# REQUIRE: LOGIN syslogd
+# KEYWORD: nojail shutdown
+
+. %%RC_SUBR%%
+
+name="cvsd"
+rcvar=${name}_enable
+
+command="%%PREFIX%%/sbin/$name"
+command_args='-f $cvsd_config'
+required_files=$cvsd_config
+
+start_precmd=${name}_prestart
+stop_precmd=cvsd_config
+stop_postcmd=${name}_poststop
+
+cvsd_config()
+{
+	osreldate=`sysctl -n kern.osreldate`
+	chrootjail=`sed -n 's/^ *RootJail *\([^ ]*\) *$/\1/p' < $cvsd_config`
+	if [ -z "$chrootjail" ]; then
+		err 1 "RootJail is not specified in $cvsd_config"
+	fi
+
+	pidfile=`sed -n 's/^ *PidFile *\([^ ]*\) *$/\1/p' < $cvsd_config`
+	if [ -z "$pidfile" ]; then
+		err 1 "PidFile is not specified in $cvsd_config"
+	fi
+}
+
+cvsd_prestart()
+{
+	cvsd_config
+	if [ $osreldate -gt 500000 ]; then
+		mount -t devfs devfs $chrootjail/dev
+		devfs -m $chrootjail/dev rule apply hide
+		devfs -m $chrootjail/dev rule apply path null unhide
+		devfs -m $chrootjail/dev rule apply path zero unhide
+	fi
+
+}
+
+cvsd_poststop()
+{
+	if [ $osreldate -gt 500000 ]; then
+		umount -t devfs $chrootjail/dev
+	fi
+}
+
+load_rc_config $name
+
+: ${cvsd_enable="NO"}
+: ${cvsd_config="%%PREFIX%%/etc/$name/$name.conf"}
+
+run_rc_command "$1"
--- cvsd/files/cvsd.sh.in	Tue Jun  6 09:33:00 2006
+++ cvsd/files/cvsd.sh.in	Thu Jan  1 00:00:00 1970
@@ -1,52 +0,0 @@
-#!/bin/sh
-# $FreeBSD:
-#
-# PROVIDE: cvsd
-# REQUIRE: NETWORKING
-# KEYWORD: nojail
-
-. %%RC_SUBR%%
-
-name="cvsd"
-rcvar=`set_rcvar`
-command="%%PREFIX%%/sbin/$name"
-
-load_rc_config $name
-
-: ${cvsd_enable="NO"}
-: ${cvsd_config="%%PREFIX%%/etc/$name/$name.conf"}
-
-command_args="-f $cvsd_config"
-
-start_precmd="cvsd_prestart"
-stop_postcmd="cvsd_poststop"
-
-cvsd_prestart()
-{
-	if [ $osreldate -gt 500000 ]; then
-		mount -t devfs devfs $jail/dev
-		devfs -m $jail/dev rule apply hide
-		devfs -m $jail/dev rule apply path null unhide
-		devfs -m $jail/dev rule apply path zero unhide
-	fi
-}
-
-cvsd_poststop()
-{
-	if [ $osreldate -gt 500000 ]; then
-		umount -t devfs $jail/dev
-	fi
-}
-
-jail=`sed -n 's/^ *RootJail *\([^ ]*\) *$/\1/p' < $cvsd_config`
-pidfile=`sed -n 's/^ *PidFile *\([^ ]*\) *$/\1/p' < $cvsd_config`
-osreldate=`sysctl -n kern.osreldate`
-if [ "$jail" = "X$jail" ]; then
-	err 1 "RootJail is not specified in $cvsd_config"
-fi
-if [ "$pidfile" = "X$pidfile" ]; then
-	err 1 "PidFile is not specified in $cvsd_config"
-fi
-
-run_rc_command "$1"
-
--- cvsd.diff ends here ---


>Release-Note:
>Audit-Trail:
Class-Changed-From-To: update->maintainer-update 
Class-Changed-By: edwin 
Class-Changed-When: Thu Jun 8 10:20:30 UTC 2006 
Class-Changed-Why:  
Fix category (submitter is maintainer) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=98692 
State-Changed-From-To: open->closed 
State-Changed-By: dougb 
State-Changed-When: Thu Jun 8 16:56:26 UTC 2006 
State-Changed-Why:  

Committed, thanks! 


Responsible-Changed-From-To: freebsd-ports-bugs->dougb 
Responsible-Changed-By: dougb 
Responsible-Changed-When: Thu Jun 8 16:56:26 UTC 2006 
Responsible-Changed-Why:  

I worked with the author on this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=98692 
>Unformatted:
