system: use last mountpoint like before

This commit is contained in:
Girish Ramakrishnan
2025-07-20 10:18:06 +02:00
parent 66107cf7a4
commit 0e3cc97ee6
+1 -3
View File
@@ -324,8 +324,6 @@ async function getBlockDevices() {
const devices = info.blockdevices.filter(d => d.fstype === 'ext4' || d.fstype === 'xfs');
debug(`getBlockDevices: Found ${devices.length} devices. ${devices.map(d => d.name).join(', ')}`);
return devices.map(function (d) {
return {
path: d.name,
@@ -333,7 +331,7 @@ async function getBlockDevices() {
type: d.fstype,
uuid: d.uuid,
rota: d.rota, // false (ssd) true (hdd) . unforuntately, this is not set correctly when virtualized (like in DO)
mountpoint: Array.isArray(d.mountpoints) ? d.mountpoints[0] : d.mountpoint // we only support one mountpoint here old lsblk only exposed one via .mountpoint
mountpoint: Array.isArray(d.mountpoints) ? d.mountpoints[d.mountpoints.length-1] : d.mountpoint // we only support one mountpoint here old lsblk only exposed one via .mountpoint
};
});
}