~wlxing/ecryptfs/lp1695767

« back to all changes in this revision

Viewing changes to src/utils/ecryptfs-setup-swap

  • Committer: Tyler Hicks
  • Date: 2016-07-13 05:02:30 UTC
  • Revision ID: tyhicks@canonical.com-20160713050230-vr1ol2vz8agc0w7d
debian/ecryptfs-utils.postinst: Fix any unencrypted GPT swap partitions
that have mistakenly remained marked as auto mount. This should only
modify the swap partitions on systems that ecryptfs-setup-swap has been
used on. (LP: #1447282, LP: #1597154)

Show diffs side-by-side

added added

removed removed

Lines of Context:
165
165
 
166
166
        # If this is a GPT partition, mark it as no-auto mounting, to avoid
167
167
        # auto-activating it on boot
 
168
        #
 
169
        # IMPORTANT: Much of this code is duplicated in
 
170
        # debian/ecryptfs-utils.postinst. Please keep the two in sync when
 
171
        # making any changes.
168
172
        if [ "$(blkid -p -s PART_ENTRY_SCHEME -o value "$swap")" = "gpt" ]; then
169
173
                # Correctly handle NVMe/MMC drives, as well as any similar physical
170
174
                # block device that follow the "/dev/foo0p1" pattern (LP: #1597154)