From 32a5a796f77c006a13ed20795319e039f3e61adc Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Fri, 1 Feb 2019 14:23:59 +0100 Subject: [PATCH] [rawfs] Allow use of symlinks in configuration In its current state, the 'rawfs' module requires the source partition to be identified either by its mount point or device name, but using a symlink to either one (e.g '/dev/disk/by-uuid/...') would fail. This patch fetches the real path of source partition, allowing the use of symlinks. Signed-off-by: Arnaud Ferraris --- src/modules/rawfs/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/rawfs/main.py b/src/modules/rawfs/main.py index b23fddd10..2ccb03b69 100644 --- a/src/modules/rawfs/main.py +++ b/src/modules/rawfs/main.py @@ -131,7 +131,7 @@ class RawFSItem: def __init__(self, config, device, fs): libcalamares.utils.debug("Adding an entry for raw copy of {} to {}".format( config["source"], device)) - self.source = config["source"] + 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): procmounts = open("/proc/mounts", "r")