From patchwork Wed Dec 11 08:28:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Mads_Dor=C3=A9_Hansen?= X-Patchwork-Id: 299870 X-Patchwork-Delegate: esben@haabendal.dk Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hugin.dotsrc.org (hugin.dotsrc.org [IPv6:2001:878:346::102]) by ozlabs.org (Postfix) with ESMTP id F15FA2C030C for ; Wed, 11 Dec 2013 19:28:25 +1100 (EST) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id 9CF643F837 for ; Wed, 11 Dec 2013 09:28:24 +0100 (CET) X-Original-To: dev@oe-lite.org Delivered-To: dev@oe-lite.org Received: from ispc7.dotserv.com (ssl7.dotserv.com [178.20.217.17]) by hugin.dotsrc.org (Postfix) with ESMTPS id D0F553F837 for ; Wed, 11 Dec 2013 09:28:22 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by ispc7.dotserv.com (Postfix) with ESMTP id 46E7F563D3D for ; Wed, 11 Dec 2013 09:28:22 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at ispc7.dotserv.com Received: from ispc7.dotserv.com ([127.0.0.1]) by localhost (ispc7.dotserv.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vzW-RIizNYmz for ; Wed, 11 Dec 2013 09:28:18 +0100 (CET) Received: from localhost.localdomain (unknown [195.215.105.114]) (Authenticated sender: dore@madsdore.dk) by ispc7.dotserv.com (Postfix) with ESMTPSA id 9A19D5630DD for ; Wed, 11 Dec 2013 09:28:18 +0100 (CET) From: =?UTF-8?q?Mads=20Dor=C3=A9=20Hansen?= To: dev@oe-lite.org Subject: [PATCH] Fixed crontab, when root crontabs are empty. Date: Wed, 11 Dec 2013 09:28:12 +0100 Message-Id: <1386750492-8919-1-git-send-email-dore@madsdore.dk> X-Mailer: git-send-email 1.8.4 X-BeenThere: dev@oe-lite.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: OE-lite development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dev-bounces@oe-lite.org Errors-To: dev-bounces@oe-lite.org --- classes/image_crontab.oeclass | 4 ++-- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/classes/image_crontab.oeclass b/classes/image_crontab.oeclass index 32899a5..f1165c6 100644 --- a/classes/image_crontab.oeclass +++ b/classes/image_crontab.oeclass @@ -6,8 +6,10 @@ image_preprocess_crontab () { cwd=`pwd` test -d $cwd/${crontabdir} || return 0 for f in $cwd/${crontabdir}/*.* ; do - user=`basename $f | cut -d. -f1` - cat $f >> $cwd${crontabdir}/$user - rm $f + if [ "$f" != "$cwd/${crontabdir}/*.*" ] ; then + user=`basename $f | cut -d. -f1` + cat $f >> $cwd${crontabdir}/$user + rm $f + fi done }