/usr/lib/2013.com.canonical.certification:checkbox/bin/ipmi_test is in plainbox-provider-checkbox 0.4-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | #!/bin/bash
# Now make sure the modules are loaded
for module in ipmi_si ipmi_devintf ipmi_msghandler; do
if lsmod |grep -q $module; then
echo "$module already loaded"
else
echo "Loading $module..."
modprobe $module
result=$?
# if ipmi_si fails to load, it's safe to assume the system
# has no BMC, so we'll just politely exit.
if [ $result -eq 1 ] && [ "$module" = "ipmi_si" ]; then
echo "WARNING: No BMC found. Aborting."
exit 0
elif [ $result -eq 1 ]; then
echo "ERROR: Unable to load module $module" >&2
echo "Aborting IPMI test run." >&2
exit 1
else
echo "Successfully loaded module $module"
fi
fi
done
# Now get our info from ipmitool to make sure communication works
# First lest check chassis status
echo "Checking for chassis status"
ipmitool chassis status && echo "Successfully got chassis status" && chassis=0 || chassis=1
echo "Checking to see if we can get sensor data"
ipmitool sdr list full && echo "Successfully got sensor data" && sensor=0 || sensor=1
echo "Checking to see if we can get info on the BMC"
ipmitool bmc info && echo "Successfully got BMC information" && bmc=0 || bmc=1
# if everything passes, exit 0
[ $chassis -eq 0 ] && [ $sensor -eq 0 ] && [ $bmc -eq 0 ] && exit 0 || echo "FAILURE: chassis: $chassis sensor: $sensor bmc: $bmc"
# otherwise exit 1
exit 1
|