Lines 3-17
Link Here
|
3 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# Distributed under the terms of the GNU General Public License v2 |
4 |
# $Header: /var/cvsroot/gentoo-x86/sys-fs/cryptsetup/files/1.0.5-dmcrypt.rc,v 1.3 2008/02/01 12:38:44 flameeyes Exp $ |
4 |
# $Header: /var/cvsroot/gentoo-x86/sys-fs/cryptsetup/files/1.0.5-dmcrypt.rc,v 1.3 2008/02/01 12:38:44 flameeyes Exp $ |
5 |
|
5 |
|
|
|
6 |
# Check for OpenRC/Baselayout 2 - see bug #270646 |
7 |
is_openrc() { |
8 |
[ -f /lib/librc.so -o -f /etc/init.d/sysfs -o -f /lib/rc/version ] |
9 |
} |
10 |
|
11 |
|
6 |
depend() { |
12 |
depend() { |
7 |
before checkfs fsck |
13 |
before checkfs fsck |
8 |
if [ -e /lib/librc.so ]; then |
14 |
# Necessary for services when using baselayout-2 |
9 |
need device-mapper |
15 |
# but conflict for baselayout-1 |
|
|
16 |
if is_openrc; then |
17 |
need device-mapper |
10 |
fi |
18 |
fi |
11 |
} |
19 |
} |
12 |
|
20 |
|
13 |
start() { |
21 |
start() { |
14 |
if [ ! -e /lib/librc.so ]; then |
22 |
if ! is_openrc; then |
15 |
eerror "The ${myservice} init script is written for baselayout-2" |
23 |
eerror "The ${myservice} init script is written for baselayout-2" |
16 |
eerror "Please do not use it with baselayout-1" |
24 |
eerror "Please do not use it with baselayout-1" |
17 |
return 1 |
25 |
return 1 |
Lines 21-27
Link Here
|
21 |
} |
29 |
} |
22 |
|
30 |
|
23 |
stop() { |
31 |
stop() { |
24 |
if [ ! -e /lib/librc.so ]; then |
32 |
if ! is_openrc; then |
25 |
return 0 |
33 |
return 0 |
26 |
fi |
34 |
fi |
27 |
|
35 |
|