diff options
author | Sebastian Schmelzer | 2008-12-17 03:45:27 +0100 |
---|---|---|
committer | Sebastian Schmelzer | 2008-12-17 03:45:27 +0100 |
commit | db7cd3e21e3b23b8f3c378fbb2f690c9ccffc81f (patch) | |
tree | f77021afa0ad9454f49c996f4ad6552fb4b8f810 /initramfs/uclib-rootfs/usr | |
parent | * add new binary versions of hwinfo (15.21) (diff) | |
download | core-db7cd3e21e3b23b8f3c378fbb2f690c9ccffc81f.tar.gz core-db7cd3e21e3b23b8f3c378fbb2f690c9ccffc81f.tar.xz core-db7cd3e21e3b23b8f3c378fbb2f690c9ccffc81f.zip |
* update rootfs
* new busybox (1.13.1)
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2424 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/uclib-rootfs/usr')
-rwxr-xr-x | initramfs/uclib-rootfs/usr/bin/getent | 88 | ||||
-rwxr-xr-x | initramfs/uclib-rootfs/usr/bin/ldd | bin | 9472 -> 11702 bytes | |||
-rwxr-xr-x | initramfs/uclib-rootfs/usr/bin/strace | bin | 169584 -> 173636 bytes | |||
-rwxr-xr-x | initramfs/uclib-rootfs/usr/sbin/kexec | bin | 116328 -> 116284 bytes |
4 files changed, 32 insertions, 56 deletions
diff --git a/initramfs/uclib-rootfs/usr/bin/getent b/initramfs/uclib-rootfs/usr/bin/getent index acb01403..30d515b7 100755 --- a/initramfs/uclib-rootfs/usr/bin/getent +++ b/initramfs/uclib-rootfs/usr/bin/getent @@ -1,67 +1,43 @@ #!/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) -search_entry() { - if [ -e "$1" ] ; then - /bin/egrep -v "^#" $1 | /bin/sed 's/#.*$//' | /bin/egrep "${string}" | /bin/sed -n 1p - retval=$? - [ "$retval" = 0 ] || retval=2 - else - retval=2 - fi -} - -if [ -z "$1" ] ; then - echo "getent: wrong number of arguments" 1>&2 - exit 1 -fi +export PATH="${PATH}:/bin:/usr/bin" file="/etc/$1" -string="dummy" +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 "Unknown database: $1" 1>&2 - exit 1 + echo "$0: Could not find database file for $1" 1>&2 + exit 1 fi -#aliases|ethers|group|hosts|netgroup|networks|passwd|protocols|rpc|services|shadow) -# dns based search is not supported for hosts|networks -# ethers|netgroup (not done, needed)? -# it returns only the first match -case $1 in - passwd) - string="(^\<$2\>:|^.*:.*:\<$2\>:.*:.*:.*:.*)" - ;; - group) - string="(^|:)\<$2\>:" - ;; - shadow) - string="^\<$2\>:" - ;; - aliases) - if [ -f /etc/postfix/aliases ] ; then - file="/etc/postfix/aliases" - elif [ -f /etc/mail/aliases ] ; then - file="/etc/mail/aliases" - fi - string="^\<$2\>:" - ;; - networks) - string="^\<$2\>" - ;; - hosts|protocols|rpc|services) - string="\<$2\>" - ;; - *) - echo "Unknown database: $1" - exit 1 - ;; -esac - -if [ -z "$2" ] ; then - exec cat $file +if [ $# -eq 1 ] ; then + exec cat "$file" else - search_entry "$file" "$2" + sed "s/#.*//; /$match/q; d" "$file" | grep . || exit 2 fi - -exit $retval diff --git a/initramfs/uclib-rootfs/usr/bin/ldd b/initramfs/uclib-rootfs/usr/bin/ldd Binary files differindex 4e3291de..f018ad28 100755 --- a/initramfs/uclib-rootfs/usr/bin/ldd +++ b/initramfs/uclib-rootfs/usr/bin/ldd diff --git a/initramfs/uclib-rootfs/usr/bin/strace b/initramfs/uclib-rootfs/usr/bin/strace Binary files differindex 240f120f..3aec0598 100755 --- a/initramfs/uclib-rootfs/usr/bin/strace +++ b/initramfs/uclib-rootfs/usr/bin/strace diff --git a/initramfs/uclib-rootfs/usr/sbin/kexec b/initramfs/uclib-rootfs/usr/sbin/kexec Binary files differindex 4a3948be..efa61454 100755 --- a/initramfs/uclib-rootfs/usr/sbin/kexec +++ b/initramfs/uclib-rootfs/usr/sbin/kexec |