~ubuntu-core-dev/partman-btrfs/ubuntu

« back to all changes in this revision

Viewing changes to mount.d/btrfs

  • Committer: Colin Watson
  • Date: 2011-01-31 15:38:31 UTC
  • mfrom: (54.1.1 ubuntu)
  • Revision ID: cjwatson@canonical.com-20110131153831-5zsmtqqd2rhbybya
Tags: 5ubuntu2
mergeĀ lp:~csurbhi/partman-btrfs/testing-subvol

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
case $type in
13
13
    btrfs)
 
14
        options="${options%,subvol=*}"
 
15
        #for removing the option subvol,when thats the only option
 
16
        #eg: options=="subvol=@", no comma present
 
17
        options="${options%subvol=*}"
14
18
        mount -t btrfs ${options:+-o "$options"} $fs /target$mp || exit 1
 
19
        case $mp in
 
20
            /)
 
21
                btrfs subvolume create /target$mp/@
 
22
                umount /target$mp
 
23
                options="${options:+$options,}subvol=@"
 
24
                mount -t btrfs -o $options $fs /target$mp
 
25
                ;;
 
26
            /home)
 
27
                btrfs subvolume create /target$mp/@home
 
28
                umount /target$mp
 
29
                options="${options:+$options,}subvol=@home"
 
30
                mount -t btrfs -o $options $fs /target$mp
 
31
                ;;
 
32
        esac
15
33
        echo "umount /target$mp"
16
34
        exit 0
17
35
        ;;