xref: /csrg-svn/usr.sbin/amd/text/amd.start.ex (revision 49687)
144633Smckusick#!/bin/sh -
244633Smckusick#
344633Smckusick# Copyright (c) 1989 Jan-Simon Pendry
444633Smckusick# Copyright (c) 1989 Imperial College of Science, Technology & Medicine
544633Smckusick# Copyright (c) 1989 The Regents of the University of California.
644633Smckusick# All rights reserved.
744633Smckusick#
844633Smckusick# This code is derived from software contributed to Berkeley by
944633Smckusick# Jan-Simon Pendry at Imperial College, London.
1044633Smckusick#
1144633Smckusick# %sccs.include.redist.sh%
1244633Smckusick#
13*49687Spendry#	@(#)amd.start.ex	5.3 (Berkeley) 05/12/91
1444633Smckusick#
15*49687Spendry# Start amd
16*49687Spendry#
17*49687Spendry# $Id: amd.start.ex,v 5.2.1.3 91/05/07 22:20:41 jsp Alpha $
18*49687Spendry#
19*49687SpendryPATH=/usr/sbin:/bin:/usr/bin:$PATH export PATH
2044633Smckusick
2144633Smckusick#
2244633Smckusick# Either name of logfile or "syslog"
2344633Smckusick#
2444633Smckusick#LOGFILE=syslog
25*49687SpendryLOGFILE=/var/run/amd.log
2644633Smckusick
2744633Smckusick#
2844633Smckusick# Figure out whether domain name is in host name
2944633Smckusick# If the hostname is just the machine name then
3044633Smckusick# pass in the name of the local domain so that the
3144633Smckusick# hostnames in the map are domain stripped correctly.
3244633Smckusick#
3344633Smckusickcase `hostname` in
3444633Smckusick*.*) dmn= ;;
3544633Smckusick*) dmn='-d doc.ic.ac.uk'
3644633Smckusickesac
3744633Smckusick
3844633Smckusick#
3944633Smckusick# Zap earlier log file
4044633Smckusick#
4144633Smckusickcase "$LOGFILE" in
4244633Smckusick*/*)
4344633Smckusick	mv "$LOGFILE" "$LOGFILE"-
4444633Smckusick	> "$LOGFILE"
4544633Smckusick	;;
4644633Smckusicksyslog)
4744633Smckusick	: nothing
4844633Smckusick	;;
4944633Smckusickesac
5044633Smckusick
51*49687Spendrycd /usr/sbin
5244633Smckusick#
5344633Smckusick# -r 		restart
5444633Smckusick# -d dmn	local domain
5544633Smckusick# -w wait	wait between unmount attempts
5644633Smckusick# -l log	logfile or "syslog"
5744633Smckusick#
58*49687Spendryeval nice --4 ./amd -p > /var/run/amd.pid -r $dmn -w 240 -l "$LOGFILE" \
59*49687Spendry	/homes amd.homes -cache:=inc \
60*49687Spendry	/home amd.home -cache:=inc \
61*49687Spendry	/vol amd.vol -cache:=inc
62