]> git.ipfire.org Git - people/ms/bricklayer.git/commitdiff
disk: Set filesystem to auto
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 1 Dec 2022 13:58:08 +0000 (13:58 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 1 Dec 2022 13:58:08 +0000 (13:58 +0000)
Sometimes, the names that parted uses are different from what mount/the
kernel expect. Therefore we let it automatically detect the filesystem
unless a partition is a swap space.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/python/disk.py

index 99fdf181064e26f4d2e32d7b384f3265ab773d4a..2c405937aad04d913055eb53f17188b1738d1bc8 100644 (file)
@@ -488,7 +488,9 @@ class Partition(object):
                return "UUID=%s %s %s defaults 0 0\n" % (
                        self.uuid,
                        self.mountpoint or "none",
-                       self.filesystem,
+
+                       # Let the kernel automatically detect the filesystem unless it is swap space
+                       "swap" if self.filesystem == "swap" else "auto",
                )