summaryrefslogtreecommitdiffstats
path: root/ipmi.sh
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-10-06 04:36:06 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-10-06 04:36:06 +0200
commit162bef18b394caa2053aeb97157333d03d279ddd (patch)
treec62fc89019259e30851e5d145296585e5bd3c135 /ipmi.sh
parentd65dd50278fec1b253fcd3fe4cfcdab533f20cc8 (diff)
downloadipmiboot-162bef18b394caa2053aeb97157333d03d279ddd.tar.gz
ipmiboot-162bef18b394caa2053aeb97157333d03d279ddd.tar.bz2
ipmiboot-162bef18b394caa2053aeb97157333d03d279ddd.tar.xz
ipmiboot-162bef18b394caa2053aeb97157333d03d279ddd.zip
Add ipecompute support
Diffstat (limited to 'ipmi.sh')
-rwxr-xr-xipmi.sh30
1 files changed, 22 insertions, 8 deletions
diff --git a/ipmi.sh b/ipmi.sh
index 5e0901e..4b00165 100755
--- a/ipmi.sh
+++ b/ipmi.sh
@@ -2,7 +2,7 @@ function configure {
hosts=$1
shift
- if [ -n "$1" -a -f "ansible/$1.yml" ]; then
+ if [ -n "$1" -a -f "$itm/$1.yml" ]; then
play="$1.yml"
shift
else
@@ -42,22 +42,32 @@ function ipmi {
}
+
function set_bootdev {
host=$1
+ device=${2:-disk}
+ persistent=${3:-}
+
+ ipmi $host chassis bootdev $device $persistent cons_redirect=enable verbose=default
+ sleep $sleep
- ipmi $host chassis bootdev disk persistent cons_redirect=enable verbose=default
- sleep 0.5
+# ipmi $host chassis bootparam set bootflag force_$device
+# sleep $sleep
}
+
+
function install {
host=$1
# Requires license
-# smipmi $host wsiso mount 192.168.26.134 /images/centos74-ands.iso
+# smipmi $host wsiso mount 192.168.26.172 /images/centos74-ands.iso
+ # off is soft-off on compute2, so we need reset first.
+ #ipmi $host power reset
ipmi $host power off
sleep 10
- ipmi $host chassis bootdev cdrom
+ set_bootdev $host cdrom
sleep $sleep
ipmi $host power on
}
@@ -65,7 +75,7 @@ function install {
function boot {
host=$1
- set_bootdev $host
+ set_bootdev $host disk persistent
ipmi $host power on
sleep $sleep
}
@@ -76,7 +86,9 @@ function reboot {
ipmi $host power off
sleep 10
- set_bootdev $host
+ set_bootdev $host disk persistent
+ sleep $sleep
+
ipmi $host power on
sleep $sleep
}
@@ -86,8 +98,10 @@ function bios {
ipmi $host power off
sleep 10
- ipmi $host chassis bootdev bios
+
+ set_bootdev $host bios
sleep $sleep
+
ipmi $host power on
}