Add a feature:.
if swap partition then can not be mounted. modified: dialog/di_newt.py
This commit is contained in:
@@ -474,8 +474,11 @@ class MountPoint(Screen):
|
||||
nonmount_dir = ['/dev','/etc','/lib64','/lib','/bin','/sbin','/proc','/sys']
|
||||
if flag == 'one':
|
||||
mountpoint = Screen.entry.value()
|
||||
fs = Screen.listbox.current()
|
||||
if not mountpoint:
|
||||
return True
|
||||
if fs == 'linux-swap' and mountpoint:
|
||||
return False
|
||||
for m in nonmount_dir:
|
||||
if re.match(m+'/',mountpoint) or m == mountpoint:
|
||||
return False
|
||||
@@ -541,7 +544,7 @@ class MountPoint(Screen):
|
||||
s = Screen.yesno(self.title, 1, 8, 'TextboxReflowed', 'eLabel', 'Grid_Complex', 'eLabel', 'Checkbox','eLabel','ButtonBar')
|
||||
if s == 0:
|
||||
if not self.check_mountpoint(flag='one'):
|
||||
Screen.pop_window('Invalid mount point','The mount point you entered is invalid.\nMount point must start with "/".They cannot contain spaces.\nMount point cannot be "/dev","/etc","/lib","lib64","/bin","/sbin","/proc","/sys".\n', 50)
|
||||
Screen.pop_window('Invalid mount point','The mount point you entered is invalid.\nMount point must start with "/".They cannot contain spaces.\nMount point cannot be "/dev","/etc","/lib","lib64","/bin","/sbin","/proc","/sys".\nAnd when formatted linux-swap filesystem, the partition can not be mounted.', 50)
|
||||
continue
|
||||
if MD:
|
||||
if Screen.entry.value() != '' or Screen.checkbox.value() == 1:
|
||||
|
||||
Reference in New Issue
Block a user