[uClibc-cvs] CVS uClibc/extra/scripts
CVS User solar
solar at codepoet.org
Wed Feb 2 14:18:01 UTC 2005
Update of /var/cvs/uClibc/extra/scripts
In directory nail:/tmp/cvs-serv20563
Modified Files:
getent
Log Message:
- updated getent script to match behaviors of newer glibc getent. update from Peter S. Mazinger
--- /var/cvs/uClibc/extra/scripts/getent 2004/11/11 14:50:52 1.1
+++ /var/cvs/uClibc/extra/scripts/getent 2005/02/02 14:18:01 1.2
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Header: /var/cvs/uClibc/extra/scripts/getent,v 1.1 2004/11/11 14:50:52 vapier Exp $
+# $Header: /var/cvs/uClibc/extra/scripts/getent,v 1.2 2005/02/02 14:18:01 solar Exp $
search_entry() {
if [ -e "$1" ] ; then
@@ -16,12 +16,16 @@
#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)
@@ -35,7 +39,7 @@
networks)
string="^\<$2\>"
;;
- hosts|protocol|rpc|services)
+ hosts|protocols|rpc|services)
string="\<$2\>"
;;
*)
More information about the uClibc-cvs
mailing list