system: also get rota information
This commit is contained in:
@@ -314,7 +314,7 @@ async function getLogs(unit, options) {
|
||||
}
|
||||
|
||||
async function getBlockDevices() {
|
||||
const result = await shell.exec('getBlockDevices', 'lsblk --paths --json --list --fs', {});
|
||||
const result = await shell.exec('getBlockDevices', 'lsblk --paths --json --list --fs --output +rota', {});
|
||||
const info = safe.JSON.parse(result);
|
||||
if (!info) throw new BoxError(BoxError.INTERNAL_ERROR, `failed to parse lsblk: ${safe.error.message}`);
|
||||
|
||||
@@ -328,6 +328,7 @@ async function getBlockDevices() {
|
||||
size: d.fsavail || 0,
|
||||
type: d.fstype,
|
||||
uuid: d.uuid,
|
||||
rota: d.rota, // false (ssd) true (hdd)
|
||||
mountpoint: d.mountpoints ? d.mountpoints.pop() : d.mountpoint // we only support one mountpoint here old lsblk only exposed one via .mountpoint
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user