xref: /original-bsd/usr.sbin/amd/text/amd.start.ex (revision 8477994b)
1#!/bin/sh -
2#
3# Start amd
4#
5# $Id: amd.start.ex,v 5.2 90/06/23 22:21:29 jsp Rel $
6#
7# Copyright (c) 1989 Jan-Simon Pendry
8# Copyright (c) 1989 Imperial College of Science, Technology & Medicine
9# Copyright (c) 1989 The Regents of the University of California.
10# All rights reserved.
11#
12# This code is derived from software contributed to Berkeley by
13# Jan-Simon Pendry at Imperial College, London.
14#
15# %sccs.include.redist.sh%
16#
17#	@(#)amd.start.ex	5.1 (Berkeley) 06/29/90
18#
19PATH=/usr/local/etc:/bin:/usr/bin:/usr/ucb:$PATH export PATH
20
21#
22# Either name of logfile or "syslog"
23#
24#LOGFILE=syslog
25LOGFILE=/var/adm/am.log
26
27#
28# Figure out whether domain name is in host name
29# If the hostname is just the machine name then
30# pass in the name of the local domain so that the
31# hostnames in the map are domain stripped correctly.
32#
33case `hostname` in
34*.*) dmn= ;;
35*) dmn='-d doc.ic.ac.uk'
36esac
37
38#
39# Zap earlier log file
40#
41case "$LOGFILE" in
42*/*)
43	mv "$LOGFILE" "$LOGFILE"-
44	> "$LOGFILE"
45	;;
46syslog)
47	: nothing
48	;;
49esac
50
51cd /usr/local/etc
52#
53# -r 		restart
54# -d dmn	local domain
55# -w wait	wait between unmount attempts
56# -l log	logfile or "syslog"
57#
58eval nice --4 ./amd -p > /etc/amd.pid -r $dmn -w 240 -l "$LOGFILE" \
59	/homes amd.homes -cache=inc \
60	/home amd.home -cache=inc \
61	/vol amd.vol -cache=inc
62