Always query sdx path if it specifies a uuid
@@ -61,10 +61,11 @@ class OSEncryptionState(object):
if rootfs_sdx_path == "none":
self.context.logger.log("rootfs_sdx_path is none, parsing UUID from fstab")
- rootfs_uuid = self._parse_uuid_from_fstab('/')
- self.context.logger.log("rootfs_uuid: {0}".format(rootfs_uuid))
- rootfs_sdx_path = self.disk_util.query_dev_sdx_path_by_uuid(rootfs_uuid)
+ rootfs_sdx_path = self._parse_uuid_from_fstab('/')
+ self.context.logger.log("rootfs_uuid: {0}".format(rootfs_sdx_path))
+ if rootfs_sdx_path.startswith("/dev/disk/by-uuid/"):
+ rootfs_sdx_path = self.disk_util.query_dev_sdx_path_by_uuid(rootfs_uuid)
self.context.logger.log("rootfs_sdx_path: {0}".format(rootfs_sdx_path))
self.rootfs_disk = None
