diff --git a/workbench-script.py b/workbench-script.py index 1fdec4e..e4001a5 100644 --- a/workbench-script.py +++ b/workbench-script.py @@ -227,6 +227,8 @@ def smartctl(all_disks, disk=None): ## End Command Functions ## +# TODO permitir selección +# TODO permitir que vaya más rápido def get_data(all_disks): lshw = 'sudo lshw -json' hwinfo = 'sudo hwinfo --reallyall' @@ -341,6 +343,11 @@ def main(): config = load_config(config_file) + # TODO show warning if non root, means data is not complete + # if annotate as potentially invalid snapshot (pending the new API to be done) + if os.geteuid() != 0: + print("workbench: WARNING: This script must be run as root. Collected data will be incomplete or unusable") + all_disks = get_disks() snapshot = gen_snapshot(all_disks)