summaryrefslogtreecommitdiffstats
path: root/src/initramfs/uclib-rootfs.old/usr/bin/getent
diff options
context:
space:
mode:
authorSebastian Schmelzer2010-10-04 17:09:29 +0200
committerSebastian Schmelzer2010-10-04 17:09:29 +0200
commit47b92492617d783ad54ebf651e2c52182152e926 (patch)
tree43bf4afafaeb5d0a5865ff410dac5d2b715edaa7 /src/initramfs/uclib-rootfs.old/usr/bin/getent
parentMerge branch 'master' of git+ssh://git.openslx.org/openslx/core (diff)
downloadcore-47b92492617d783ad54ebf651e2c52182152e926.tar.gz
core-47b92492617d783ad54ebf651e2c52182152e926.tar.xz
core-47b92492617d783ad54ebf651e2c52182152e926.zip
cleanup
Diffstat (limited to 'src/initramfs/uclib-rootfs.old/usr/bin/getent')
-rwxr-xr-xsrc/initramfs/uclib-rootfs.old/usr/bin/getent43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/initramfs/uclib-rootfs.old/usr/bin/getent b/src/initramfs/uclib-rootfs.old/usr/bin/getent
deleted file mode 100755
index 30d515b7..00000000
--- a/src/initramfs/uclib-rootfs.old/usr/bin/getent
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-# $Header: /var/cvs/uClibc/extra/scripts/getent,v 1.2 2005/02/02 14:18:01 solar Exp $
-#
-# Closely (not perfectly) emulate the behavior of glibc's getent utility
-#
-#passwd|shadow|group|aliases|hosts|networks|ethers|netgroup|protocols|services|rpc
-# only returns the first match (by design)
-# dns based search is not supported (hosts,networks)
-# case-insensitive matches not supported (ethers; others?)
-# may return false-positives (hosts,protocols,rpc,services,ethers)
-
-export PATH="${PATH}:/bin:/usr/bin"
-
-file="/etc/$1"
-case $1 in
- passwd|group)
- match="^$2:\|^[^:]*:[^:]*:$2:" ;;
- shadow)
- match="^$2:" ;;
- networks|netgroup)
- match="^[[:space:]]*$2\>" ;;
- hosts|protocols|rpc|services|ethers)
- match="\<$2\>" ;;
- aliases)
- match="^[[:space:]]*$2[[:space:]]*:" ;;
- ""|-h|--help)
- echo "USAGE: $0 database [key]"
- exit 0 ;;
- *)
- echo "$0: Unknown database: $1" 1>&2
- exit 1 ;;
-esac
-
-if [ ! -f "$file" ] ; then
- echo "$0: Could not find database file for $1" 1>&2
- exit 1
-fi
-
-if [ $# -eq 1 ] ; then
- exec cat "$file"
-else
- sed "s/#.*//; /$match/q; d" "$file" | grep . || exit 2
-fi