~ubuntu-branches/ubuntu/maverick/partman-basicfilesystems/maverick

« back to all changes in this revision

Viewing changes to mount.d/basic

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2007-07-16 18:03:30 UTC
  • Revision ID: james.westby@ubuntu.com-20070716180330-bnuov6jh449xab2j
Tags: 54ubuntu2
* Backport from trunk (LP: #126328):
  - Resolve symlinks before looking up devices in /proc/swaps.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
        ;;
18
18
    swap)
19
19
        # Probably it's already swapped on.
20
 
        if [ -f /proc/swaps ] && grep -q "^$fs " /proc/swaps; then
 
20
        if [ -f /proc/swaps ] && \
 
21
           grep -q "^$(readlink -f "$fs") " /proc/swaps; then
21
22
                echo "swapoff $fs"
22
23
                exit 0
23
24
        fi