summaryrefslogtreecommitdiffstats
path: root/import-layers/meta-virtualization/recipes-extended/irqbalance/irqbalance/add-initscript.patch
blob: b0e608e66ca1b311d06d1f0a3018fe4add0ae265 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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.

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
OpenPOWER on IntegriCloud