aboutsummaryrefslogtreecommitdiffstats
path: root/tools/hotplug/NetBSD
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-06-09 13:29:22 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-06-09 13:29:22 +0100
commitbce846e928e960e912d151ee041bc736e615eab5 (patch)
tree8100ca7cb72d2b88e063615914684171f4ce145d /tools/hotplug/NetBSD
parentd2a6ffdc548bac8be83e4be49ced5474b2b1acd2 (diff)
downloadxen-bce846e928e960e912d151ee041bc736e615eab5.tar.gz
xen-bce846e928e960e912d151ee041bc736e615eab5.tar.bz2
xen-bce846e928e960e912d151ee041bc736e615eab5.zip
xen-watchdog: Move init script to OS-dep dir and implement for netbsd
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'tools/hotplug/NetBSD')
-rw-r--r--tools/hotplug/NetBSD/Makefile2
-rw-r--r--tools/hotplug/NetBSD/rc.d/xen-watchdog23
2 files changed, 24 insertions, 1 deletions
diff --git a/tools/hotplug/NetBSD/Makefile b/tools/hotplug/NetBSD/Makefile
index cd68304751..98c1c5bbd4 100644
--- a/tools/hotplug/NetBSD/Makefile
+++ b/tools/hotplug/NetBSD/Makefile
@@ -8,7 +8,7 @@ XEN_SCRIPTS += vif-bridge
XEN_SCRIPTS += vif-ip
XEN_SCRIPT_DATA =
-XEN_RCD_PROG = rc.d/xencommons rc.d/xend rc.d/xendomains
+XEN_RCD_PROG = rc.d/xencommons rc.d/xend rc.d/xendomains rc.d/xen-watchdog
.PHONY: all
all:
diff --git a/tools/hotplug/NetBSD/rc.d/xen-watchdog b/tools/hotplug/NetBSD/rc.d/xen-watchdog
new file mode 100644
index 0000000000..ff4a52c134
--- /dev/null
+++ b/tools/hotplug/NetBSD/rc.d/xen-watchdog
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# PROVIDE: xen-watchdog
+# REQUIRE: DAEMON
+#
+# description: Run domain watchdog daemon
+#
+
+. /etc/rc.subr
+
+DIR=$(dirname "$0")
+. "${DIR}/xen-hotplugpath.sh"
+
+LD_LIBRARY_PATH="${LIBDIR}"
+export LD_LIBRARY_PATH
+
+name="xenwatchdog"
+rcvar=$name
+command="${SBINDIR}/xenwatchdogd"
+start_cmd="echo Starting ${name}. && PATH=${PATH}:${SBINDIR} ${command} 30 15"
+
+load_rc_config $name
+run_rc_command "$1"