From owner-freebsd-questions Wed Feb 3 11:37:48 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA08824 for freebsd-questions-outgoing; Wed, 3 Feb 1999 11:37:48 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from mta1-rme.xtra.co.nz (mta.xtra.co.nz [203.96.92.1]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA08816 for ; Wed, 3 Feb 1999 11:37:45 -0800 (PST) (envelope-from junkmale@pop3.xtra.co.nz) Received: from wocker ([210.55.210.87]) by mta1-rme.xtra.co.nz (InterMail v04.00.02.07 201-227-108) with SMTP id <19990203193736.KXIR682101.mta1-rme@wocker> for ; Thu, 4 Feb 1999 08:37:36 +1300 From: "Dan Langille" Organization: The FreeBSD Diary To: freebsd-questions@FreeBSD.ORG Date: Thu, 4 Feb 1999 08:37:37 +1300 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: how do I start cvsupd? Reply-to: junkmale@xtra.co.nz In-reply-to: <19990203083455.IDNO682101.mta1-rme@wocker> X-mailer: Pegasus Mail for Win32 (v3.01d) Message-Id: <19990203193736.KXIR682101.mta1-rme@wocker> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 3 Feb 99, at 21:34, Dan Langille wrote: > I'm in the process of starting up a freebsd mirror site. The port appears > to have installed correctly. cvsupd was going out and asking for files. > It wasn't getting any because it was looking at freefall.freebsd.org and > it was not configured for my firewall. > > So I've modified /usr/local/etc/cvsup/update.sh to include "-P -" to > select passive mode. I've also changed /usr/local/etc/cvsup/config.sh to > include the following line: > > host="cvsup.au.FreeBSD.org" > > My problem is not knowing how to start cvsupd from the command line. > > /usr/local/etc/rc.d/cvsupd.sh contains: > > ! /bin/sh > > if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/cvsupd\.sh\$"); then > echo "$0: Cannot determine the PREFIX" >&2 > exit 1 > fi > base=${PREFIX}/etc/cvsup > out=/var/tmp/cvsupd.out > > export PATH=/bin:/usr/bin:${PREFIX}/sbin > umask 2 > > test -x ${PREFIX}/sbin/cvsupd || exit 1 > echo -n " cvsupd" > cd ${base} || exit > . ./config.sh || exit > su -m ${user} -c \ > "cvsupd -e -C ${maxclients} -l @${facility} -s sup.client" >>${out} > 2>&1 > > > But if I run it I get: > > [root@ns:/usr/local/etc/rc.d] # ./cvsupd.sh > ./cvsupd.sh: Cannot determine the PREFIX > > I'm assuming PREFIX should be /usr/local. But that's as far as I can get. > > cheers. > I now have what I think is a solution. I removed the first few lines of the shell. mycvsupd.sh contains: #! /bin/sh base=${PREFIX}/etc/cvsup out=/var/tmp/cvsupd.out export PATH=/bin:/usr/bin:${PREFIX}/sbin umask 2 test -x ${PREFIX}/sbin/cvsupd || exit 1 echo -n " cvsupd" cd ${base} || exit . ./config.sh || exit su -m ${user} -c \ "cvsupd -e -C ${maxclients} -l @${facility} -s sup.client" >>${out} 2>&1 running the script gives: [root@ns:/usr/local/etc/rc.d] # ./mycvsupd.sh cvsupd[root@ns:/usr/local/etc/rc.d] # ps -auws | grep cvsup [root@ns:/usr/local/etc/rc.d] # ps -auwx | grep cvsup root 188 56.1 17.4 1492 2472 ?? R 7:34AM 16:27.76 cvsup - 1gL 1 -c sup.client -h cvsup.au.FreeBSD.org -P - supfile.no root 160 0.0 1.3 484 180 ?? Is 7:33AM 0:00.21 /bin/sh - c /usr/local/etc/cvsup/update.sh root 161 0.0 1.3 492 184 ?? I 7:33AM 0:00.39 /bin/sh /usr/local/etc/cvsup/update.sh root 183 0.0 1.9 140 260 ?? I 7:33AM 0:00.14 lockf -t 0 /var/spool/lock/cvsup.lock /bin/sh cvsup 244 0.0 9.3 908 1312 ?? Is 8:01AM 0:00.12 cvsupd -e -C 8 -l @daemon -s sup.client root 248 0.0 4.0 176 560 p1 R+ 8:02AM 0:00.24 grep cvsup So it looks like it's running. But I doubt it has the correct settings. I have yet to test it as a server. Any suggestions as to the cvsupd.sh script? -- Dan Langille The FreeBSD Diary http://www.FreeBSDDiary.com/freebsd To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message