Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 182779 Details for
Bug 259912
users.eclass enewgroup/enewuser improvements for darwin9 and up
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fixes eutils.eclass support for Mac OS X 10.5 on Prefix
eutils-osx-users-groups.patch (text/plain), 2.93 KB, created by
Armando Di Cianno
on 2009-02-22 15:45:20 UTC
(
hide
)
Description:
Fixes eutils.eclass support for Mac OS X 10.5 on Prefix
Filename:
MIME Type:
Creator:
Armando Di Cianno
Created:
2009-02-22 15:45:20 UTC
Size:
2.93 KB
patch
obsolete
>--- /Library/Gentoo/usr/portage/eclass/eutils.eclass 2009-02-21 09:57:59 -0500 >+++ overlay/eclass/eutils.eclass 2009-02-22 10:18:59 -0500 >@@ -514,7 +514,7 @@ > fi > else > for shell in /sbin/nologin /usr/sbin/nologin /bin/false /usr/bin/false /dev/null ; do >- [[ -x ${ROOT}${shell} ]] && break >+ [[ -x ${EROOT}${shell} ]] && break > done > > if [[ ${shell} == "/dev/null" ]] ; then >@@ -529,7 +529,7 @@ > > eshell=${shell} > fi >- einfo " - Shell: ${eshell}" >+ einfo " - Shell: ${EROOT}${eshell}" > opts="${opts} -s ${eshell}" > > # handle homedir >@@ -537,7 +537,7 @@ > if [[ -z ${ehome} ]] || [[ ${ehome} == "-1" ]] ; then > ehome="/dev/null" > fi >- einfo " - Home: ${ehome}" >+ einfo " - Home: ${EROOT}${ehome}" > opts="${opts} -d ${ehome}" > > # handle groups >@@ -566,6 +566,8 @@ > if [[ ! -z ${exgroups} ]] ; then > opts="${opts} -G ${exgroups:1}" > fi >+ edefgroup="${defgroup}" >+ eexgroups="${exgroups:1}" > else > egroups="(none)" > fi >@@ -575,6 +577,50 @@ > local oldsandbox=${SANDBOX_ON} > export SANDBOX_ON="0" > case ${CHOST} in >+ *-darwin9) >+ # FAFHRD: So, altering this in a way that assumes: >+ # 1) We're on OSX 10.5 >+ # 2) We're doing things prefix-style >+ ### Make the user >+ if [[ -z $@ ]] ; then >+ dscl . create /Users/${euser} UniqueID ${euid} >+ dscl . create /Users/${euser} UserShell "${EROOT}${eshell}" >+ dscl . create /Users/${euser} NFSHomeDirectory "${EROOT}${ehome}" >+ dscl . create /Users/${euser} RealName "${euser}, added by portage for ${PN}" >+ # FAFHRD NOTE: So, it seems that Password = '*' is really >+ # the key to a user being able to login via the login >+ # screen or not; also, all users created via the >+ # System Preferences.app menu are in group 'staff'; >+ # so, given both of these facts, allow "real" users to >+ # be created if their primary group is 'staff'; >+ # granted, you still need to set a password >+ # post user creation to actually log in. >+ # WARNING: you need to log out first to see the user >+ # in the login screen or the account switching menu. >+ [[ ! "${edefgroup}" == "staff" ]] && \ >+ dscl . create /Users/${euser} Password '*' >+ ### Add the user to the groups specified >+ # Yes, the default user group is 'staff' (on OSX 10.5) >+ if [[ ! -z "${edefgroup}" ]]; then >+ local defgid=$(dscl . -read /Groups/$edefgroup |grep PrimaryGroupID |awk -F' ' '{print $2}') >+ dscl . create /Users/${euser} PrimaryGroupID "${defgid}" >+ dscl . merge /Groups/${edefgroup} GroupMembership ${euser} >+ fi >+ local oldifs=${IFS} >+ export IFS="," >+ if [ ! -z ${eexgroups} ]; then >+ for g in ${eexgroups} ; do >+ dscl . merge /Groups/${g} GroupMembership ${euser} >+ done >+ fi >+ export IFS=${oldifs} >+ else >+ einfo "Extra options are not supported on Darwin yet" >+ einfo "Please report the ebuild along with the info below" >+ einfo "eextra: $@" >+ die "Required function missing" >+ fi >+ ;; > *-darwin*) > ### Make the user > if [[ -z $@ ]] ; then
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 259912
: 182779 |
182781