summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eclass/portability.eclass9
-rw-r--r--eclass/user.eclass54
2 files changed, 7 insertions, 56 deletions
diff --git a/eclass/portability.eclass b/eclass/portability.eclass
index 5e3cf3a03208..cdfb7a2c2002 100644
--- a/eclass/portability.eclass
+++ b/eclass/portability.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v 1.18 2011/10/27 07:16:08 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v 1.19 2011/10/31 17:39:52 vapier Exp $
#
# Author: Diego Pettenò <flameeyes@gentoo.org>
#
@@ -8,8 +8,6 @@
#
# NB: If you add anything, please comment it!
-inherit user
-
# treecopy orig1 orig2 orig3 .... dest
#
# mimic cp --parents copy, but working on BSD userland as well
@@ -129,3 +127,8 @@ get_mounts() {
echo "${point// /\040} ${node// /\040} ${fs%% *} ${opts// /\040}"
done
}
+
+_dead_portability_user_funcs() { die "if you really need this, please file a bug for base-system@gentoo.org"; }
+egethome() { _dead_portability_user_funcs; }
+egetshell() { _dead_portability_user_funcs; }
+is-login-disabled() { _dead_portability_user_funcs; }
diff --git a/eclass/user.eclass b/eclass/user.eclass
index f89ea6dfd98b..e85e7487ae17 100644
--- a/eclass/user.eclass
+++ b/eclass/user.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/user.eclass,v 1.3 2011/10/27 07:49:53 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/user.eclass,v 1.4 2011/10/31 17:39:52 vapier Exp $
# @ECLASS: user.eclass
# @MAINTAINER:
@@ -389,55 +389,3 @@ enewgroup() {
esac
export SANDBOX_ON="${oldsandbox}"
}
-
-# Gets the home directory for the specified user
-# it's a wrap around egetent as the position of the home directory in the line
-# varies depending on the os used.
-#
-# To use that, inherit eutils, not portability!
-egethome() {
- local pos
-
- case ${CHOST} in
- *-darwin*|*-freebsd*|*-dragonfly*)
- pos=9
- ;;
- *) # Linux, NetBSD, OpenBSD, etc...
- pos=6
- ;;
- esac
-
- egetent passwd $1 | cut -d: -f${pos}
-}
-
-# Gets the shell for the specified user
-# it's a wrap around egetent as the position of the home directory in the line
-# varies depending on the os used.
-#
-# To use that, inherit eutils, not portability!
-egetshell() {
- local pos
-
- case ${CHOST} in
- *-darwin*|*-freebsd*|*-dragonfly*)
- pos=10
- ;;
- *) # Linux, NetBSD, OpenBSD, etc...
- pos=7
- ;;
- esac
-
- egetent passwd "$1" | cut -d: -f${pos}
-}
-
-# Returns true if specified user has a shell that precludes logins
-# on whichever operating system.
-is-login-disabled() {
-
- case $(egetshell "$1") in
- /bin/false|/usr/bin/false|/sbin/nologin|/usr/sbin/nologin)
- return 0 ;;
- *)
- return 1 ;;
- esac
-}