blob: 7e9f7cd79bf1414f02816aa95b2064277fe8d5f9 [file] [log] [blame]
#!/sbin/runscript
# Copyright 2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/sys-block/partimage/files/partimaged.init,v 1.2 2008/01/15 12:12:05 xmerlin Exp $
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 $?
}