Blob Blame History Raw
From 52ca919e15e246324d084f2a9d03884aa9bfb81f Mon Sep 17 00:00:00 2001
From: Pablo Greco <psgreco@gmail.com>
Date: Thu, 22 Nov 2018 13:35:04 -0300
Subject: [PATCH] fstype is optional for swap, check mountpoint also

---
 appcreate/partitionedfs.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/appcreate/partitionedfs.py b/appcreate/partitionedfs.py
index 3cc09c1..b738b80 100644
--- a/appcreate/partitionedfs.py
+++ b/appcreate/partitionedfs.py
@@ -110,7 +110,7 @@ class PartitionedMount(Mount):
             logging.debug("Add %s part at %d of size %d" % (p['type'], p['start'], p['size']))
             if p['fstype'].startswith('ext'):
                 fstype = 'ext2'
-            if p['fstype'].startswith('swap'):
+            if p['fstype'].startswith('swap') or p['mountpoint'].startswith('swap'):
                 fstype = 'linux-swap'
             if p['fstype'] == 'vfat':
                 fstype = 'fat32'
-- 
2.17.2