# Shell snippet: read the PE's result off the VMIX HFS+ volume of a raw disk # image (${image}). Prints the guest logs and sets STATUS to the contents of # vmix-run.status ("0" on success, empty if run.sh never returned, e.g. the # installer rebooted). The PE unmounts VMIX before powering off. { ... }: image: '' echo "=== vmix: reading result from ${image} ===" for f in vmix-run.log system-install.log; do C=$(guestfish --ro -a ${image} -m /dev/sda1 cat /$f 2>/dev/null || true) [ -n "$C" ] && { echo "--- $f ---"; printf '%s\n' "$C" | tail -400; } done STATUS=$(guestfish --ro -a ${image} -m /dev/sda1 cat /vmix-run.status 2>/dev/null | tr -d '[:space:]' || true) ''