From ddcd95622007343afde8fca54591100dcb9a8f7b Mon Sep 17 00:00:00 2001 From: pedro Date: Tue, 15 Oct 2024 13:38:01 +0200 Subject: [PATCH] inform of executed command and discovered a command without the sudo --- workbench-script.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/workbench-script.py b/workbench-script.py index dc7b3b3..15388df 100644 --- a/workbench-script.py +++ b/workbench-script.py @@ -41,6 +41,7 @@ def logs(f): @logs def exec_cmd(cmd): + print(f'workbench: INFO: running command `{cmd}`') return os.popen(cmd).read() @logs @@ -220,7 +221,7 @@ def gen_erase(all_disks, type_erase, user_disk=None): @logs 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))