From owner-freebsd-questions@FreeBSD.ORG Tue Nov 2 11:44:12 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01CBF10656EA for ; Tue, 2 Nov 2010 11:44:12 +0000 (UTC) (envelope-from lystic1@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 757758FC0C for ; Tue, 2 Nov 2010 11:44:11 +0000 (UTC) Received: by bwz3 with SMTP id 3so5508991bwz.13 for ; Tue, 02 Nov 2010 04:44:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=6TiMrZTsDUZdWaxxwiAmFM/Z28Tl6dp+OJHK7EgnV+U=; b=xtt7iaGMkFvV3yXAke1wpwvC/sc1v9FUEoIoP3Q/9XrGQ7HAbyzYEcpNKtX9eNi7s0 PJkraiT9uRMke66Zbo8UEK9ZCCGsxOW5Tp/nhsESpni6KvmtJH3baChEpEiQEhFGlrDs BVCNAiW7D7Vt0OcJoWVdaImMPiJ1J+rurLYZ4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=ia2tnOlTkOkvSLtrNmoWA9TyUM8lLgVDwbLZ5d6QIj4pptBxZ0E6B9854eIFqdHbzG MGq4bgIAFnxVY+zOxQvPD1hPwSCUQXUz5eTygUhDb/JeRqbI+PwdlwWGgJlpAWJGcoG/ Z+ZIdhnWZgEPfjM+WJU8aXicr7Oj9ZPbPmzQ8= MIME-Version: 1.0 Received: by 10.204.71.209 with SMTP id i17mr13589671bkj.185.1288698249152; Tue, 02 Nov 2010 04:44:09 -0700 (PDT) Received: by 10.204.102.212 with HTTP; Tue, 2 Nov 2010 04:44:09 -0700 (PDT) In-Reply-To: <4CCFEE96.10700@eskk.nu> References: <4CCFD51E.4050701@eskk.nu> <4CCFEE96.10700@eskk.nu> Date: Tue, 2 Nov 2010 06:44:09 -0500 Message-ID: From: Lystic Emsen To: Leslie Jensen Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: Fetching distfiles via cron does not download... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Nov 2010 11:44:12 -0000 On Tue, Nov 2, 2010 at 5:57 AM, Leslie Jensen wrote: > > > Lystic Emsen skrev 2010-11-02 11:53: > > On Tue, Nov 2, 2010 at 4:08 AM, Leslie Jensen wrote: >> >> Hello list. >>> >>> I have the following in /etc/crontab >>> >>> @reboot root portsnap -I cron update&& /root/bin/cv_portsnap_cron&& >>> pkg_version -vIL= >>> >>> >>> I don't see where you are doing a portsnap fetch first. If you haven't >>> >> done a fetch, then the update will probably fail. If the update fails, >> because you are using&& it won't execute the next part of your script. >> > > According to the handbook this command is supposed to do that. > > portsnap -I cron update > > Yeah, you are right, I missed that. However, the problem is that you didn't specify the full path to portsnap. That will cause it to fail and the && operator won't let it proceed. When using cron, you need to specify the full path because cron doesn't have access to all the environment variables your normal shell does. -- Lystic http://UnixNews.net > /Leslie > > > > > > > >> >> >> >>> The script /root/bin/cv_portsnap_cron >>> >>> #!/bin/sh >>> portmaster --clean-distfiles-all >>> portmaster -aF >>> >>> >>> >>> >>> Message received from cron: >>> >>> >>> ===>>> Gathering distinfo list for installed ports >>> >>> ===>>> Checking for stale distfiles >>> ]0;portmaster: All ===>>> Starting check of installed ports for >>> available >>> updates >>> >>> ===>>> Distfile fetching is complete >>> libxul-1.9.2.9_1< needs updating (index has 1.9.2.12) >>> pciids-20101005< needs updating (index has 20101020) >>> >>> >>> Even so I do not get the distfiles downloaded. >>> >>> Where am I going wrong? >>> >>> Thanks >>> >>> >>> /Leslie >>> >>> >>> _______________________________________________ >>> freebsd-questions@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >>> To unsubscribe, send any mail to " >>> freebsd-questions-unsubscribe@freebsd.org" >>> >>> >> >> >> --