All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Ohly <patrick.ohly@intel.com>
To: Phil Blundell <pb@pbcl.net>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/1] rootfs-postcommands.bbclass: sort passwd entries
Date: Sun, 08 Jan 2017 15:04:09 +0100	[thread overview]
Message-ID: <1483884249.4383.31.camel@intel.com> (raw)
In-Reply-To: <1483868215.4360.185.camel@pbcl.net>

On Sun, 2017-01-08 at 09:36 +0000, Phil Blundell wrote:
> I'm not sure it's that complicated.  Maybe I'm overlooking something
> obvious, but something like "sort -t: -k3n" seems like it ought to
> suffice for sorting /etc/passwd and /etc/group on numeric id.
> 
> I didn't understand Patrick's comment about "id not present in each
> file" though, maybe that's the key to the extra complexity.

/etc/gshadow doesn't contain numeric IDs, so sorting has to be done
based on information gathered from /etc/groups. Not terribly difficult,
just more code.

I also wonder how to handle comment lines - remove them (easy) or
associate with the following entry (nicer)?

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





  reply	other threads:[~2017-01-08 14:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-05 15:38 [PATCH 1/1] rootfs-postcommands.bbclass: sort passwd entries Patrick Ohly
2017-01-06 21:17 ` Phil Blundell
2017-01-07  8:06   ` Patrick Ohly
2017-01-07  9:59     ` Phil Blundell
2017-01-07 19:00       ` Patrick Ohly
2017-01-07 22:52         ` Richard Purdie
2017-01-08  9:36           ` Phil Blundell
2017-01-08 14:04             ` Patrick Ohly [this message]
2017-01-09 10:09 ` [PATCH V2 " Patrick Ohly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1483884249.4383.31.camel@intel.com \
    --to=patrick.ohly@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=pb@pbcl.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.