]> git.nbdom.net Git - nb.git/commitdiff
etc/profile.d/mac.sh
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 6 Feb 2017 22:08:37 +0000 (22:08 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 6 Feb 2017 22:08:37 +0000 (22:08 +0000)
etc/profile.d/mac.sh

index 37754fe57aa578329945f460f382daf3ab894dbc..4e2956301d291014ec0dcfdb6e944108596e7406 100644 (file)
@@ -242,7 +242,9 @@ mac_port_reinstall() {
 
 getent() {
   which getent && (eval "$(which getent) $@"; return)
-  [ "$1" != 'passwd' ] && echo "Support only passwd untill now" && return 1
+  [ "$1" = 'group' -a -n "$2" ] && grep "^$1:" /etc/group && return
+  [ "$1" = 'group' ] && cat /etc/group && return
+  [ "$1" != 'passwd' ] && echo "Support only passwd and group untill now" && return 1
   [ -z "$2" ] && (ls_users; return)
   ls_users | grep "^$2:"
 }