From 80c45eecc193c6c13430ddeb40b9b0fd1841ceee Mon Sep 17 00:00:00 2001
From: Mark Asselstine <mark.asselstine@windriver.com>
Date: Thu, 14 Mar 2013 23:31:38 -0700
Subject: [PATCH] irqbalance: add basic init script

The upstream irqbalance release package does not contain an
init script so we create a basic one here.

Upstream-Status: Inappropriate [embedded specific]

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>

---
 irqbalance.init | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 irqbalance.init

diff --git a/irqbalance.init b/irqbalance.init
new file mode 100644
index 0000000..d12d62c
--- /dev/null
+++ b/irqbalance.init
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# Copyright (c) 2012 Wind River Systems, Inc.
+#
+### BEGIN INIT INFO
+# Provides:             irqbalance
+# Required-Start:
+# Required-Stop:
+# Default-Start:        2 3 4 5
+# Default-Stop:         0 1 6
+# Short-Description:    IRQ allocation daemon
+### END INIT INFO
+
+case "$1" in
+  start)
+	echo -n "Starting irqbalance: "
+	start-stop-daemon -S -b -n irqbalance -a /usr/sbin/irqbalance
+	echo "done"
+	;;
+  stop)
+	echo -n "Shutting down irqbalance: "
+	start-stop-daemon -K -n irqbalance
+	echo "done"
+	;;
+  restart)
+	$0 stop
+	$0 start
+	;;
+  *)
+	echo "Usage: $0 {start | stop | restart}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
