View previous topic :: View next topic |
Author |
Message |
soltoo n00b
Joined: 02 Jul 2011 Posts: 15
|
Posted: Thu Nov 03, 2011 12:00 pm Post subject: eutils.eclass on Gentoo Prefix for Solaris |
|
|
I have yet to submit a bug report requesting this yet since I haven't had a chance before to get feedback from the community about it.
This change to eutils.eclass deals with the fact that Solaris useradd and groupadd do not have the "-r" (system account) flag. If I try to run "emerge" as root in Gentoo Prefix on Solaris it tries to run /usr/sbin/useradd -r ... and that fails.
NetBSD tends to do things the Sun way so I thought that making Solaris use the NetBSD code would be OK.
What do people involved think?
Thanks
Code: |
diff --git a/site-cookbooks/packages/files/solaris2/eutils.eclass b/site-cookbooks/packages/files/solaris2/eutils.eclass
index d9efbbf..50f0b03 100644
--- a/site-cookbooks/packages/files/solaris2/eutils.eclass
+++ b/site-cookbooks/packages/files/solaris2/eutils.eclass
@@ -758,7 +758,7 @@ enewuser() {
fi
;;
- *-netbsd*)
+ *-netbsd*|*-solaris*)
if [[ -z $@ ]] ; then
useradd ${opts} ${euser} || die "enewuser failed"
else
@@ -907,7 +907,7 @@ enewgroup() {
pw groupadd ${egroup} -g ${egid} || die "enewgroup failed"
;;
- *-netbsd*)
+ *-netbsd*|*-solaris*)
case ${egid} in
*[!0-9]*) # Non numeric
for ((egid = 101; egid <= 999; egid++)); do
|
|
|
Back to top |
|
|
soltoo n00b
Joined: 02 Jul 2011 Posts: 15
|
Posted: Thu Nov 03, 2011 12:19 pm Post subject: |
|
|
One more thing
in EPREFIX//usr/share/portage/config/make.globals
EXTRA_PATH="/usr/bin:/bin:/usr/sbin"
Needs "/usr/sbin" in order to find /usr/sbin/useradd |
|
Back to top |
|
|
grobian Developer
Joined: 31 May 2006 Posts: 67
|
Posted: Sun Dec 04, 2011 7:32 pm Post subject: |
|
|
if you tested your code and verified it works correctly, it looks ok for inclusion to me. _________________ Gentoo on a different level |
|
Back to top |
|
|
|