~ubuntu-branches/debian/sid/partman-basicmethods/sid

« back to all changes in this revision

Viewing changes to choose_method/filesystem/do_option

  • Committer: Bazaar Package Importer
  • Author(s): Otavio Salvador, Updated translations
  • Date: 2008-09-21 21:06:02 UTC
  • mfrom: (2.1.9 hardy)
  • Revision ID: james.westby@ubuntu.com-20080921210602-1zf5aoru3cffphzv
Tags: 42
[ Updated translations ]
* Arabic (ar.po) by Ossama M. Khayat
* Bosnian (bs.po) by Armin Besirovic
* Welsh (cy.po) by Jonathan Price
* Danish (da.po)
* Croatian (hr.po) by Josip Rodin
* Latvian (lv.po) by Peteris Krisjanis
* Macedonian (mk.po) by Arangel Angov
* Portuguese (Brazil) (pt_BR.po) by Felipe Augusto van de Wiel (faw)
* Serbian (sr.po) by Veselin Mijušković

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
 
3
 
. /lib/partman/definitions.sh
 
3
. /lib/partman/lib/base.sh
4
4
 
5
5
fs=$1
6
6
dev=$2
7
7
id=$3
8
8
 
9
 
[ -d $dev/$id ] || mkdir $dev/$id
 
9
mkdir -p $dev/$id
10
10
 
11
11
existing=no
12
 
for j in \
13
 
    $(
14
 
        for i in /lib/partman/valid_filesystems/*; do
15
 
            [ -x $i ] || continue
16
 
           $i $dev $id existing
17
 
        done
18
 
    )
19
 
do
20
 
    if [ "$j" = "$fs" ]; then
21
 
        existing=yes
22
 
    fi
 
12
for j in $(
 
13
                for i in /lib/partman/valid_filesystems/*; do
 
14
                        [ -x $i ] || continue
 
15
                        $i $dev $id existing
 
16
                done
 
17
        ); do
 
18
                if [ "$j" = "$fs" ]; then
 
19
                        existing=yes
 
20
                fi
23
21
done
24
22
 
25
23
if [ $existing = yes ]; then
26
 
    echo keep >$dev/$id/method
27
 
    rm -f $dev/$id/format
28
 
    > $dev/$id/use_filesystem
 
24
        echo keep >$dev/$id/method
 
25
        rm -f $dev/$id/format
 
26
        > $dev/$id/use_filesystem
29
27
else
30
 
    echo format >$dev/$id/method
31
 
    > $dev/$id/format
32
 
    > $dev/$id/use_filesystem
 
28
        echo format >$dev/$id/method
 
29
        > $dev/$id/format
 
30
        > $dev/$id/use_filesystem
33
31
fi
34
32
 
35
33
echo $fs >$dev/$id/filesystem
36
34
 
37
35
if [ ! -d $dev/$id/options ]; then
38
 
    mkdir $dev/$id/options
 
36
        mkdir $dev/$id/options
 
37
        if [ -f /lib/partman/mountoptions/${fs}_defaults ]; then
 
38
                for op in $(cat /lib/partman/mountoptions/${fs}_defaults); do
 
39
                        echo "$op" >"$dev/$id/options/$op"
 
40
                done
 
41
        fi
39
42
fi
40
43
 
41
44
update_partition $dev $id