xref: /original-bsd/usr.sbin/amd/text/amd.start.ex (revision c3e32dec)
1#!/bin/sh -
2#
3# Copyright (c) 1989 Jan-Simon Pendry
4# Copyright (c) 1989 Imperial College of Science, Technology & Medicine
5# Copyright (c) 1989, 1993
6#	The Regents of the University of California.  All rights reserved.
7#
8# This code is derived from software contributed to Berkeley by
9# Jan-Simon Pendry at Imperial College, London.
10#
11# %sccs.include.redist.sh%
12#
13#	@(#)amd.start.ex	8.1 (Berkeley) 06/06/93
14#
15# Start amd
16#
17# $Id: amd.start.ex,v 5.2.2.1 1992/02/09 15:11:32 jsp beta $
18#
19PATH=/usr/sbin:/bin:/usr/bin:$PATH export PATH
20
21#
22# Either name of logfile or "syslog"
23#
24#LOGFILE=syslog
25LOGFILE=/var/run/amd.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/sbin
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 > /var/run/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