3
. /lib/partman/definitions.sh
7
for dev in $DEVICES/*; do
8
[ -d "$dev" ] || continue
11
open_dialog PARTITIONS
12
while { read_line num id size type fs path name; [ "$id" ]; }; do
13
[ "$fs" != free ] || continue
14
partitions="$partitions $id,$num"
18
for part in $partitions; do
21
[ -f $id/method ] || continue
22
method=$(cat $id/method)
23
if [ "$method" = swap ]; then
26
[ ! -f $id/format ] || continue
27
if [ "$method" = swap ]; then
28
log "Check the swap space in $dev/$id"
29
template=partman-basicfilesystems/progress_swap_checking
30
db_subst $template PARTITION "$num"
31
db_subst $template DEVICE $(humandev $(cat device))
32
name_progress_bar $template
33
open_dialog CHECK_FILE_SYSTEM $id
36
if [ "$status" != good ]; then
37
db_subst partman-basicfilesystems/swap_check_failed PARTITION "$num"
38
db_subst partman-basicfilesystems/swap_check_failed DEVICE $(humandev $(cat device))
39
db_set partman-basicfilesystems/swap_check_failed 'true'
40
db_input critical partman-basicfilesystems/swap_check_failed || true
42
db_get partman-basicfilesystems/swap_check_failed
43
if [ "$RET" = 'true' ]; then
52
db_set partman-basicfilesystems/no_swap true
53
db_input critical partman-basicfilesystems/no_swap || true
55
db_get partman-basicfilesystems/no_swap
56
if [ "$RET" = true ]; then