144633Smckusick#!/bin/sh - 244633Smckusick# 344633Smckusick# Copyright (c) 1989 Jan-Simon Pendry 444633Smckusick# Copyright (c) 1989 Imperial College of Science, Technology & Medicine 5*61805Sbostic# Copyright (c) 1989, 1993 6*61805Sbostic# The Regents of the University of California. 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*61805Sbostic# @(#)amd.start.ex 8.1 (Berkeley) 06/06/93 1444633Smckusick# 1549687Spendry# Start amd 1649687Spendry# 1752459Spendry# $Id: amd.start.ex,v 5.2.2.1 1992/02/09 15:11:32 jsp beta $ 1849687Spendry# 1949687SpendryPATH=/usr/sbin:/bin:/usr/bin:$PATH export PATH 2044633Smckusick 2144633Smckusick# 2244633Smckusick# Either name of logfile or "syslog" 2344633Smckusick# 2444633Smckusick#LOGFILE=syslog 2549687SpendryLOGFILE=/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 5149687Spendrycd /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# 5849687Spendryeval nice --4 ./amd -p > /var/run/amd.pid -r $dmn -w 240 -l "$LOGFILE" \ 5949687Spendry /homes amd.homes -cache:=inc \ 6049687Spendry /home amd.home -cache:=inc \ 6149687Spendry /vol amd.vol -cache:=inc 62