Added print_error and print_warning functions
This commit is contained in:
parent
0c18027184
commit
88167eecfb
3 changed files with 30 additions and 10 deletions
|
|
@ -10,8 +10,7 @@ source functions.sh
|
|||
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
|
||||
print_error_and_exit "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"
|
||||
fi
|
||||
IDRAC_LOGIN_STRING='open'
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue