aboutsummaryrefslogtreecommitdiffstats
path: root/main/xen/xenqemu.initd
blob: 5872ecf2ac2eab500ced730a209decf99a0db46a (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
#!/sbin/openrc-run
# Distributed under the terms of the GNU General Public License v2

depend() {
	need xenstored xenconsoled
}

start() {
	ebegin "Starting QEMU as disk backend for dom0"
	# XXX: qemu f**** the console when launched with
	# -nographic and -monitor, use nohup to prevent that.
	start-stop-daemon --start --exec nohup \
		--pidfile=/var/run/xenqemu.pid -b -- \
		/usr/lib/xen/bin/qemu-system-i386 \
		-xen-domid 0 -xen-attach -name dom0 -nographic \
		-M xenpv -monitor /dev/null \
		-pidfile /var/run/xenqemu.pid \
		${XENQEMU_OPTS}
	eend $?
}

stop() {
	ebegin "Stopping QEMU as disk backend for dom0"
	start-stop-daemon --stop --exec /usr/lib/xen/bin/qemu-system-i386 \
		--pidfile /var/run/xenqemu.pid
	eend $?
}