~easypeasy-maintainers/easypeasy-project/ubiquity

« back to all changes in this revision

Viewing changes to d-i/source/partman-basicmethods/active_partition/format/choices

  • Committer: Jon Ramvi
  • Date: 2009-07-10 16:08:35 UTC
  • Revision ID: jon@geteasypeasy.com-20090710160835-ltb4mkc3qg31p0mo
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
. /usr/share/debconf/confmodule
 
4
 
 
5
dev="$1"
 
6
id=$2
 
7
cd $dev
 
8
 
 
9
[ -f $id/method ] || exit 0
 
10
method=$(cat $id/method)
 
11
[ "$method" = keep -o "$method" = format ] || exit 0
 
12
 
 
13
[ -f $id/filesystem ] || exit 0
 
14
 
 
15
[ -f $id/existing -a -f $id/formatable ] || exit 0
 
16
 
 
17
if [ "$method" = format ]; then
 
18
        db_metaget partman-basicmethods/text/yes_format description || RET=''
 
19
        if [ "$RET" ]; then
 
20
                status="$RET"
 
21
        else
 
22
                status=yes
 
23
        fi
 
24
else
 
25
        db_metaget partman-basicmethods/text/no_dont_format description || RET=''
 
26
        if [ "$RET" ]; then
 
27
                status="$RET"
 
28
        else
 
29
                status=no
 
30
        fi
 
31
fi
 
32
 
 
33
db_metaget partman-basicmethods/text/format description
 
34
printf "format\t%s\${!TAB}%s\n" "${RET}" "$status"