File: do_option

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 (32 lines) | stat: -rwxr-xr-x 526 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
#!/bin/sh

. /lib/partman/definitions.sh

dev=$2
id=$3

cd $dev

open_dialog DELETE_PARTITION $id
close_dialog

partitions=''
numparts=1
open_dialog PARTITIONS
while { read_line num id size type fs path name; [ "$id" ]; }; do
    partitions="$partitions $id"
    numparts=$(($numparts + 1))
done
close_dialog

db_progress START 0 $numparts partman/text/please_wait
db_progress INFO partman-partitioning/new_state

for id in $partitions; do
    update_partition $dev $id
    db_progress STEP 1
done

db_progress STOP

exit 100