mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 17:20:30 +08:00
refactoring
This commit is contained in:
parent
970c341519
commit
d55d7beb0e
@ -172,14 +172,16 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_plugin_options(cls) -> Dict:
|
def get_plugin_options(cls) -> Dict:
|
||||||
sudo = ["/usr/bin/sudo", "--non-interactive"]
|
|
||||||
return {
|
return {
|
||||||
"upload_chunk_size": Option(65536, type=functools.partial(valid_number, min=1024)),
|
"upload_chunk_size": Option(65536, type=functools.partial(valid_number, min=1024)),
|
||||||
"sync_chunk_size": Option(4194304, type=functools.partial(valid_number, min=1024)),
|
"sync_chunk_size": Option(4194304, type=functools.partial(valid_number, min=1024)),
|
||||||
|
|
||||||
"storage": Option("/var/lib/kvmd/msd", type=valid_abs_dir, unpack_as="storage_path"),
|
"storage": Option("/var/lib/kvmd/msd", type=valid_abs_dir, unpack_as="storage_path"),
|
||||||
|
|
||||||
"remount_cmd": Option([*sudo, "/usr/bin/kvmd-helper-otgmsd-remount", "{mode}"], type=valid_command),
|
"remount_cmd": Option([
|
||||||
|
"/usr/bin/sudo", "--non-interactive",
|
||||||
|
"/usr/bin/kvmd-helper-otgmsd-remount", "{mode}",
|
||||||
|
], type=valid_command),
|
||||||
|
|
||||||
"initial": {
|
"initial": {
|
||||||
"image": Option("", type=valid_printable_filename, if_empty=""),
|
"image": Option("", type=valid_printable_filename, if_empty=""),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user