From c079cf05b0684a334fdd830ae53e9af3bae5bc8a Mon Sep 17 00:00:00 2001 From: Katerina Koukiou Date: Wed, 24 Jan 2024 21:01:24 +0100 Subject: [PATCH] storage: pass configured swap partition in the cockpit_mount_points --- pkg/storaged/client.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/storaged/client.js b/pkg/storaged/client.js index fb42fed88bd..1176fbbaa63 100644 --- a/pkg/storaged/client.js +++ b/pkg/storaged/client.js @@ -1770,8 +1770,13 @@ client.export_mount_point_mapping = () => { for (const c of b.Configuration) { if (c[0] == "fstab") { const dir = client.strip_mount_point_prefix(utils.decode_filename(c[1].dir.v)); + const device = utils.decode_filename(b.PreferredDevice); + const type = utils.decode_filename(c[1].type.v); + if (dir) - mpm[dir] = utils.decode_filename(b.PreferredDevice); + mpm[dir] = device; + if (type === "swap") + mpm[type] = device; } } }