File: choices

package info (click to toggle)
partman-partitioning 33
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 644 kB
  • ctags: 16
  • sloc: sh: 716; makefile: 41
file content (35 lines) | stat: -rwxr-xr-x 558 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
35
#!/bin/sh

. /lib/partman/definitions.sh

dev=$1
id=$2
cd $dev

if [ -f $id/detected_filesystem ]; then
    fs=$(cat $id/detected_filesystem)
    case "$fs" in
	linux-swap|ext2|ext3|fat16|fat32)
	    true
	    ;;
	ntfs)
	    if ! search-path ntfsresize; then
		exit 0
	    fi
	    ;;
	*)
	    exit 0
	    ;;
    esac
fi

open_dialog PARTITION_INFO $id
read_line x1 id size x4 x5 x6 x7 x8
close_dialog

hsize=$(longint2human $size)

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