diff --git a/deploy-workbench.sh b/deploy-workbench.sh index d0884bc..3effbef 100755 --- a/deploy-workbench.sh +++ b/deploy-workbench.sh @@ -327,7 +327,7 @@ echo 'Install requirements' apt-get install -y --no-install-recommends \ sudo locales keyboard-configuration console-setup qrencode \ python-is-python3 python3 python3-dev python3-pip pipenv \ - dmidecode smartmontools hwinfo pciutils lshw nfs-common < /dev/null + dmidecode smartmontools hwinfo pciutils lshw nfs-common inxi < /dev/null # Install lshw B02.19 utility using backports (DEPRECATED in Debian 12) #apt install -y -t ${VERSION_CODENAME}-backports lshw < /dev/null diff --git a/install-dependencies.sh b/install-dependencies.sh index bb97b97..e1f7345 100755 --- a/install-dependencies.sh +++ b/install-dependencies.sh @@ -9,7 +9,7 @@ set -u set -x main() { - sudo apt install smartmontools lshw hwinfo dmidecode + sudo apt install qrencode smartmontools lshw hwinfo dmidecode inxi } main "${@}" diff --git a/workbench-script.py b/workbench-script.py old mode 100644 new mode 100755 index 99dbc4a..fa36f7d --- a/workbench-script.py +++ b/workbench-script.py @@ -309,8 +309,12 @@ def save_snapshot_in_disk(snapshot, path, snap_uuid): # url = 'http://127.0.0.1:8000/api/snapshot/' def send_snapshot_to_devicehub(snapshot, token, url): url_components = urllib.parse.urlparse(url) + + if isinstance(snapshot, str): + snapshot = json.loads(snapshot) + ev_path = "evidence/{}".format(snapshot["uuid"]) - components = (url_components.schema, url_components.netloc, ev_path, '', '', '') + components = (url_components.scheme, url_components.netloc, ev_path, '', '', '') ev_url = urllib.parse.urlunparse(components) # apt install qrencode qr = "echo {} | qrencode -t ANSI".format(ev_url)