summaryrefslogtreecommitdiff
blob: 96d4cd9871e8f3bb0b19227fff4cb1047f37c5f7 (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
#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvm.rc,v 1.2 2008/02/01 12:40:42 flameeyes Exp $

depend() {
	if [ -e /lib/librc.so ]; then
		# on baselayout-1 this causes
		# dependency-cycles with checkroot (before *)
		before checkroot root
	fi
}

start() {
	if [ ! -e /lib/librc.so ]; then
		eerror "The $SVCNAME init-script is written for baselayout-2!"
		eerror "Please do not use it with baselayout-1!".
		return 1
	fi

	# call the old addon to do the real work
	local ADDON=/lib/rcscripts/addons/${SVCNAME}-start.sh
	[ -e "${ADDON}" ] && . "${ADDON}"
}

stop() {
	# call the old addon to do the real work
	local ADDON=/lib/rcscripts/addons/${SVCNAME}-stop.sh
	[ -e "${ADDON}" ] && . "${ADDON}"
}

# vim:ts=4