summaryrefslogtreecommitdiff
blob: f85aa4fe464cddc739b540cfacf0b4bda0a484a4 (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
#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xenstored.initd,v 1.2 2011/04/05 21:25:03 alexxy Exp $

depend() {
	need net
	before xendomains xend sshd ntp-client ntpd nfs nfsmount rsyncd portmap dhcp 
}

start() {
	ebegin "Starting xenstored daemon"
	start-stop-daemon --start --exec /usr/sbin/xenstored \
		--pidfile /var/run/xenstored.pid \
		-- --pid-file=/var/run/xenstored.pid \
		$XENSTORED_OPTS
	sleep 15
	einfo "Setting domain0 name record"
	/usr/bin/xenstore-write "/local/domain/0/name" "Domain-0"
	eend $*
}

stop() {
	ebegin "Stopping xenstored daemon"
	start-stop-daemon --stop --exec /usr/sbin/xenstored \
		--pidfile /var/run/xenstored.pid
	eend $?
}