~ubuntu-branches/ubuntu/wily/migration-assistant/wily

« back to all changes in this revision

Viewing changes to ma-script-utils

  • Committer: Bazaar Package Importer
  • Author(s): Evan Dandrea, Colin Watson
  • Date: 2007-09-21 21:48:48 UTC
  • Revision ID: james.westby@ubuntu.com-20070921214848-jw944gwpm6ogf7lg
Tags: 0.5.1
[ Colin Watson ]
* In the Windows case in mount_os:
  - Look in /proc/mounts, not /proc/partitions.
  - Look in /proc/mounts before /etc/mtab.
  - Make sure to select only the first mountpoint for a given device (in
    case of bind mounts).

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
        # whole system in Windows (yet), we can allow already mounted
147
147
        # partitions.  This may fix some corner cases.  At any rate, it's
148
148
        # required for Wubi to function properly.
149
 
        [ -f /etc/mtab ] && mnt=$(grep "$device" /etc/mtab|cut -d " " -f 2) \
150
 
        [ -z "$mnt" ] && mnt=$(grep "$device" /proc/partitions|cut -d " " -f 2) \
 
149
        mnt=$(grep "$device" /proc/mounts | head -n1 | cut -d " " -f 2)
 
150
        [ -z "$mnt" ] && [ -f /etc/mtab ] && mnt=$(grep "$device" /etc/mtab | head -n1 | cut -d " " -f 2)
151
151
        [ -n "$mnt" ] && mountpoint=$mnt && return 0
152
152
 
153
153
        mkdir -p $mountpoint