Commit | Line | Data |
---|---|---|
e1a31032 KM |
1 | #!/bin/sh - |
2 | # | |
e1a31032 KM |
3 | # Copyright (c) 1989 Jan-Simon Pendry |
4 | # Copyright (c) 1989 Imperial College of Science, Technology & Medicine | |
5 | # Copyright (c) 1989 The Regents of the University of California. | |
6 | # 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 | # | |
332f0791 | 13 | # @(#)amd.start.ex 5.4 (Berkeley) %G% |
8d2991d5 JSP |
14 | # |
15 | # Start amd | |
16 | # | |
332f0791 | 17 | # $Id: amd.start.ex,v 5.2.2.1 1992/02/09 15:11:32 jsp beta $ |
e1a31032 | 18 | # |
8d2991d5 | 19 | PATH=/usr/sbin:/bin:/usr/bin:$PATH export PATH |
e1a31032 KM |
20 | |
21 | # | |
22 | # Either name of logfile or "syslog" | |
23 | # | |
24 | #LOGFILE=syslog | |
8d2991d5 | 25 | LOGFILE=/var/run/amd.log |
e1a31032 KM |
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 | # | |
33 | case `hostname` in | |
34 | *.*) dmn= ;; | |
35 | *) dmn='-d doc.ic.ac.uk' | |
36 | esac | |
37 | ||
38 | # | |
39 | # Zap earlier log file | |
40 | # | |
41 | case "$LOGFILE" in | |
42 | */*) | |
43 | mv "$LOGFILE" "$LOGFILE"- | |
44 | > "$LOGFILE" | |
45 | ;; | |
46 | syslog) | |
47 | : nothing | |
48 | ;; | |
49 | esac | |
50 | ||
8d2991d5 | 51 | cd /usr/sbin |
e1a31032 KM |
52 | # |
53 | # -r restart | |
54 | # -d dmn local domain | |
55 | # -w wait wait between unmount attempts | |
56 | # -l log logfile or "syslog" | |
57 | # | |
8d2991d5 JSP |
58 | eval 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 |