e8d76f86d2
Bring in the new automounter, similar to what's provided in most other UNIX systems, eg. MacOS X and Solaris. It uses Sun-compatible map format, has proper kernel support, and LDAP integration. There are still a few outstanding problems; they will be fixed shortly. Reviewed by: allanjude@, emaste@, kib@, wblock@ (earlier versions) Phabric: D523 Relnotes: yes Sponsored by: The FreeBSD Foundation
18 lines
301 B
Bash
18 lines
301 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
if [ $# -eq 0 ]; then
|
|
out=`getent hosts`
|
|
[ $? -eq 0 ] || exit 1
|
|
echo "$out" | awk '{ print $2 }' | sort -u
|
|
exit 0
|
|
fi
|
|
|
|
out=`showmount -e "$1"`
|
|
[ $? -eq 0 ] || exit 1
|
|
echo "$out" | awk -v host="$1" \
|
|
'NR > 1 { printf "%s\t%s:%s ", $1, host, $1 } END { printf "\n" }'
|
|
|