File: choices

package info (click to toggle)
partman-target 49
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 708 kB
  • ctags: 8
  • sloc: sh: 379; makefile: 29
file content (34 lines) | stat: -rwxr-xr-x 687 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
#!/bin/sh

. /lib/partman/definitions.sh

dev=$1
id=$2
cd $dev

if [ -f $id/method ]; then
    method=$(cat $id/method)
else
    method=dont_use
fi

if [ -f $id/filesystem ] && ([ "$method" = keep ] || [ "$method" = format ]); then
    fs=$(cat $id/filesystem)
    db_metaget partman/filesystem_long/$fs description || RET=''
    if [ "$RET" ]; then
	description="$RET"
    else
	description="$fs"
    fi
else
    db_metaget partman/method_long/$method description || RET=''
    if [ "$RET" ]; then
	description="$RET"
    else
	description="$method"
    fi
fi

db_metaget partman-target/text/method description
RET=$(stralign -25 "$RET")
printf "method\t%s%s\n" "${RET}" "$description"