Merge pull request #295 from CanonicalLtd/mwhudson/no-swapfile-for-btrfs-root
prevent creation of a swapfile when / is btrfs
This commit is contained in:
commit
5a81c397b9
|
@ -401,6 +401,10 @@ class FilesystemModel(object):
|
|||
return True
|
||||
return False
|
||||
|
||||
def swapfile_ok(self):
|
||||
for m in self._mounts:
|
||||
if m.path == '/':
|
||||
return m.device.fstype != 'btrfs'
|
||||
|
||||
## class AttrDict(dict):
|
||||
## __getattr__ = dict.__getitem__
|
||||
|
|
|
@ -134,6 +134,9 @@ class SubiquityModel:
|
|||
},
|
||||
}
|
||||
|
||||
if not self.filesystem.swapfile_ok():
|
||||
config['swap'] = {'size': 0}
|
||||
|
||||
config.update(self.network.render())
|
||||
config.update(self.installpath.render())
|
||||
|
||||
|
|
Loading…
Reference in New Issue