xref: /freebsd/libexec/rc/rc.d/hastd (revision f7c32ed617858bcd22f8d1b03199099d50125721)
1#!/bin/sh
2#
3# $FreeBSD$
4#
5
6# PROVIDE: hastd
7# REQUIRE: NETWORKING syslogd
8# BEFORE:  DAEMON
9# KEYWORD: nojail shutdown
10
11. /etc/rc.subr
12
13name="hastd"
14desc="Highly Available Storage daemon"
15rcvar="hastd_enable"
16pidfile="/var/run/${name}.pid"
17command="/sbin/${name}"
18hastctl="/sbin/hastctl"
19required_files="/etc/hast.conf"
20stop_precmd="hastd_stop_precmd"
21required_modules="geom_gate:g_gate"
22extra_commands="reload"
23
24hastd_stop_precmd()
25{
26	${hastctl} role init all
27}
28
29load_rc_config $name
30run_rc_command "$1"
31