From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from 93-97-173-237.zone5.bethere.co.uk ([93.97.173.237] helo=tim.rpsys.net) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1RimZl-0006rO-8E for openembedded-core@lists.openembedded.org; Thu, 05 Jan 2012 13:37:45 +0100 Received: from localhost (localhost [127.0.0.1]) by tim.rpsys.net (8.13.6/8.13.8) with ESMTP id q05CUNdV004806 for ; Thu, 5 Jan 2012 12:30:23 GMT Received: from tim.rpsys.net ([127.0.0.1]) by localhost (tim.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 04675-01 for ; Thu, 5 Jan 2012 12:30:20 +0000 (GMT) Received: from [192.168.3.10] ([192.168.3.10]) (authenticated bits=0) by tim.rpsys.net (8.13.6/8.13.8) with ESMTP id q05CUFBY004800 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 5 Jan 2012 12:30:17 GMT Message-ID: <1325766615.20759.67.camel@ted> From: Richard Purdie To: Patches and discussions about the oe-core layer Date: Thu, 05 Jan 2012 12:30:15 +0000 In-Reply-To: References: <4EFBAC18.3040909@intel.com> <4F03982D.1080601@linux.intel.com> X-Mailer: Evolution 3.2.2- Mime-Version: 1.0 X-Virus-Scanned: amavisd-new at rpsys.net Subject: Re: [PATCH] image_types: Ensure /init exists for cpio rootfs archives X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Patches and discussions about the oe-core layer List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2012 12:37:45 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit On Thu, 2012-01-05 at 01:05 +0100, Andrea Adami wrote: > I'd say we have to test for the in-existence of the file instead of > blindly touching it. > Smthg like > > if [! -e ${IMAGE_ROOTFS}/init]; then > touch ${IMAGE_ROOTFS}/init > fi > > > Now, repeating that block for all 4 cpio images is a bit ugly... better ideas? Make it a shell function we call? I'd also check for ${base_sbindir}/init first too? Cheers, Richard