mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
storage: Fix disk usage checking with disconnected SSH mounts
- When disconnected sshfs mounts are present, then df command prints the disk usage for the remaining disks but prints a warning to the stderr and return a non-zero return code. Accommodate this case and parse the information for all the available disks. Tests: - Create a remote backup location and mount it. When the SSH process is killed, it leaves a mount point that is not properly connected. View the storage page to see that disk usage for other partitions is shown properly. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
parent
7c0fa00536
commit
288b58e0b5
@ -325,7 +325,7 @@ def usage_info() -> str:
|
||||
'df', '--exclude-type=tmpfs', '--exclude-type=devtmpfs',
|
||||
'--block-size=1', '--output=source,fstype,size,used,avail,pcent,target'
|
||||
]
|
||||
return subprocess.check_output(command).decode()
|
||||
return action_utils.run(command, check=False).stdout.decode()
|
||||
|
||||
|
||||
@privileged
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user