[OE-core] [PATCH 1/1] rootfs-postcommands.bbclass: sort passwd entries

Patrick Ohly patrick.ohly at intel.com
Sun Jan 8 14:04:09 UTC 2017


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.






More information about the Openembedded-core mailing list