From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) by mail.openembedded.org (Postfix) with ESMTP id 8A65B6010D for ; Mon, 23 Nov 2015 21:43:38 +0000 (UTC) Received: by lfdl133 with SMTP id l133so39661333lfd.2 for ; Mon, 23 Nov 2015 13:43:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=e3zb4kP0Hd+cODnXJfA5Gr+qoyKFJbwM0JLH7xjd5zU=; b=T9ShOeik1VECYhulCTgUY3CKAXw/U1XaWCu0iArcO5cD4zSTmz+kyyhwYHtkCzVSTC QfbXi2rcZr0k1005lNlV4ddleCADXQjgNTJL3b07G/ix87YMtSWRfTW6DVhfp6tslYlR Cl+lrQFuwDyNq6mb44mDa6yWkx1W++E5KSeHdDCihANtbboEk4ll7587NuWE60fsrpp1 vcDNznOLzEeP3nNYD9v8TKRo5QtBmq2smfSHS6CgdHkJz0w3VfQ2ewm9woxjyNE1DZwc cXtHAwKpxJHmb/GbH/vBL8SGIfHa2ALkNxiBM7LorqLPBahDMy4dXyiscj/al6cgnpoX Cyxg== X-Received: by 10.112.53.167 with SMTP id c7mr12039739lbp.20.1448315018432; Mon, 23 Nov 2015 13:43:38 -0800 (PST) Received: from [192.168.0.12] (c80-217-62-231.bredband.comhem.se. [80.217.62.231]) by smtp.gmail.com with ESMTPSA id b13sm2150311lfb.30.2015.11.23.13.43.37 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 23 Nov 2015 13:43:37 -0800 (PST) Message-ID: <56538888.3060200@gmail.com> Date: Mon, 23 Nov 2015 22:43:36 +0100 From: Ming Liu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "Burton, Ross" References: <1448271748-3210-1-git-send-email-liu.ming50@gmail.com> In-Reply-To: Cc: Ming Liu , OE-core Subject: Re: [PATCH v1] initscripts: do not save timestamp for readonly system X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 21:43:38 -0000 Content-Type: multipart/alternative; boundary="------------010901030806030108060804" --------------010901030806030108060804 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 11/23/2015 10:18 PM, Burton, Ross wrote: > > On 23 November 2015 at 09:42, Ming Liu > wrote: > > +[ -w /etc/timestamp ] && date -u +%4Y%2m%2d%2H%2M%2S > /etc/timestamp > > > This would fail if /etc/timestamp doesn't already exist. I'm tempted > to say you should just 2>/dev/null so it tries and the error is hidden > in case /etc/timestamp is deleted on a writable file system. Yes, that is true! I did not consider that case, then I will send a V2 soon. //Ming Liu > > Ross --------------010901030806030108060804 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

On 11/23/2015 10:18 PM, Burton, Ross wrote:

On 23 November 2015 at 09:42, Ming Liu <liu.ming50@gmail.com> wrote:
+[ -w /etc/timestamp ] && date -u +%4Y%2m%2d%2H%2M%2S > /etc/timestamp

This would fail if /etc/timestamp doesn't already exist.  I'm tempted to say you should just 2>/dev/null so it tries and the error is hidden in case /etc/timestamp is deleted on a writable file system.
Yes, that is true! I did not consider that case, then I will send a V2 soon.

//Ming Liu

Ross 

--------------010901030806030108060804--