Compare commits

...

5 Commits

Author SHA1 Message Date
pedro b255dddff7 Makefile: easy way to regenerate pxe setup 2024-11-12 01:21:11 +01:00
pedro fb7e768229 pxe: dnsmasq restart, do not cause big error 2024-11-12 01:20:54 +01:00
pedro 768851090a settings.ini.example: legacy, use capital boolean 2024-11-12 01:16:25 +01:00
pedro 4cb3e34b6b legacy: use public_url, url is not very useful
also refactor vars so it is easier to read
2024-11-12 01:15:34 +01:00
pedro b4d86fcc12 pxe: restart dnsmasq after applying config
useful on first init of service
2024-11-11 14:50:33 +01:00
4 changed files with 14 additions and 6 deletions

View File

@ -44,6 +44,11 @@ boot_iso_uefi_secureboot:
-drive file=deploy/iso/workbench_debug.iso,cache=none,if=virtio,format=raw,index=0,media=disk \ -drive file=deploy/iso/workbench_debug.iso,cache=none,if=virtio,format=raw,index=0,media=disk \
-boot menu=on -boot menu=on
# when you change something, you need to refresh it this way
regenerate_pxe_install:
./deploy-workbench.sh
pxe/install-pxe.sh
es_gen: es_gen:
$(MAKE) es_gen_po $(MAKE) es_gen_po
$(MAKE) es_gen_mo $(MAKE) es_gen_mo

View File

@ -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 || true
} }
install_netboot() { install_netboot() {

View File

@ -7,4 +7,4 @@ token = 5018dd65-9abd-4a62-8896-80f34ac66150
# path = /path/to/save # path = /path/to/save
# device = your_device_name # device = your_device_name
# # erase = basic # # erase = basic
# legacy = true # legacy = True

View File

@ -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: