Permalink
Browse files

When doing PKGNG PBI builds on 10, we can grab USERS/GROUPS data

from 'pkg query'
  • Loading branch information...
1 parent 1691c6a commit 40e8efb505217aafc8b3032c8cc62b060ad036fa @kmoore134 kmoore134 committed Oct 29, 2013
Showing with 11 additions and 4 deletions.
  1. +11 −4 src-sh/pbi-manager10/pbi-manager
@@ -7535,15 +7535,22 @@ do_port_build()
# Did it install?
pkg info -e ${_lPortRaw}
if [ $? -ne 0 ] ; then exit_err "Failed to install $_lPortRaw" ; fi
+
+ # Save any users / groups we need to create later
+ local pUsers="`pkg query "%U" $_lPortRaw`"
+ local pGroups="`pkg query "%G" $_lPortRaw`"
+ if [ -n "$pUsers" ] ; then
+ PBI_BUILD_USERS="$PBI_BUILD_USERS $pUsers"
+ fi
+ if [ -n "$pGroups" ] ; then
+ PBI_BUILD_GROUPS="$PBI_BUILD_GROUPS $pGroups"
+ fi
+
return 0
fi
# Lets do old-fashioned build
- # KPM! ##############
- # We will need to revisit this portion later, see if we can
- # grab the user / group list from pkgng installed packages
-
# Save any users / groups we need to create later
local pUsers="`make -V USERS -C $_lPort PORTSDIR=${PORTSDIR}`"
local pGroups="`make -V GROUPS -C $_lPort PORTSDIR=${PORTSDIR}`"

0 comments on commit 40e8efb

Please sign in to comment.