~ubuntu-branches/ubuntu/hardy/partman-basicfilesystems/hardy-proposed

« back to all changes in this revision

Viewing changes to finish.d/mountpoint_fat

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2005-10-30 17:58:24 UTC
  • Revision ID: james.westby@ubuntu.com-20051030175824-n9u925as3tli4rh5
Tags: 45ubuntu1
Resynchronise with Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
. /lib/partman/definitions.sh
 
4
 
 
5
for dev in $DEVICES/*; do
 
6
    [ -d "$dev" ] || continue
 
7
    cd $dev
 
8
    partitions=
 
9
    open_dialog PARTITIONS
 
10
    while { read_line num id size type fs path name; [ "$id" ]; }; do
 
11
        [ "$fs" != free ] || continue
 
12
        partitions="$partitions $id,$num"
 
13
    done
 
14
    close_dialog
 
15
 
 
16
    for part in $partitions; do
 
17
        id=${part%,*}
 
18
        num=${part#*,}
 
19
        [ -f $id/method ] || continue
 
20
        [ -f $id/acting_filesystem ] || continue
 
21
        filesystem=$(cat $id/acting_filesystem)
 
22
        case $filesystem in
 
23
            fat16|fat32)
 
24
                [ -f "$id/mountpoint" ] || continue
 
25
                mountpoint="$(cat "$id/mountpoint")"
 
26
                # Check for FAT file systems mounted in places where POSIX
 
27
                # filesystem semantics are usually expected, and make the
 
28
                # user choose again.
 
29
                case $mountpoint in
 
30
                    /|/boot|/home|/opt|/srv|/tmp|/usr|/usr/local|/var)
 
31
                        >"$id/visual_mountpoint"
 
32
                        db_subst partman-basicfilesystems/posix_filesystem_required FILESYSTEM "$filesystem"
 
33
                        db_subst partman-basicfilesystems/posix_filesystem_required MOUNTPOINT "$mountpoint"
 
34
                        db_metaget partman/filesystem_short/ext2 description || RET=
 
35
                        [ "$RET" ] || RET=ext2
 
36
                        db_subst partman-basicfilesystems/posix_filesystem_required EXT2 "$RET"
 
37
                        db_input critical partman-basicfilesystems/posix_filesystem_required || true
 
38
                        db_go || true
 
39
                        exit 1
 
40
                        ;;
 
41
                esac
 
42
                ;;
 
43
        esac
 
44
    done
 
45
done