#!/bin/sh
# script to start the lcs amd automounter

AMD=/usr/local/etc/amd		# amd binary location
MAPS=/etc/maps			# where are the maps
LCSMOUNT=/lcs			# top level lcs mount point
AIMOUNT=/ai			# top level ai mount point
LOGFILE=syslog			# syslog for syslog else file
#LOGFILE=/var/log/amd

#
# figure out the domain or set to default if can't
# (if our hostname is already fully qualified, set dmn to NULL
#
case `hostname` in
*.*) dmn= ;;
*) dmn='-d lcs.mit.edu'
esac

#
# here's where the real work is done
# one map for each group. done this way so that each group sysadmin
# can manage their own map. 
#
# labwide mount points and services will be in $LCSMOUNT/shared 
#
# you can get to ANY machine's exported dirs by going to
# $LCSMOUNT/exports/{machine}/{export}
#
# SUGGESTED MOUNT POINT NAMES
# web - if you have a web server, this mount point will be to the
#	root of your server
#
# homes - exported user home directories
#
# ftp - if your group runs an ftp server, the root of this server (may be
#       the same as root of web server above
#
# pub - your public repository for file sharing between groups (may be
#       the same place as ftp/pub)
#
# **hopefully every group can at least have a "pub" area : /lcs/{group}/pub
# for example:
# cd /lcs/crs/pub
# would put the user in crs's public file area
# examples can be found in $MAPS/crs.map
#
eval $AMD -r $dmn -l "$LOGFILE" \
	$LCSMOUNT/shared $MAPS/shared.map \
	$LCSMOUNT/exports $MAPS/exports.map \
	$LCSMOUNT/crs $MAPS/crs.map \
	$LCSMOUNT/sls $MAPS/sls.map \
	$LCSMOUNT/mac $MAPS/mac.map \
	$AIMOUNT $MAPS/ai.map

echo "amd: automount daemon"

