diff options
Diffstat (limited to 'sys-block/partimage/files/partimaged.init.2')
-rw-r--r-- | sys-block/partimage/files/partimaged.init.2 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sys-block/partimage/files/partimaged.init.2 b/sys-block/partimage/files/partimaged.init.2 new file mode 100644 index 000000000000..140f83c9c70f --- /dev/null +++ b/sys-block/partimage/files/partimaged.init.2 @@ -0,0 +1,29 @@ +#!/sbin/runscript +# Copyright 2005-2010 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 --exec ${PARTIMAGED} \ + -- ${PARTIMAGED_OPTS} --daemon + eend $? || failed_startup +} + +stop() { + ebegin "Stopping partimaged" + start-stop-daemon --stop --exec ${PARTIMAGED} + eend $? +} |