mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-05 12:19:31 +00:00
storage: Don't check type of the disk for / and /boot
Other types could be 'disk' (where there is no partition table) and 'loop' when the disk is a loop back device. As long as they are mounted on a important folders, don't let user unmount them. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
6c28884995
commit
6c86db132b
@ -174,12 +174,12 @@ def is_removable_device(disk):
|
||||
|
||||
def is_root_partition(disk):
|
||||
"""Returns whether this disk is mounted at /."""
|
||||
return disk['mountpoint'] == '/' and disk['type'] == 'part'
|
||||
return disk['mountpoint'] == '/'
|
||||
|
||||
|
||||
def is_boot_partition(disk):
|
||||
"""Returns whether this disk is mounted at /boot."""
|
||||
return disk['mountpoint'] == '/boot' and disk['type'] == 'part'
|
||||
return disk['mountpoint'] == '/boot'
|
||||
|
||||
|
||||
def is_expandable(device):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user