#!/bin/sh set -eu arch=$(/bin/busybox uname -m) case "$arch" in aarch64) exec >/dev/console 2>&1 ;; x86_64) exec >/dev/com1 2>&1 ;; *) exit 1 ;; esac finish() { status=$? if [ "$status" -ne 0 ]; then echo "VPAC desktop fixture failed"; fi /sbin/poweroff -f } trap finish EXIT find_command() { for proc in /proc/[0-9]*; do [ -r "$proc/cmdline" ] || continue command=$(tr '\000' ' ' <"$proc/cmdline" 2>/dev/null) || continue if [ "$command" = "$1 " ]; then echo "${proc##*/}"; return 0; fi done return 1 } echo 'Checking the first-boot Vinix desktop' /bin/busybox sha256sum -c /desktop-programs.sha256 case "$arch" in aarch64) test "$(readlink /proc/1/exe)" = /sbin/init ;; x86_64) tr '\000' '\n'