WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xen-watchdog: Move init script to OS-dep

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xen-watchdog: Move init script to OS-dep dir and implement for netbsd
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 10 Jun 2010 02:25:09 -0700
Delivery-date: Thu, 10 Jun 2010 02:25:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1276086562 -3600
# Node ID 5145d5840e611ca1cca91d97fa7b3f90ffdce056
# Parent  28af9eb507f2c315e53bb72c03399c7e69062787
xen-watchdog: Move init script to OS-dep dir and implement for netbsd

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/misc/xen-watchdog                 |   59 --------------------------------
 tools/hotplug/Linux/Makefile            |    1 
 tools/hotplug/Linux/init.d/xen-watchdog |   59 ++++++++++++++++++++++++++++++++
 tools/hotplug/NetBSD/Makefile           |    2 -
 tools/hotplug/NetBSD/rc.d/xen-watchdog  |   23 ++++++++++++
 tools/misc/Makefile                     |    4 --
 6 files changed, 84 insertions(+), 64 deletions(-)

diff -r 28af9eb507f2 -r 5145d5840e61 tools/hotplug/Linux/Makefile
--- a/tools/hotplug/Linux/Makefile      Wed Jun 09 07:55:19 2010 +0100
+++ b/tools/hotplug/Linux/Makefile      Wed Jun 09 13:29:22 2010 +0100
@@ -71,6 +71,7 @@ install-initd:
        $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) 
$(DESTDIR)$(CONFIG_DIR)/sysconfig/xendomains
        $(INSTALL_PROG) $(XENCOMMONS_INITD) $(DESTDIR)$(CONFIG_DIR)/init.d
        $(INSTALL_PROG) $(XENCOMMONS_SYSCONFIG) 
$(DESTDIR)$(CONFIG_DIR)/sysconfig/xencommons
+       $(INSTALL_PROG) init.d/xen-watchdog $(DESTDIR)$(CONFIG_DIR)/init.d
 
 .PHONY: install-scripts
 install-scripts:
diff -r 28af9eb507f2 -r 5145d5840e61 tools/hotplug/Linux/init.d/xen-watchdog
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/hotplug/Linux/init.d/xen-watchdog   Wed Jun 09 13:29:22 2010 +0100
@@ -0,0 +1,59 @@
+#! /bin/bash
+#
+# xen-watchdog
+#
+# chkconfig: 2345 21 79
+# description: Run domain watchdog daemon
+#
+
+# Source function library.
+. /etc/init.d/functions
+
+start() {
+       local r
+       base="watchdogd"
+       echo -n $"Starting domain watchdog daemon: "
+
+       /usr/sbin/xenwatchdogd 30 15
+       r=$?
+       [ "$r" -eq 0 ] && success $"$base startup" || failure $"$base startup"
+       echo
+
+       return $r
+}
+
+stop() {
+       local r
+       base="watchdogd"
+       echo -n $"Stopping domain watchdog daemon: "
+
+       killall -USR1 watchdogd 2>/dev/null
+       r=$?
+       [ "$r" -eq 0 ] && success $"$base stop" || failure $"$base stop"
+       echo
+
+       return $r
+}
+
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart)
+       stop
+       start
+       ;;
+  status)
+       ;;
+  condrestart)
+       stop
+       start
+       ;;
+  *)
+       echo $"Usage: $0 {start|stop|status|restart|condrestart}"
+       exit 1
+esac
+
diff -r 28af9eb507f2 -r 5145d5840e61 tools/hotplug/NetBSD/Makefile
--- a/tools/hotplug/NetBSD/Makefile     Wed Jun 09 07:55:19 2010 +0100
+++ b/tools/hotplug/NetBSD/Makefile     Wed Jun 09 13:29:22 2010 +0100
@@ -8,7 +8,7 @@ XEN_SCRIPTS += vif-ip
 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 -r 28af9eb507f2 -r 5145d5840e61 tools/hotplug/NetBSD/rc.d/xen-watchdog
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/hotplug/NetBSD/rc.d/xen-watchdog    Wed Jun 09 13:29:22 2010 +0100
@@ -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"
diff -r 28af9eb507f2 -r 5145d5840e61 tools/misc/Makefile
--- a/tools/misc/Makefile       Wed Jun 09 07:55:19 2010 +0100
+++ b/tools/misc/Makefile       Wed Jun 09 13:29:22 2010 +0100
@@ -41,10 +41,6 @@ install: build
        $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
        $(INSTALL_PYTHON_PROG) $(INSTALL_BIN) $(DESTDIR)$(BINDIR)
        $(INSTALL_PYTHON_PROG) $(INSTALL_SBIN) $(DESTDIR)$(SBINDIR)
-ifeq ($(CONFIG_Linux),y)
-       $(INSTALL_DIR) $(DESTDIR)$(CONFIG_DIR)/init.d
-       $(INSTALL_PROG) xen-watchdog $(DESTDIR)$(CONFIG_DIR)/init.d
-endif
        set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d install-recurse; done
 
 .PHONY: clean
diff -r 28af9eb507f2 -r 5145d5840e61 tools/misc/xen-watchdog
--- a/tools/misc/xen-watchdog   Wed Jun 09 07:55:19 2010 +0100
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-#! /bin/bash
-#
-# xen-watchdog
-#
-# chkconfig: 2345 21 79
-# description: Run domain watchdog daemon
-#
-
-# Source function library.
-. /etc/init.d/functions
-
-start() {
-       local r
-       base="watchdogd"
-       echo -n $"Starting domain watchdog daemon: "
-
-       /usr/sbin/xenwatchdogd 30 15
-       r=$?
-       [ "$r" -eq 0 ] && success $"$base startup" || failure $"$base startup"
-       echo
-
-       return $r
-}
-
-stop() {
-       local r
-       base="watchdogd"
-       echo -n $"Stopping domain watchdog daemon: "
-
-       killall -USR1 watchdogd 2>/dev/null
-       r=$?
-       [ "$r" -eq 0 ] && success $"$base stop" || failure $"$base stop"
-       echo
-
-       return $r
-}
-
-case "$1" in
-  start)
-       start
-       ;;
-  stop)
-       stop
-       ;;
-  restart)
-       stop
-       start
-       ;;
-  status)
-       ;;
-  condrestart)
-       stop
-       start
-       ;;
-  *)
-       echo $"Usage: $0 {start|stop|status|restart|condrestart}"
-       exit 1
-esac
-

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xen-watchdog: Move init script to OS-dep dir and implement for netbsd, Xen patchbot-unstable <=