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

« back to all changes in this revision

Viewing changes to ma-ask

  • Committer: Bazaar Package Importer
  • Author(s): Evan Dandrea
  • Date: 2011-04-12 16:17:18 UTC
  • Revision ID: james.westby@ubuntu.com-20110412161718-rrk6erwud0mp4h9k
Tags: 0.6.10
Filter out the target filesystem from consideration (LP: #754778).

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
do
25
25
    dist=$(LC_ALL=C expr match "$line" '.*:\(.*\):.*:.*')
26
26
    location=${line%%:*}
 
27
    # Don't present the target filesystem
 
28
    target="$(grep ' /target ' /proc/mounts | cut -d' ' -f1)"
 
29
    target="$(readlink -e "$target")" || target=
 
30
    home="$(grep ' /target/home ' /proc/mounts | cut -d' ' -f1)"
 
31
    home="$(readlink -e "$home")" || home=
 
32
    if [ "$target" = "$location" ] || "$home" = "$location" ]; then
 
33
            continue
 
34
    fi
27
35
    if [ -z "$tmp" ]; then
28
36
        tmp="$dist ($location)"
29
37
    else