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