From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail5.wrs.com (mail5.windriver.com [192.103.53.11]) by mail.openembedded.org (Postfix) with ESMTP id 69FAB6FEFA for ; Tue, 16 Feb 2016 02:14:29 +0000 (UTC) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id u1G2ETul021080 (version=TLSv1 cipher=AES128-SHA bits=128 verify=OK); Mon, 15 Feb 2016 18:14:30 -0800 Received: from [128.224.162.231] (128.224.162.231) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server id 14.3.248.2; Mon, 15 Feb 2016 18:14:28 -0800 To: "Burton, Ross" References: From: Kang Kai Message-ID: <56C28603.9050200@windriver.com> Date: Tue, 16 Feb 2016 10:14:27 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Cc: OE-core Subject: Re: [PATCH 1/1] useradd_base.bbclass: fix simultaneous with flock 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: Tue, 16 Feb 2016 02:14:32 -0000 Content-Type: multipart/alternative; boundary="------------000309060400080900050703" --------------000309060400080900050703 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit On 2016年02月15日 20:31, Burton, Ross wrote: > > On 15 February 2016 at 01:59, > wrote: > > + eval flock -x -w 100 > $rootdir/tmp/user-and-group-ops.flock -c \'$PSEUDO useradd > $opts\' || true > > > This is a great patch, but why not just flock $rootdir/etc instead of > new file in tmp? Surely images end up being created with > /tmp/user-and-group-ops.flock in them? I didn't try to think take a directory as a lock and I'll try it. For the lock file in $rootdir/tmp/, it is ok that /tmp will be remounted and user won't see the lock file. Thanks, Kai > > Ross -- Regards, Neil | Kai Kang --------------000309060400080900050703 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 8bit
On 2016年02月15日 20:31, Burton, Ross wrote:

On 15 February 2016 at 01:59, <kai.kang@windriver.com> wrote:
+               eval flock -x -w 100 $rootdir/tmp/user-and-group-ops.flock -c  \'$PSEUDO useradd $opts\' || true

This is a great patch, but why not just flock $rootdir/etc instead of new file in tmp?    Surely images end up being created with /tmp/user-and-group-ops.flock in them?

I didn't try to think take a directory as a lock and I'll try it.  For the lock file in $rootdir/tmp/, it is ok that /tmp will be remounted and user won't see the lock file.

Thanks,
Kai




Ross


-- 
Regards,
Neil | Kai Kang
--------------000309060400080900050703--