blob: b081e8db5192a47b56f9f26a23080952af030ec3 (
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
29
30
31
32
33
34
35
36
37
38
39
|
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: xenguest
# REQUIRE: LOGIN
# KEYWORD: nojail shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# xenguest_enable (bool): Set to NO by default.
# Set it to YES to enable xenguest.
. /etc/rc.subr
name=xenguest
desc="Xen Guest Daemon"
rcvar=xenguest_enable
load_rc_config $name
command="%%PREFIX%%/sbin/xe-daemon"
pidfile=/var/run/xe-daemon.pid
command_interpreter=/bin/sh
command_args='-p ${pidfile} &'
autoxen=`sysctl kern.vm_guest`
autoxen="${autoxen#kern.vm_guest: }"
case "${autoxen}" in
xen)
: ${xenguest_enable:=YES}
;;
*)
: ${xenguest_enable:=NO}
;;
esac
run_rc_command "$1"
|