File: cryptdisks.upstart

package info (click to toggle)
cryptsetup 2%3A1.4.3-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,396 kB
  • sloc: sh: 14,235; ansic: 10,811; xml: 591; makefile: 380; python: 89; perl: 70; sed: 16
file content (37 lines) | stat: -rw-r--r-- 1,079 bytes parent folder | download
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
# cryptdisks - enable encrypted block devices
#
# Sweep up any devices in /etc/crypttab that have not yet been started at
# the end of udev coldplugging; this partly duplicates the cryptdisks-udev
# job, but is necessary because:
#  - some devices may not be registered as ID_FS_USAGE=crypto by udev (e.g.,
#    random-encrypted devices), but we don't want to call the upstart job
#    for every single block device
#  - some devices can only be decrypted after other devices are decrypted and
#    mounted first, so we need a two-pass system (like
#    /etc/init.d/cryptdisks{,-early} previously)
#
# This job currently still does not guarantee a race-free startup; instances
# of cryptdisks-udev may be started in parallel with this job.

description    "enable remaining boot-time encrypted block devices"

start on stopped udevtrigger or container

task

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

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

	INITSTATE="init"
	do_start
end script