system: return the mounted and unmounted block devices (as long as xfs or ext4)
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user