Skip to content

Commit

Permalink
Merge pull request #41 from tigerblue77/5-the-container-fails-silentl…
Browse files Browse the repository at this point in the history
…y-when-used-with-local-idrac-without-specifying-the-ipmi-device

Added IPMI device presence check in local mode
  • Loading branch information
tigerblue77 authored Feb 4, 2023
2 parents 9f320e5 + c30bbad commit 8369277
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dell_iDRAC_fan_controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ echo "iDRAC/IPMI host: $IDRAC_HOST"
# Check if the iDRAC host is set to 'local' or not then set the IDRAC_LOGIN_STRING accordingly
if [[ $IDRAC_HOST == "local" ]]
then
# Check that the Docker host IPMI device (the iDRAC) has been exposed to the Docker container
if [ ! -e "/dev/ipmi0" ] && [ ! -e "/dev/ipmi/0" ] && [ ! -e "/dev/ipmidev/0" ]; then
echo "/!\ Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0, check that you added the device to your Docker container or stop using local mode. Exiting." >&2
exit 1
fi
IDRAC_LOGIN_STRING='open'
else
echo "iDRAC/IPMI username: $IDRAC_USERNAME"
Expand Down

0 comments on commit 8369277

Please sign in to comment.