2014-08-17 09:44:42 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
if [ $# -eq 0 ]; then
|
|
|
|
out=`getent hosts`
|
|
|
|
[ $? -eq 0 ] || exit 1
|
|
|
|
echo "$out" | awk '{ print $2 }' | sort -u
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2016-03-23 12:13:53 +00:00
|
|
|
out=`showmount -E "$1"`
|
2014-08-17 09:44:42 +00:00
|
|
|
[ $? -eq 0 ] || exit 1
|
|
|
|
echo "$out" | awk -v host="$1" \
|
2016-03-23 12:13:53 +00:00
|
|
|
'{ printf "\"%s\"\t\"%s:%s\" ", $0, host, $0 } END { printf "\n" }'
|
2014-08-17 09:44:42 +00:00
|
|
|
|