From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PrBDD-0007ZU-Jy for garchives@archives.gentoo.org; Sun, 20 Feb 2011 15:28:39 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 254B51C002; Sun, 20 Feb 2011 15:27:16 +0000 (UTC) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by pigeon.gentoo.org (Postfix) with ESMTP id E7BF81C002 for ; Sun, 20 Feb 2011 15:27:15 +0000 (UTC) Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id A1091208B2 for ; Sun, 20 Feb 2011 10:27:15 -0500 (EST) Received: from frontend2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Sun, 20 Feb 2011 10:27:15 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:subject:references:in-reply-to:content-type; s=smtpout; bh=TtfbyD4ouyzFicwbmwhBZdhbVjc=; b=Hu718IBX43X9f5w1bX20R4m1e5cZqI2aeJnp6tDJe7KhnTnZjjorG9My7q8jZRP61Q4vCoMkXv8wncu77q63rJ39hXJBbUB6NFzmBbAdn5kTSBUFR5sC1BDEDZxD+7JMQ9Aclti0UZA5nE2Cvgnw8rhqX/F2X84qV1JqyhStvzI= X-Sasl-enc: RqGheoLmbvf3NoUCWdSJJ7GznpKh98HWZvX/GeILQXnp 1298215634 Received: from [192.168.5.18] (lvps83-169-5-6.dedicated.hosteurope.de [83.169.5.6]) by mail.messagingengine.com (Postfix) with ESMTPSA id EFEED445941 for ; Sun, 20 Feb 2011 10:27:13 -0500 (EST) Message-ID: <4D6132C9.5070607@binarywings.net> Date: Sun, 20 Feb 2011 16:27:05 +0100 From: Florian Philipp User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20110119 Lightning/1.0b3pre Thunderbird/3.1.7 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] irritating cron habit References: <20110220140407.GC3758@ca.inter.net> In-Reply-To: <20110220140407.GC3758@ca.inter.net> X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig71074429E6202DCF4FD121B1" X-Archives-Salt: X-Archives-Hash: 4e91fcf53c9d70e20b2f075f75ac9d2f This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig71074429E6202DCF4FD121B1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Am 20.02.2011 15:04, schrieb Philip Webb: > I fetch my mail using a user cron job, as recommended for security. > I also start my Internet connection by hand after logging in: > this is to avoid the jam which arises if it is included in the runlevel= > but for some reason the physical Net connection isn't functioning, > when Dhcpcd sits there & can't be killed via Control-C. > Usually, this works very well, but occasionally the cron job runs > before the Dhcpcd command has made the necessary connection > -- it depends on when the start-of-minute falls -- , > which results in a file ~/dead.letter , which has to be deleted > (the sequence of commands is clear from the Syslog file). >=20 > Is there a way to fix this ? -- I could perhaps write a 2-line script > which would run 'dhcpcd eth0 ; /etc/init.d/vixie-cron', > while removing Vixie-cron from the Default runlevel. >=20 > Does anyone have useful suggestions ? >=20 When dhcpcd runs, there should be the following files: /var/run/dhcpcd.pid /var/run/dhcpcd-eth0.pid Just change your cron job to look like test -e /var/run/dhcpcd.pid && fetchmail You can also do something like parsing the output of `/sbin/ifconfig eth0` with grep -q to see whether it has an ip address so that your cron job also works when you configure your address statically. /sbin/ifconfig eth0 | grep -q '\