system: return the mounted and unmounted block devices (as long as xfs or ext4)

This commit is contained in:
Girish Ramakrishnan
2025-09-23 17:30:09 +02:00
parent 8668ff8939
commit f92cdf36f5
7 changed files with 43 additions and 38 deletions
+2 -2
View File
@@ -80,7 +80,7 @@ async function add(volume, auditSource) {
let error = validateName(name);
if (error) throw error;
error = mounts.validateMountOptions(mountType, mountOptions);
error = await mounts.validateMountOptions(mountType, mountOptions);
if (error) throw error;
const id = crypto.randomUUID().replace(/-/g, ''); // to make systemd mount file names more readable
@@ -149,7 +149,7 @@ async function update(id, mountOptions, auditSource) {
if (mountType !== mounts.MOUNT_TYPE_CIFS && mountType !== mounts.MOUNT_TYPE_SSHFS && mountType !== mounts.MOUNT_TYPE_NFS) throw new BoxError(BoxError.BAD_FIELD, 'Only network mounts can be updated');
const error = mounts.validateMountOptions(mountType, mountOptions);
const error = await mounts.validateMountOptions(mountType, mountOptions);
if (error) throw error;
// put old secret back in place if no new secret is provided