diff --git a/src/modules/networkcfg/main.py b/src/modules/networkcfg/main.py index 5509be205..00a264f53 100644 --- a/src/modules/networkcfg/main.py +++ b/src/modules/networkcfg/main.py @@ -41,8 +41,13 @@ def run(): """ Setup network configuration """ - root_mount_point = libcalamares.globalstorage.value("rootMountPoint") + + if root_mount_point is None: + libcalamares.utils.warning("rootMountPoint is empty, {!s}".format(root_mount_point)) + return (_("Configuration Error"), + _("No root mount point is given for
{!s}
to use." ).format("networkcfg")) + source_nm = "/etc/NetworkManager/system-connections/" target_nm = os.path.join( root_mount_point, "etc/NetworkManager/system-connections/" diff --git a/src/modules/openrcdmcryptcfg/main.py b/src/modules/openrcdmcryptcfg/main.py index 20b306442..0362b421b 100644 --- a/src/modules/openrcdmcryptcfg/main.py +++ b/src/modules/openrcdmcryptcfg/main.py @@ -73,6 +73,15 @@ def run(): dmcrypt_conf_path = libcalamares.job.configuration["configFilePath"] partitions = libcalamares.globalstorage.value("partitions") + if not partitions: + libcalamares.utils.warning("partitions is empty, {!s}".format(partitions)) + return (_("Configuration Error"), + _("No partitions are defined for
{!s}
to use." ).format("openrcdmcryptcfg")) + if not root_mount_point: + libcalamares.utils.warning("rootMountPoint is empty, {!s}".format(root_mount_point)) + return (_("Configuration Error"), + _("No root mount point is given for
{!s}
to use." ).format("openrcdmcryptcfg")) + dmcrypt_conf_path = dmcrypt_conf_path.lstrip('/') return write_dmcrypt_conf(partitions, root_mount_point, dmcrypt_conf_path) diff --git a/src/modules/rawfs/main.py b/src/modules/rawfs/main.py index acf901a0c..af8a8198c 100644 --- a/src/modules/rawfs/main.py +++ b/src/modules/rawfs/main.py @@ -166,6 +166,11 @@ def run(): filesystems = list() partitions = libcalamares.globalstorage.value("partitions") + if not partitions: + libcalamares.utils.warning("partitions is empty, {!s}".format(partitions)) + return (_("Configuration Error"), + _("No partitions are defined for
{!s}
to use." ).format("rawfs")) + for partition in partitions: if partition["mountPoint"]: for src in libcalamares.job.configuration["targets"]: