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

« back to all changes in this revision

Viewing changes to finish.d/nomountpoint_basicfilesystems

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2004-10-06 02:44:52 UTC
  • Revision ID: james.westby@ubuntu.com-20041006024452-dqyxcwf0tarnj0qr
Tags: 26ubuntu1
Set pass field to 0 for FAT filesystems, to prevent filesystem checks
that sometimes behave strangely (closes: Ubuntu #1912).

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
            ext2|fat16|fat32)
 
24
                [ ! -f "$id/mountpoint" ] || continue
 
25
                db_fset partman-basicfilesystems/no_mount_point seen false
 
26
                db_subst partman-basicfilesystems/no_mount_point PARTITION "$num"
 
27
                db_subst partman-basicfilesystems/no_mount_point FILESYSTEM "$filesystem"
 
28
                db_subst partman-basicfilesystems/no_mount_point DEVICE $(humandev $(cat device))
 
29
                db_input critical partman-basicfilesystems/no_mount_point || true
 
30
                db_go || exit 1
 
31
                db_get partman-basicfilesystems/no_mount_point
 
32
                if [ "$RET" = 'true' ]; then
 
33
                    exit 1
 
34
                fi
 
35
                ;;
 
36
        esac
 
37
    done
 
38
done
 
39