This file is indexed.

/usr/share/checkbox/scripts/ipmi_test is in checkbox 0.13.7.

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
#!/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
        # if ipmi_si fails to load, it's safe to assume the system
        # has no BMC, so we'll just politely exit.
        if [ $? -eq 1 ] && [ "$module" == "ipmi_si" ]; then
            echo "No BMC found. Aborting."
            exit 0
        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