| 1 | #!/bin/sh |
| 2 | set -eu |
| 3 | export PATH=/bin:/usr/bin:/sbin:/usr/sbin HOME=/tmp TERM=xterm-256color |
| 4 | phase=shell |
| 5 | finish() { |
| 6 | status=$? |
| 7 | if [ "$status" -ne 0 ]; then echo "VPAC package path check failed at $phase"; fi |
| 8 | /sbin/poweroff -f |
| 9 | } |
| 10 | trap finish EXIT |
| 11 | mkdir -p /tmp |
| 12 | cd /tmp |
| 13 | /bin/zsh -fc ' |
| 14 | zmodload zsh/attr && zmodload zsh/zle && zmodload zsh/complete || exit 1 |
| 15 | autoload -Uz compinit && compinit -i -D || exit 1 |
| 16 | (( $+functions[_main_complete] )) || exit 1 |
| 17 | [[ ${_comps[pmap]} == _pmap && ${_comps[chcon]} == _selinux ]] || exit 1 |
| 18 | print -r -- "Zsh $ZSH_VERSION loaded modules and completions" |
| 19 | ' |
| 20 | phase=terminfo |
| 21 | for term in linux alacritty xterm-256color; do |
| 22 | infocmp "$term" >"/tmp/$term" |
| 23 | grep -q "$term" "/tmp/$term" |
| 24 | done |
| 25 | phase=fonts |
| 26 | font=/usr/share/fonts/X11/misc/10x20.pcf.gz |
| 27 | index=/usr/share/fonts/X11/misc/fonts.dir |
| 28 | grep -q '^10x20.pcf.gz ' "$index" |
| 29 | family=$(fc-scan --format '%{family}' "$font") |
| 30 | test -n "$family" |
| 31 | printf 'Packaged bitmap font family: %s\n' "$family" |
| 32 | phase=binutils |
| 33 | target=$(/bin/busybox uname -m)-linux-musl |
| 34 | "/usr/$target/bin/as" --version |
| 35 | "/usr/$target/bin/ld" --verbose >/tmp/linker-script |
| 36 | grep -q 'SECTIONS' /tmp/linker-script |
| 37 | echo 'VPAC FIXTURE GUEST PASS' |
| 38 | |