В Tue, 15 Apr 2014 12:06:44 +0400 Alexander Tsoy <alexan...@tsoy.me> пишет:
> В Tue, 15 Apr 2014 11:11:53 +0900 > Naohiro Aota <na...@gentoo.org> пишет: > > > Diego Elio Pettenò <flamee...@flameeyes.eu> writes: > > > > > I'm pretty sure we have an eclass function to get the name of the > > > 0 group. > > > > I can't find one... but found qmail.eclass is using exactly same > > method. > > > > > export GROUP_ROOT="$(id -gn root)" > > "id -gn root" prints initial group name of the user root. This is > exactly what you want in fcaps.eclass. In linux "id" accepts only > username as argument, it doesn't support uid. > But if you really want to convert gid=0 to groupname, then use egetent() as also noted by Cyprien: inherit user ... local group=$(egetent group 0) group=${group%%:*} -- Alexander Tsoy