diff options
author | Michał Górny <mgorny@gentoo.org> | 2019-06-08 16:30:15 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-06-20 10:16:32 +0200 |
commit | aa32756df58d975a26580393d34cda89c8ea6de2 (patch) | |
tree | 496d131ff188004b538e38d69e5a1d2567240640 /eclass | |
parent | net-proxy/nylon: Remove last-rited pkg (diff) | |
download | gentoo-aa32756df58d975a26580393d34cda89c8ea6de2.tar.gz gentoo-aa32756df58d975a26580393d34cda89c8ea6de2.tar.bz2 gentoo-aa32756df58d975a26580393d34cda89c8ea6de2.zip |
user.eclass: Remove dead/broken Darwin support
Closes: https://bugs.gentoo.org/687568
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/user.eclass | 54 |
1 files changed, 3 insertions, 51 deletions
diff --git a/eclass/user.eclass b/eclass/user.eclass index f6a10a6bee28..ef5d3bc5e6e0 100644 --- a/eclass/user.eclass +++ b/eclass/user.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: user.eclass @@ -44,32 +44,6 @@ egetent() { esac case ${CHOST} in - *-darwin[678]) - case ${key} in - *[!0-9]*) # Non numeric - nidump ${db} . | awk -F: "(\$1 ~ /^${key}\$/) {print;exit;}" - ;; - *) # Numeric - nidump ${db} . | awk -F: "(\$3 == ${key}) {print;exit;}" - ;; - esac - ;; - *-darwin*) - local mykey - case ${db} in - passwd) db="Users" mykey="UniqueID" ;; - group) db="Groups" mykey="PrimaryGroupID" ;; - esac - - case ${key} in - *[!0-9]*) # Non numeric - dscl . -read /${db}/${key} 2>/dev/null |grep RecordName - ;; - *) # Numeric - dscl . -search /${db} ${mykey} ${key} 2>/dev/null - ;; - esac - ;; *-freebsd*|*-dragonfly*) case ${db} in passwd) db="user" ;; @@ -219,18 +193,6 @@ enewuser() { # add the user case ${CHOST} in - *-darwin*) - ### Make the user - 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_arr[@]}" ; do - dscl . merge "/groups/${g}" users "${euser}" - done - ;; - *-freebsd*|*-dragonfly*) pw useradd "${euser}" "${opts[@]}" || die ;; @@ -318,12 +280,6 @@ enewgroup() { # add the group case ${CHOST} in - *-darwin*) - _enewgroup_next_gid - dscl . create "/groups/${egroup}" gid ${egid} - dscl . create "/groups/${egroup}" passwd '*' - ;; - *-freebsd*|*-dragonfly*) _enewgroup_next_gid pw groupadd "${egroup}" -g ${egid} || die @@ -358,7 +314,7 @@ egethome() { [[ $# -eq 1 ]] || die "usage: egethome <user>" case ${CHOST} in - *-darwin*|*-freebsd*|*-dragonfly*) + *-freebsd*|*-dragonfly*) pos=9 ;; *) # Linux, NetBSD, OpenBSD, etc... @@ -379,7 +335,7 @@ egetshell() { [[ $# -eq 1 ]] || die "usage: egetshell <user>" case ${CHOST} in - *-darwin*|*-freebsd*|*-dragonfly*) + *-freebsd*|*-dragonfly*) pos=10 ;; *) # Linux, NetBSD, OpenBSD, etc... @@ -444,10 +400,6 @@ esethome() { # update the home directory case ${CHOST} in - *-darwin*) - dscl . change "/users/${euser}" home "${ehome}" - ;; - *-freebsd*|*-dragonfly*) pw usermod "${euser}" -d "${ehome}" && return 0 [[ $? == 8 ]] && eerror "${euser} is in use, cannot update home" |