File: choices

package info (click to toggle)
partman-crypto 136
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,276 kB
  • sloc: sh: 1,874; ansic: 174; makefile: 29
file content (31 lines) | stat: -rwxr-xr-x 515 bytes parent folder | download | duplicates (10)
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
#!/bin/sh

. /usr/share/debconf/confmodule

set -e

dev=$1
id=$2
part=$dev/$id

cd $dev

choice_crypto_type () {
	desc="none"
	if [ -f $part/crypto_type ]; then
		type=$(cat $part/crypto_type)
		db_metaget partman-crypto/crypto_type/$type description || RET=$type
		desc="$RET"
	fi

	db_metaget partman-crypto/text/specify_crypto_type description
	printf "crypto_type\t%s\${!TAB}%s\n" "$RET" "$desc"
}

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

method=$(cat $part/method)
if [ $method = crypto ]; then
	choice_crypto_type
fi