Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 35921 Details for
Bug 57900
eutils.eclass does not add users or groups in OSX
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for eutils.eclass to fix adding users and groups on OSX
eutils.eclass.diff (text/plain), 3.23 KB, created by
Joe Jezak (RETIRED)
on 2004-07-21 14:49:18 UTC
(
hide
)
Description:
Patch for eutils.eclass to fix adding users and groups on OSX
Filename:
MIME Type:
Creator:
Joe Jezak (RETIRED)
Created:
2004-07-21 14:49:18 UTC
Size:
3.23 KB
patch
obsolete
>495a496,510 >> egetent() { >> if [ "${ARCH}" == "macos" ] ; then >> case "$2" in >> *[!0-9]*) # Non numeric >> nidump $1 . | awk -F":" "{ if (\$1 ~ /^$2$/) {print \$0;exit;} }" >> ;; >> *) # Numeric >> nidump $1 . | awk -F":" "{ if (\$3 == $2) {print \$0;exit;} }" >> ;; >> esac >> else >> getent $1 $2 >> fi >> } >> >506c521 >< if [ "${euser}" == "`getent passwd \"${euser}\" | cut -d: -f1`" ] >--- >> if [ "${euser}" == "`egetent passwd \"${euser}\" | cut -d: -f1`" ] >521c536 >< if [ ! -z "`getent passwd ${euid}`" ] >--- >> if [ ! -z "`egetent passwd ${euid}`" ] >534,535c549,556 >< for euid in `seq 101 999` ; do >< [ -z "`getent passwd ${euid}`" ] && break >--- >> local pwrange >> if [ "${ARCH}" == "macos" ] ; then >> pwrange="`jot 898 101`" >> else >> pwrange="`seq 101 999`" >> fi >> for euid in ${pwrange} ; do >> [ -z "`egetent passwd ${euid}`" ] && break >573c594 >< if [ -z "`getent group \"${g}\"`" ] >--- >> if [ -z "`egetent group \"${g}\"`" ] >590c611 >< if [ -z "${eextra}" ] >--- >> if [ "${ARCH}" == "macos" ]; >592,598c613,641 >< useradd ${opts} ${euser} \ >< -c "added by portage for ${PN}" \ >< || die "enewuser failed" >< else >< einfo " - Extra: ${eextra}" >< useradd ${opts} ${euser} ${eextra} \ >< || die "enewuser failed" >--- >> ### Make the user >> if [ -z "${eextra}" ] >> then >> dscl . create /users/${euser} uid ${euid} >> dscl . create /users/${euser} shell ${eshell} >> dscl . create /users/${euser} home ${ehome} >> dscl . create /users/${euser} realname "added by portage for ${PN}" >> ### Add the user to the groups specified >> for g in ${egroups} >> do >> dscl . merge /groups/${g} users ${euser} >> done >> else >> einfo "Extra options are not supported on macos yet" >> einfo "Please report the ebuild along with the info below" >> einfo "eextra: ${eextra}" >> die "Required function missing" >> fi >> else >> if [ -z "${eextra}" ] >> then >> useradd ${opts} ${euser} \ >> -c "added by portage for ${PN}" \ >> || die "enewuser failed" >> else >> einfo " - Extra: ${eextra}" >> useradd ${opts} ${euser} ${eextra} \ >> || die "enewuser failed" >> fi >630c673 >< if [ "${egroup}" == "`getent group \"${egroup}\" | cut -d: -f1`" ] >--- >> if [ "${egroup}" == "`egetent group \"${egroup}\" | cut -d: -f1`" ] >645c688 >< if [ -z "`getent group ${egid}`" ] >--- >> if [ -z "`egetent group ${egid}`" ] >647c690,694 >< opts="${opts} -g ${egid}" >--- >> if [ "${ARCH}" == "macos" ] ; then >> opts="${opts} ${egid}" >> else >> opts="${opts} -g ${egid}" >> fi >667c714,735 >< groupadd ${opts} ${egroup} || die "enewgroup failed" >--- >> if [ "${ARCH}" == "macos" ]; >> then >> if [ ! -z "${eextra}" ]; >> then >> einfo "Extra options are not supported on macos yet" >> einfo "Please report the ebuild along with the info below" >> einfo "eextra: ${eextra}" >> die "Required function missing" >> fi >> >> # If we need the next available >> case ${egid} in >> *[!0-9]*) # Non numeric >> for egid in `jot 898 101`; do >> [ -z "`egetent group ${egid}`" ] && break >> done >> esac >> dscl . create /groups/${egroup} gid ${egid} >> dscl . create /groups/${egroup} passwd '*' >> else >> groupadd ${opts} ${egroup} || die "enewgroup failed" >> fi
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 57900
: 35921 |
41201