Some fixes found while testing #7
|
@ -327,7 +327,7 @@ echo 'Install requirements'
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
sudo locales keyboard-configuration console-setup qrencode \
|
sudo locales keyboard-configuration console-setup qrencode \
|
||||||
python-is-python3 python3 python3-dev python3-pip pipenv \
|
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)
|
# Install lshw B02.19 utility using backports (DEPRECATED in Debian 12)
|
||||||
#apt install -y -t ${VERSION_CODENAME}-backports lshw < /dev/null
|
#apt install -y -t ${VERSION_CODENAME}-backports lshw < /dev/null
|
||||||
|
|
|
@ -9,7 +9,7 @@ set -u
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
sudo apt install smartmontools lshw hwinfo dmidecode
|
sudo apt install qrencode smartmontools lshw hwinfo dmidecode inxi
|
||||||
}
|
}
|
||||||
|
|
||||||
main "${@}"
|
main "${@}"
|
||||||
|
|
|
@ -309,8 +309,12 @@ def save_snapshot_in_disk(snapshot, path, snap_uuid):
|
||||||
# url = 'http://127.0.0.1:8000/api/snapshot/'
|
# url = 'http://127.0.0.1:8000/api/snapshot/'
|
||||||
def send_snapshot_to_devicehub(snapshot, token, url):
|
def send_snapshot_to_devicehub(snapshot, token, url):
|
||||||
url_components = urllib.parse.urlparse(url)
|
url_components = urllib.parse.urlparse(url)
|
||||||
|
|
||||||
|
if isinstance(snapshot, str):
|
||||||
|
snapshot = json.loads(snapshot)
|
||||||
|
|
||||||
ev_path = "evidence/{}".format(snapshot["uuid"])
|
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)
|
ev_url = urllib.parse.urlunparse(components)
|
||||||
# apt install qrencode
|
# apt install qrencode
|
||||||
qr = "echo {} | qrencode -t ANSI".format(ev_url)
|
qr = "echo {} | qrencode -t ANSI".format(ev_url)
|
||||||
|
|
Loading…
Reference in New Issue