| 1 | #!/bin/sh |
| 2 | # BusyBox init runs this from the signed release package root. |
| 3 | set -eu |
| 4 | export PATH=/bin:/usr/bin:/sbin:/usr/sbin LC_ALL=C |
| 5 | trap '/sbin/poweroff -f' EXIT |
| 6 | |
| 7 | test "$(uname -s)" = Vinix |
| 8 | test "$(uname -o)" = Vinix |
| 9 | machine=$(uname -m) |
| 10 | count=0 |
| 11 | while IFS= read -r applet; do |
| 12 | test -L "/$applet" |
| 13 | test "$(readlink -f "/$applet")" = /bin/busybox |
| 14 | count=$((count + 1)) |
| 15 | done </etc/busybox-paths.d/busybox |
| 16 | test "$count" -gt 280 |
| 17 | test -x /usr/bin/ssl_client |
| 18 | |
| 19 | mkdir -p /tmp/busybox-release/hooks |
| 20 | cd /tmp/busybox-release |
| 21 | printf '#!/bin/sh\necho ran > /tmp/busybox-release/result\n' >hooks/01-check |
| 22 | chmod 755 hooks/01-check |
| 23 | test "$(/bin/run-parts --test hooks)" = hooks/01-check |
| 24 | /bin/run-parts hooks |
| 25 | test "$(cat result)" = ran |
| 26 | |
| 27 | if [ "$machine" = aarch64 ]; then |
| 28 | test "$(/bin/env /bin/awk 'BEGIN { print 6 * 7 }')" = 42 |
| 29 | test "$(/bin/find hooks -name 01-check)" = hooks/01-check |
| 30 | fi |
| 31 | echo "Vinix $machine verified $count installed BusyBox links and ran a hook" |
| 32 | echo 'VPAC FIXTURE GUEST PASS' |
| 33 | |