diff options
author | Ned Ludd <solar@gentoo.org> | 2005-04-21 15:47:59 +0000 |
---|---|---|
committer | Ned Ludd <solar@gentoo.org> | 2005-04-21 15:47:59 +0000 |
commit | e3f6270ff75cbd3f616b691c08cb671a6efb6ea4 (patch) | |
tree | b955d2f92fb3521675714cb9357b2b3fd4f4f43b /sys-libs/uclibc/files | |
parent | - save everybody some time by putting this into packages (diff) | |
download | gentoo-2-e3f6270ff75cbd3f616b691c08cb671a6efb6ea4.tar.gz gentoo-2-e3f6270ff75cbd3f616b691c08cb671a6efb6ea4.tar.bz2 gentoo-2-e3f6270ff75cbd3f616b691c08cb671a6efb6ea4.zip |
- update getent script in FILESDIR
(Portage version: 2.0.51.19)
Diffstat (limited to 'sys-libs/uclibc/files')
-rwxr-xr-x | sys-libs/uclibc/files/getent | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sys-libs/uclibc/files/getent b/sys-libs/uclibc/files/getent index 5617cb0c6e0f..f1b8590ed862 100755 --- a/sys-libs/uclibc/files/getent +++ b/sys-libs/uclibc/files/getent @@ -1,4 +1,5 @@ #!/bin/sh +# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/files/getent,v 1.2 2005/04/21 15:47:59 solar Exp $ search_entry() { if [ -e "$1" ] ; then @@ -15,12 +16,16 @@ string="dummy" #aliases|ethers|group|hosts|netgroup|networks|passwd|protocols|rpc|services|shadow) # dns based search is not supported for hosts|networks -# networks searches ^string -# protocols|rpc|services searches string anywhere -# ethers|netgroup ? +# ethers|netgroup (not done, needed)? # it returns only the first match case $1 in - group|passwd|shadow) + passwd) + string="(^\<$2\>:|^.*:.*:\<$2\>:.*:.*:.*:.*)" + ;; + group) + string="(^|:)\<$2\>:" + ;; + shadow) string="^\<$2\>:" ;; aliases) @@ -34,7 +39,7 @@ case $1 in networks) string="^\<$2\>" ;; - hosts|protocol|rpc|services) + hosts|protocols|rpc|services) string="\<$2\>" ;; *) |