[rawfs] Don't bother updating mount if this is a test (bogus) run

This improves things when running tests on FreeBSD, which doesn't
have a /proc/mounts to read.
This commit is contained in:
Adriaan de Groot 2024-06-20 19:34:01 +02:00
parent 52cff12c38
commit 2e825167a3

View File

@ -126,7 +126,7 @@ class RawFSItem:
config["source"], device))
self.source = os.path.realpath(config["source"])
# If source is a mount point, look for the actual device mounted on it
if os.path.ismount(self.source):
if os.path.ismount(self.source) and not libcalamares.job.configuration.get("bogus", False):
procmounts = open("/proc/mounts", "r")
for line in procmounts:
if self.source in line.split():