File: choices

package info (click to toggle)
partman-crypto 20etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 2,068 kB
  • ctags: 64
  • sloc: sh: 1,772; ansic: 172; makefile: 82
file content (32 lines) | stat: -rwxr-xr-x 515 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
23
24
25
26
27
28
29
30
31
32
#!/bin/sh

. /usr/share/debconf/confmodule

set -e

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

cd $dev

choice_cipher () {
	if [ -f $part/cipher ]; then
		cipher=$(cat $part/cipher)
	else
		db_metaget partman-basicfilesystems/text/no_mountpoint description
		cipher="$RET" # "none"
	fi

	db_metaget partman-crypto/text/specify_cipher description
	RET=$(stralign -25 "$RET")
	printf "encryption\t%s%s\n" "$RET" "$cipher"
}

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

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