From d3018abde9b0744175bca3edf71e524ca6b84e8f Mon Sep 17 00:00:00 2001 From: pedro Date: Thu, 19 Sep 2024 12:40:04 -0300 Subject: [PATCH] workbench: use sudo everywhere that means adjusting fine the hostname, which right now is hardcoded to workbench --- deploy-workbench.sh | 5 +++-- workbench-script.py | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/deploy-workbench.sh b/deploy-workbench.sh index 882e676..ef855cc 100755 --- a/deploy-workbench.sh +++ b/deploy-workbench.sh @@ -249,7 +249,7 @@ END2 ################### # configure hosts cat > /etc/hosts < /etc/hostname +echo workbench > /etc/hostname # check what linux images are available on the system # Figure out which Linux Kernel you want in the live environment. diff --git a/workbench-script.py b/workbench-script.py index 84653c2..ec0b459 100644 --- a/workbench-script.py +++ b/workbench-script.py @@ -228,9 +228,9 @@ def smartctl(all_disks, disk=None): def get_data(all_disks): - lshw = 'lshw -json' - hwinfo = 'hwinfo --reallyall' - dmidecode = 'dmidecode' + lshw = 'sudo lshw -json' + hwinfo = 'sudo hwinfo --reallyall' + dmidecode = 'sudo dmidecode' data = { 'lshw': exec_cmd(lshw), 'disks': smartctl(all_disks),