diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2011-01-02 11:28:21 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2011-01-02 11:28:21 +0000 |
commit | dc1918baac00be158972968a6dda8ff4ad2107f1 (patch) | |
tree | e2ef89e6a88527e87e8989806cf1d61ec6040a9d /testing/xen/xend.initd | |
parent | 984c3c8466c7812969f00ed43faba9b07c9c921c (diff) | |
parent | b6fc756fdef7522cc740448075192a31591ee10a (diff) | |
download | aports-dc1918baac00be158972968a6dda8ff4ad2107f1.tar.bz2 aports-dc1918baac00be158972968a6dda8ff4ad2107f1.tar.xz |
Merge remote branch 'ncopa/master'
Diffstat (limited to 'testing/xen/xend.initd')
-rw-r--r-- | testing/xen/xend.initd | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/testing/xen/xend.initd b/testing/xen/xend.initd new file mode 100644 index 000000000..6958c0479 --- /dev/null +++ b/testing/xen/xend.initd @@ -0,0 +1,38 @@ +#!/sbin/runscript + +depend() { + need net + before xendomains sshd ntp-client ntpd nfs nfsmount rsyncd portmap dhcp +} + +is_privileged_domain() { + grep -qsE '^control_d$' /proc/xen/capabilities + return $? +} + +start() { + if is_privileged_domain ; then + ebegin "Starting Xen daemons" + /usr/sbin/xend start + eend $? + else + eerror "Can't start xend - not a privileged domain" + return 1 + fi +} + +stop() { + ebegin "Stopping Xen control daemon" + /usr/sbin/xend stop + eend $? +} + +restart() { + ebegin "Restarting Xen control daemon" + /usr/sbin/xend restart + eend $? +} + +status() { + is_privileged_domain && /usr/sbin/xend status +} |