~ubuntu-branches/ubuntu/lucid/cryptsetup/lucid

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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#! /bin/sh
### BEGIN INIT INFO
# Provides:          cryptdisks-early
# Required-Start:    checkroot
# Required-Stop:     umountroot
# Should-Start:      udev
# Should-Stop:       udev
# X-Start-Before:    mdadm-raid lvm2
# X-Interactive:     true
# Default-Start:     S
# Default-Stop:      0 6
# Short-Description: Setup early encrypted block devices.
# Description:
### END INIT INFO

set -e

if [ -r /lib/cryptsetup/cryptdisks.functions ]; then
	. /lib/cryptsetup/cryptdisks.functions
else
	exit 0
fi

INITSTATE="early"
LOUD=""

case "$CRYPTDISKS_ENABLE" in
[Nn]*)
	exit 0
	;;
esac

case "$1" in
start)
	;;
stop)
	do_stop
	;;
restart|reload|force-reload)
	do_stop
	do_start
	;;
force-start)
	FORCE_START="yes"
	do_start
	;;
*)
	echo "Usage: cryptdisks-early {start|stop|restart|reload|force-reload|force-start}"
	exit 1
	;;
esac