aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-block/partimage/files/partimaged.init')
-rw-r--r--sys-block/partimage/files/partimaged.init29
1 files changed, 29 insertions, 0 deletions
diff --git a/sys-block/partimage/files/partimaged.init b/sys-block/partimage/files/partimaged.init
new file mode 100644
index 0000000..b3b1499
--- /dev/null
+++ b/sys-block/partimage/files/partimaged.init
@@ -0,0 +1,29 @@
+#!/sbin/openrc-run
+# Copyright 2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+PARTIMAGED="/usr/sbin/partimaged"
+
+failed_startup() {
+ eerror "The PartImage daemon did not start up correctly."
+ eerror "Perhaps you compiled it with SSL support but forgot to run the ebuild config?"
+ return 1
+}
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting partimaged"
+ start-stop-daemon --start --quiet --exec ${PARTIMAGED} \
+ -- ${PARTIMAGED_OPTS} --daemon > /dev/null 2>&1
+ eend $? || failed_startup
+}
+
+stop() {
+ ebegin "Stopping partimaged"
+ start-stop-daemon --stop --exec ${PARTIMAGED}
+ eend $?
+}