Compare commits
2 commits
a857db5de1
...
4cb3e34b6b
Author | SHA1 | Date | |
---|---|---|---|
4cb3e34b6b | |||
b4d86fcc12 |
|
@ -93,6 +93,7 @@ pxe-service=x86PC,"Network Boot",pxelinux
|
||||||
enable-tftp
|
enable-tftp
|
||||||
tftp-root=${tftp_path}
|
tftp-root=${tftp_path}
|
||||||
END
|
END
|
||||||
|
sudo systemctl restart dnsmasq
|
||||||
}
|
}
|
||||||
|
|
||||||
install_netboot() {
|
install_netboot() {
|
||||||
|
|
|
@ -319,13 +319,15 @@ def send_snapshot_to_devicehub(snapshot, token, url, legacy):
|
||||||
if legacy:
|
if legacy:
|
||||||
try:
|
try:
|
||||||
response = json.loads(response_text)
|
response = json.loads(response_text)
|
||||||
if response.get('url'):
|
public_url = response.get('public_url')
|
||||||
|
dhid = response.get('dhid')
|
||||||
|
if public_url:
|
||||||
# apt install qrencode
|
# apt install qrencode
|
||||||
qr = "echo {} | qrencode -t ANSI".format(response['url'])
|
qr = "echo {} | qrencode -t ANSI".format(public_url)
|
||||||
print(exec_cmd(qr))
|
print(exec_cmd(qr))
|
||||||
print("url: {}".format(response['url']))
|
print("url: {}".format(public_url))
|
||||||
if response.get("dhid"):
|
if dhid:
|
||||||
print("dhid: {}".format(response['dhid']))
|
print("dhid: {}".format(dhid))
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.error(response_text)
|
logger.error(response_text)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue