From owner-freebsd-questions@FreeBSD.ORG Thu Aug 26 07:54:48 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D092016A4CE for ; Thu, 26 Aug 2004 07:54:48 +0000 (GMT) Received: from smtp813.mail.sc5.yahoo.com (smtp813.mail.sc5.yahoo.com [66.163.170.83]) by mx1.FreeBSD.org (Postfix) with SMTP id 95C8F43D49 for ; Thu, 26 Aug 2004 07:54:48 +0000 (GMT) (envelope-from krinklyfig@spymac.com) Received: from unknown (HELO smogmonster.com) (jtinnin@pacbell.net@64.171.1.210 with login) by smtp813.mail.sc5.yahoo.com with SMTP; 26 Aug 2004 07:54:48 -0000 From: Joshua Tinnin To: "FreeBSD-questions" Date: Thu, 26 Aug 2004 00:54:50 -0700 User-Agent: KMail/1.6.2 References: <200408260007.26659.krinklyfig@spymac.com> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200408260054.50119.krinklyfig@spymac.com> Subject: Re: crontab question involving cvsup X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: krinklyfig@spymac.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Aug 2004 07:54:49 -0000 On Thursday 26 August 2004 12:19 am, Subhro Kar wrote: > First of all, you need to read the manual page for cvsup. It is > clearly stated that the option -L shows the amount of verbosity cvsup > maintains. If you are running it from inside a script, then either > you have to > reduce the verbosity to 1 ie, the command will be cvsup -g -L 1 > supfile OR > redirect the output to some file (if you want to look into it later) > or to /dev/null to discard it. Yes, I've read the cvsup man page, but hadn't considered that verbosity might cause a failure if it's not directed. I think that might have been my problem. I had previously been directing output to a file, but not recently. > Secondly, You can always set up multiple crontabs. But since you are > using && (ie doo only if prev was successful), that would works if > the output of cvsup is properly dealt with. Well, again I know cvsup is working, but I think the verbosity might be a problem in executing the next command; i.e., I think since it can't direct output, it does run cvsup but "fails" in the verbosity aspect, and therefore no more commands are executed after. In any event, I think I'll try it with cvsup -g -L 2 supfile > /dev/null 2>&1 (of course with the proper paths) and see what happens, and alternately try to direct output to a file the next time, as I'd like to have a log. I'll probably also change it to portsdb -Uu as Ivailo suggested, as I don't need to have it run quickly when it's a daily job done when I'm sleeping. Thanks for the help. - jt > Regards > > S. > > On Thu, 26 Aug 2004 00:07:26 -0700, Joshua Tinnin wrote: > > OK, I have searched the archives, and I can't find that my question > > has been answered previously, but please forgive me if that's > > incorrect. > > > > I'm using (or rather trying to use) cron to update my ports tree > > daily. I've tried several different combinations without success, > > and lately this is what I have in my crontab file: > > > > /usr/local/bin/cvsup -g -L 2 > > /home/krinklyfig/supfiles/ports-supfile && /usr/local/bin/portindex > > && /usr/local/sbin/portsdb -u > > > > It runs as root once a day. What appears to be happening is that > > the cvsup is happening, but portindex is not, and because of the > > latter portsdb -u doesn't either. The reason I know cvsup is > > working is because portindex indicates that the ports tree has been > > updated if I run it manually later, but running portversion before > > manually running portindex will not indicate any changes. The cron > > log doesn't show anything but the commands being executed. So, my > > question is: is this type of command valid, or should each command > > be separate? Or is it not working for some other reason? > > > > - jt