Gentoo Archives: gentoo-embedded

From: Sven Rebhan <odinshorse@××××××××××.com>
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] Adding new users when using buildroot?
Date: Fri, 04 Sep 2009 13:19:52
Message-Id: 3dc1583f0909041128h53d08fbeqe248dc41668a7537@mail.gmail.com
In Reply to: [gentoo-embedded] Adding new users when using buildroot? by Ed W
1 2009/9/4 Ed W <lists@××××××××××.com>:
2 > Obviously plenty of other ways to solve this, but curious if there is a
3 > solution within the portage build process?
4
5 I don't know of any standard way. Portage uses 'useradd' to generate
6 the new user
7 and this command does _not_ support a ROOT. The only (non-standard) way to
8 add a new user is by directly writing to /etc/passwd, but I'm not sure
9 if this works
10 on all OSes supported by Gentoo.
11
12 Anyway, if you follow http://gentoo.mindzoo.de/index.cgi/wiki/Cross%20Install
13 you will find the command
14
15 find /var/db/pkg -name '*.ebuild' -exec grep -qF 'pkg_postinst()' {}
16 \; -exec ebuild {} postinst \;
17
18 which reruns all postinstall sections of your cross-compiled system on
19 the target
20 and thus also creates the users.
21
22 Have fun!
23
24 Sven

Replies

Subject Author
Re: [gentoo-embedded] Adding new users when using buildroot? Ed W <lists@××××××××××.com>