legacy-mode #3
|
@ -41,6 +41,7 @@ def logs(f):
|
||||||
|
|
||||||
@logs
|
@logs
|
||||||
def exec_cmd(cmd):
|
def exec_cmd(cmd):
|
||||||
|
print(f'workbench: INFO: running command `{cmd}`')
|
||||||
return os.popen(cmd).read()
|
return os.popen(cmd).read()
|
||||||
|
|
||||||
@logs
|
@logs
|
||||||
|
@ -220,7 +221,7 @@ def gen_erase(all_disks, type_erase, user_disk=None):
|
||||||
|
|
||||||
@logs
|
@logs
|
||||||
def exec_smart(disk):
|
def exec_smart(disk):
|
||||||
cmd = f'smartctl -x --json=cosviu /dev/{disk}'
|
cmd = f'sudo smartctl -x --json=cosviu /dev/{disk}'
|
||||||
return json.loads(exec_cmd(cmd))
|
return json.loads(exec_cmd(cmd))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue