#!/bin/sh
# DF-4369 environment probe: prove (a) the hpt27xx driver is present in the
# running kernel and (b) no HighPoint RocketRAID 27xx controller exists on
# this guest, so the racing paths cannot be executed here.
set -x
uname -a
sysctl -n kern.bootfile 2>/dev/null
echo '--- PCI bus ---'
pciconf -l
echo '--- HighPoint devices (vendor 0x1103) ---'
pciconf -l | grep -i 1103 || echo 'NONE: no HighPoint controller present'
echo '--- hpt27xx module state ---'
kldstat -v 2>/dev/null | grep -i hpt27xx || true
kldload hpt27xx 2>&1 || true
echo '--- dev node ---'
ls -l /dev/hpt27xx 2>&1 || true
echo '--- dmesg hpt ---'
dmesg | grep -i hpt || echo 'no hpt attach messages'
