Faster shopfloor-setup sync, prompt spacing, XP-era test client

- Deploy shopfloor-setup with rsync instead of the copy module: the
  ~4 GB tree took about 4 minutes on every re-run because copy checksums
  each file. rsync transfers only changes; changed only when it did.
- iPXE drops a trailing space, so 'Machine number:' ran into the typed
  digits. The space now comes from a hex 20 setting.
- tests/vm: pxetest-xp is a permanent client (SeaBIOS, qemu32 32-bit CPU,
  rtl8139, 1 GiB, IDE disk) for the i686 Clonezilla path; start.sh xp.
  Only one client may run at a time across all three.
This commit is contained in:
cproudlock
2026-10-15 21:43:33 -04:00
parent 23ee99a390
commit 576955785d
9 changed files with 98 additions and 29 deletions

View File

@@ -69,7 +69,10 @@ goto cz_machine
# iPXE cannot check characters: pxe-cz.sh accepts letters, digits and dash
# and asks again there. Empty: ask again. Esc / Ctrl-C: back to the menu.
echo
echo -n Machine number: && read czmachine || goto menu
# iPXE drops a trailing space from a command line, so the space after the
# colon comes from a setting (0x20) rather than the literal text.
set sp:hex 20
echo -n Machine number:${sp:string} && read czmachine || goto menu
isset ${czmachine} || goto cz_machine
# Same CPU check as the manual entry below (cpuid --ext 29 = 64-bit).
cpuid --ext 29 && goto cz_auto64 || goto cz_auto32

View File

@@ -986,12 +986,20 @@
ignore_errors: yes
- name: "Deploy shopfloor setup scripts to enrollment share"
copy:
src: "{{ usb_mount }}/shopfloor-setup/"
dest: /srv/samba/enrollment/shopfloor-setup/
mode: '0755'
directory_mode: '0755'
ignore_errors: yes
# rsync, not copy: the tree is ~4 GB and the copy module checksums every
# file one by one, so a re-run spent minutes here. rsync compares size
# and mtime and transfers only what changed. Merge, no --delete: files
# a site added on the share stay. Skipped if the USB has no tree.
shell: |
set -euo pipefail
SRC="{{ usb_mount }}/shopfloor-setup/"
[ -d "$SRC" ] || { echo "SKIP: no shopfloor-setup on the USB"; exit 0; }
mkdir -p /srv/samba/enrollment/shopfloor-setup
rsync -rlt -i --chmod=D0755,F0755 "$SRC" /srv/samba/enrollment/shopfloor-setup/
args:
executable: /bin/bash
register: shopfloor_rsync
changed_when: shopfloor_rsync.stdout | trim | length > 0 and 'SKIP:' not in shopfloor_rsync.stdout
- name: "Deploy preinstall.json to pre-install/"
copy: