From owner-freebsd-questions Wed Oct 3 21: 4:39 2001 Delivered-To: freebsd-questions@freebsd.org Received: from scaup.mail.pas.earthlink.net (scaup.mail.pas.earthlink.net [207.217.121.49]) by hub.freebsd.org (Postfix) with ESMTP id 0C6C337B401 for ; Wed, 3 Oct 2001 21:04:36 -0700 (PDT) Received: from blossom.cjclark.org (dialup-209.247.140.64.Dial1.SanJose1.Level3.net [209.247.140.64]) by scaup.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id VAA17041; Wed, 3 Oct 2001 21:04:33 -0700 (PDT) Received: (from cjc@localhost) by blossom.cjclark.org (8.11.6/8.11.3) id f94440P10800; Wed, 3 Oct 2001 21:04:00 -0700 (PDT) (envelope-from cjc) Date: Wed, 3 Oct 2001 21:04:00 -0700 From: "Crist J. Clark" To: "Dan O'Connor" Cc: Ernst de Haan , questions@FreeBSD.ORG Subject: Re: Automatically cvsupdating? Message-ID: <20011003210400.N8391@blossom.cjclark.org> Reply-To: cjclark@alum.mit.edu References: <200110011017.f91AHRE02734@zaphod.euronet.nl> <047b01c14c73$92122fe0$059b140a@dan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <047b01c14c73$92122fe0$059b140a@dan>; from dan@mostgraveconcern.com on Wed, Oct 03, 2001 at 06:23:50PM -0700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Oct 03, 2001 at 06:23:50PM -0700, Dan O'Connor wrote: > > If I would like to run cvsup every night or so, and have the output sent to > a > > certain email address, how would I do that? > > > This is how I do it every Friday night... > > In /etc/crontab: > > # Run cvsup every Friday night at 10:00 pm. > 0 22 * * 5 root /usr/local/bin/cvsrun | sendmail root > > (Note: change the fifth field ("5") to "*" to get it to run every night. > Change the sendmail target to whatever user you want the email sent to.) > > Then, create an executable file /usr/local/bin/cvsrun: > > echo "Subject: `hostname` weekly cvsup run" > echo "Content-type: text/html" > echo "" > echo "" > echo "
"
>     /usr/local/bin/cvsup -g -L 2 /usr/src/stable-supfile
>     echo "
" > > This should get you started. The /usr/src/Makefile has this type of functionality built in. See the 'update' target. Put the appropriate settings for, # CVSup update flags. Edit SUPFILE settings to reflect whichever distribution # file(s) you use on your site (see /usr/share/examples/cvsup/README for more # information on CVSup and these files). To use, do "make update" in /usr/src. # #SUP_UPDATE= yes # #SUP= /usr/local/bin/cvsup #SUPFLAGS= -g -L 2 #SUPHOST= cvsup.uk.FreeBSD.org #SUPFILE= /usr/share/examples/cvsup/stable-supfile #PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile #DOCSUPFILE= /usr/share/examples/cvsup/doc-supfile In your /etc/make.conf and edit your supfiles accordingly. Add a line like, # CVSup source code and ports once a week, do it during wee hours Saturday 0 4 * * 6 cvs cd /usr/src; make update >> /var/log/cvsup.log 2>&1 To your /etc/crontab. If you wish to send the output to a specfic email address, pipe the output of the command to the appropriate address rather than the redirects shown. -- Crist J. Clark cjclark@alum.mit.edu cjclark@jhu.edu cjc@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message