File: do_option

package info (click to toggle)
partman-crypto 20
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 2,068 kB
  • ctags: 62
  • sloc: sh: 1,734; ansic: 172; makefile: 82
file content (22 lines) | stat: -rwxr-xr-x 466 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

# This script handles selecting the IV generation algorithm for crypt_types
# that use variable IV algorithms (ie. not loop-AES)

. /lib/partman/crypto_tools.sh

dev=$2
id=$3
part=$dev/$id

[ -f $part/method ] || exit 0
[ -f $part/crypto_type ] || exit 0
[ -f $part/cipher ] || exit 0

method=$(cat $part/method)
type=$(cat $part/crypto_type)
cipher=$(cat $part/cipher)

if [ $method = crypto ]; then
	crypto_dooption $part $type $cipher "ivalgorithm"
fi