forked from OleHolmNielsen/Slurm_tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ipmi_setup
executable file
·43 lines (38 loc) · 1.02 KB
/
ipmi_setup
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
40
41
42
43
#!/usr/bin/env bash
# Helper script: Initial setup of IPMI login to be performed once on every compute node
# Configure the site IPMI login name and password
IPMI_USER=root
IPMI_PASSWORD='verysecretpassword'
yum install OpenIPMI ipmitool dmidecode
echo Set IPMI variables for each brand of servers:
MANUFACTURER="`dmidecode -s system-manufacturer`"
if [[ "$MANUFACTURER" = "Dell Inc." ]]
then
echo "Dell PowerEdge server detected."
channel=1
userno=2
elif [[ "$MANUFACTURER" = "HP" ]]
then
echo "HP Gen6 to Gen9 server detected."
channel=2
userno=2
elif [[ "$MANUFACTURER" = "HPE" ]]
then
echo "HPE Gen10 server detected."
channel=2
userno=1
elif [[ "$MANUFACTURER" = "Supermicro" ]]
then
echo "Supermicro server detected."
channel=1
userno=2
else
echo
echo "Unknown server detected - IPMI is not configured."
ipmitool bmc info
exit 0
fi
ipmitool user set name $userno $IPMI_USER
ipmitool user set password $userno $IPMI_PASSWORD
ipmitool user list $channel
ipmitool lan print $channel