pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/43960: pkgsrc/devel/cvsup add sample RC script
>Number: 43960
>Category: pkg
>Synopsis: pkgsrc/devel/cvsup add sample RC script
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Oct 10 23:00:00 +0000 2010
>Originator: Brian A. Seklecki
>Release: NetBSD metrotitan 5.99.39 NetBSD 5.99.39
>(METROTITAN-$Revision: 1.993 $) #0: Wed Oct 6 13:26:31 EDT 2010
>root@metrotitan:/usr/obj/sys/arch/i386/compile/METROTITAN i386
>Organization:
Collaborative Fusion, Inc.
>Environment:
NetBSD metrotitan 5.99.39 NetBSD 5.99.39 (METROTITAN-$Revision: 1.993 $) #0:
Wed Oct 6 13:26:31 EDT 2010
root@metrotitan:/usr/obj/sys/arch/i386/compile/METROTITAN i386
>Description:
Systems with daemonizing service normally ship an RC script to egg you along:
bash-4.1# grep -ri rcd /usr/pkgsrc/net/rsync/
/usr/pkgsrc/net/rsync/Makefile:RCD_SCRIPTS= rsyncd
/usr/pkgsrc/net/rsync/Makefile:RCD_SCRIPT_SRC.rsyncd= files/rsyncd.sh
/usr/pkgsrc/net/rsync/files/rsyncd.sh:#!@RCD_SCRIPTS_SHELL@
However CVSUP doesn't ship one:
bash-4.1# grep -ri rcd /usr/pkgsrc/devel/cvsup*
As a side note, more proliferated use of cvsupd would significantly reduce the
load on the main anoncvs.netbsd.org mirror.
>How-To-Repeat:
Install cvsupd; proceed to configure it for autostart in rc.conf(5).... D`oh!
>Fix:
Ship a file such as the patch below:
# diff -u ~bseklecki/Makefile.common.cvsupd Makefile.common
--- /home/bseklecki/Makefile.common.cvsupd 2010-10-10 18:44:27.000000000
-0400
+++ Makefile.common 2010-10-10 18:44:53.000000000 -0400
@@ -37,6 +37,10 @@
BUILD_DEFS+= CVSUP_STATIC
CVSUP_STATIC?= NO
+RCD_SCRIPTS= cvsupd
+RCD_SCRIPT_SRC.cvsupd= files/cvsupd.sh
+
+
.if defined(CVSUP_STATIC) && !empty(CVSUP_STATIC:M[Yy][Ee][Ss])
M3FLAGS+= -DSTATIC
STATIC= -static
----------------------------------------------------
----------------------------------------------------
----------------------------------------------------
bash-4.1# more files/cvsupd.sh
#!/bin/sh
#
# $NetBSD$
#
# PROVIDE: cvsupd
# REQUIRE: DAEMON
. /etc/rc.subr
name="cvsupd"
rcvar=$name
command="@PREFIX@/sbin/${name}"
#pidfile="/var/run/${name}.pid"
[ -z "$cvsupd_user" ] && cvsupd_user="cvsupd"
[ -z "$cvsupd_basedir" ] && cvsupd_basedir="@PKG_SYSCONFDIR@/cvsup"
[ -z "$cvsupd_maxclients" ] && cvsupd_maxclients="8"
[ -z "$cvsupd_syslogfacil" ] && cvsupd_syslogfacil="@local0"
[ -z "$cvsupd_collection_dir" ] && cvsupd_collection_dir="sup"
# If not absolute, relative to $basedir
[ -z "$cvsupd_mirrormode_scandir" ] &&
cvsupd_mirrormode_scandir="sup-client-scan" # If not absolute, relative to
$basedir
# Config files, which are read in a compound fashion, are stored within
# {$basedir:="/usr/pkg/etc/cvsup}/sup/*/*, by default, one subdir for each
# collection
command_args="-e -C ${cvsupd_maxclients} -l ${cvsupd_syslogfacil} -b
${cvsupd_basedir} -c ${cvsupd_collection_dir} -s ${cvsupd_mirrormod_scandir}"
load_rc_config $name
run_rc_command "$1"
Home |
Main Index |
Thread Index |
Old Index