Skip site navigation (1)Skip section navigation (2)
Date:      Thu,  8 Jun 2006 08:33:08 +0400 (MSD)
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        Doug Barton <dougb@FreeBSD.org>
Subject:   ports/98692: [patch][update] Small fix for devel/cvsd
Message-ID:  <20060608043308.CA41815C4A@mail.heavennet.ru>
Resent-Message-ID: <200606080710.k587AAJa009337@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         98692
>Category:       ports
>Synopsis:       [patch][update] Small fix for devel/cvsd
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 08 07:10:10 GMT 2006
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060608043308.CA41815C4A>