summaryrefslogtreecommitdiff
path: root/sysutils/xentools20/files/xend.sh
blob: 27be32ff7a0981045de1b3d875ee1e5b1d06e634 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: xend.sh,v 1.3 2005/05/24 16:02:08 xtraeme Exp $
#
# PROVIDE: xend
# REQUIRE: disks network

if [ -f /etc/rc.subr ]; then
	. /etc/rc.subr
fi

name="xend"
rcvar=$name
command="@PREFIX@/sbin/xend"
command_interpreter="@RCD_INTERPRETER@"
start_cmd="@ECHO@ Starting ${name}. && ${command} start"
start_precmd="test_kern_privcmd"

test_kern_privcmd()
{
	if [ ! -f /kern/xen/privcmd ]; then
		@ECHO@ "${name}: Cannot find /kern/xen/privcmd!"
		exit 1
	fi
}

load_rc_config $name
run_rc_command "$1"