1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-31 05:41:08 +00:00
freebsd-ports/net/arla/files/arla.sh.in
Doug Barton c49d1a3273 Remove the FreeBSD KEYWORD from all rc.d scripts where it appears.
We have not checked for this KEYWORD for a long time now, so this
is a complete noop, and thus no PORTREVISION bump. Removing it at
this point is mostly for pedantic reasons, and partly to avoid
perpetuating this anachronism by copy and paste to future scripts.
2006-02-20 20:47:50 +00:00

51 lines
823 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: arla
# REQUIRE: NETWORKING
# Add the following line to /etc/rc.conf to enable `arla':
#
#arla_enable="YES"
#
# See arla(1) for arla_flags
#
. "%%RC_SUBR%%"
name="arla"
rcvar=`set_rcvar`
command="%%PREFIX%%/sbin/startarla"
procname="%%PREFIX%%/libexec/arlad"
pidfile="/var/run/arlad.pid"
required_files="%%PREFIX%%/etc/$name.conf
%%PREFIX%%/etc/ThisCell
%%PREFIX%%/etc/CellServDB"
stop_precmd="stop_precmd"
stop_precmd()
{
mount | grep -q 'arla on /afs (nnpfs)' && umount /afs
}
stop_postcmd="stop_postcmd"
stop_postcmd()
{
kldstat | grep -q ' nnpfs.ko$' && kldunload nnpfs
if ! rm "$pidfile" 2>/dev/null; then
warn "Couldn't remove $pidfile"
fi
}
# read settings, set default values
load_rc_config "$name"
: ${arla_enable="NO"}
: ${arla_flags=""}
run_rc_command "$1"