From 2f71dcad7ba4daa67c711333f8a0341376dd4d43 Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Thu, 16 Jun 2016 14:53:04 +0200 Subject: [PATCH] adapt for ipmi wake --- master/etc/init.d/ipmiwake | 6 +++--- master/opt/ipmi/update_blade_cfg.sh | 7 ++++--- master/opt/tftp/sw.txt | 4 ++-- master/opt/tftp/swg1.txt | 4 ++-- master/opt/tftp/swg2.txt | 4 ++-- master/opt/tftp/swm.txt | 4 ++-- 6 files changed, 15 insertions(+), 14 deletions(-) diff --git a/master/etc/init.d/ipmiwake b/master/etc/init.d/ipmiwake index 541f363..8f2da33 100755 --- a/master/etc/init.d/ipmiwake +++ b/master/etc/init.d/ipmiwake @@ -33,10 +33,10 @@ do_action () { log_action_msg "Send IPMI boot $ACTION command" - ip addr add 10.133.25.1/24 dev eth0 + ip addr add 10.133.29.1/24 dev eth0 for mac in $(awk '{sub(/#.*/, "")} /host\s+trc[0-9]/ && ! /-rf/ { gsub(/[;{}]/, " "); print $5}' $DHCPCONF); do - ipmi=$(awk '{sub(/#.*/, "")} /'$mac'/ {print}' $DHCPCONF | sed 's/.* [0-9.]*\.\([0-9][0-9]*\)[^0-9].*/10.133.25.\1/') + ipmi=$(awk '{sub(/#.*/, "")} /'$mac'/ {print}' $DHCPCONF | sed 's/.* [0-9.]*\.\([0-9][0-9]*\)[^0-9].*/10.133.29.\1/') host=$(awk '{sub(/#.*/, "")} /'$mac'/ {gsub(/[{}]/, " "); print $2}' $DHCPCONF) log_action_msg "Wake-up $host (IPMI boot $ACTION $ipmi)" ipmipower --session-timeout=$TIMEOUT -h $ipmi -u ADMIN -p ADMIN --$ACTION & @@ -44,7 +44,7 @@ do_action () { wait - ip addr del 10.133.25.1/24 dev eth0 + ip addr del 10.133.29.1/24 dev eth0 } case "$1" in diff --git a/master/opt/ipmi/update_blade_cfg.sh b/master/opt/ipmi/update_blade_cfg.sh index 81deeb0..39d5edc 100755 --- a/master/opt/ipmi/update_blade_cfg.sh +++ b/master/opt/ipmi/update_blade_cfg.sh @@ -59,10 +59,11 @@ title "Host ID: $ID" title "Configure IPMI" do_cmd $mydir/ipmicfg.sh -dhcp off do_cmd $mydir/ipmicfg.sh -vlan off -do_cmd $mydir/ipmicfg.sh -m 10.133.25.$ID +do_cmd $mydir/ipmicfg.sh -m 10.133.29.$ID do_cmd $mydir/ipmicfg.sh -k 255.255.248.0 -do_cmd $mydir/ipmicfg.sh -g 10.133.26.231 -do_cmd $mydir/ipmicfg.sh -g 0.0.0.0 +do_cmd ipmitool lan set 1 defgw ipaddr 10.133.26.231 +do_cmd ipmitool lan set 1 bakgw ipaddr 10.133.28.231 +#do_cmd $mydir/ipmicfg.sh -g 0.0.0.0 fanmode=$($mydir/ipmicfg.sh -fan 2>/dev/null | awk -F: '$2 ~ /Optimal/ {print $1}') [ "$fanmode" ] && do_cmd $mydir/ipmicfg.sh -fan $fanmode [ "$(which ipmitool)" ] && do_cmd ipmitool chassis policy always-on diff --git a/master/opt/tftp/sw.txt b/master/opt/tftp/sw.txt index cb01ca1..a1a4c74 100644 --- a/master/opt/tftp/sw.txt +++ b/master/opt/tftp/sw.txt @@ -22,7 +22,7 @@ enable secret 5 $1$OMTZ$xM5SrEPag4m7MGrV1u86/0 ! ! macro name VERSION -macro description 2.4 +macro description 2.5 @ ! no aaa new-model @@ -358,7 +358,7 @@ interface TenGigabitEthernet1/51 interface TenGigabitEthernet1/52 ! interface Vlan1 - ip address 10.133.28.231 255.255.255.0 + ip address 10.133.28.231 255.255.254.0 ip pim sparse-mode ! interface Vlan10 diff --git a/master/opt/tftp/swg1.txt b/master/opt/tftp/swg1.txt index 1fc0598..bfa4cbf 100644 --- a/master/opt/tftp/swg1.txt +++ b/master/opt/tftp/swg1.txt @@ -22,7 +22,7 @@ enable secret 5 $1$OMTZ$xM5SrEPag4m7MGrV1u86/0 ! ! macro name VERSION -macro description 2.3 full-duplex +macro description 2.4 @ ! no aaa new-model @@ -322,7 +322,7 @@ interface TenGigabitEthernet1/52 switchport mode access ! interface Vlan1 - ip address 10.133.26.231 255.255.255.0 + ip address 10.133.26.231 255.255.248.0 ip pim dense-mode ! ip http server diff --git a/master/opt/tftp/swg2.txt b/master/opt/tftp/swg2.txt index 7dc952d..39bed30 100644 --- a/master/opt/tftp/swg2.txt +++ b/master/opt/tftp/swg2.txt @@ -22,7 +22,7 @@ enable secret 5 $1$OMTZ$xM5SrEPag4m7MGrV1u86/0 ! ! macro name VERSION -macro description 2.3 +macro description 2.4 @ ! no aaa new-model @@ -317,7 +317,7 @@ interface TenGigabitEthernet1/51 interface TenGigabitEthernet1/52 ! interface Vlan1 - ip address 10.133.26.232 255.255.255.0 + ip address 10.133.26.232 255.255.248.0 ip pim dense-mode ! ip http server diff --git a/master/opt/tftp/swm.txt b/master/opt/tftp/swm.txt index c635690..f3eca33 100644 --- a/master/opt/tftp/swm.txt +++ b/master/opt/tftp/swm.txt @@ -22,7 +22,7 @@ enable secret 5 $1$OMTZ$xM5SrEPag4m7MGrV1u86/0 ! ! macro name VERSION -macro description 2.3 +macro description 2.4 @ ! no aaa new-model @@ -324,7 +324,7 @@ interface TenGigabitEthernet1/51 interface TenGigabitEthernet1/52 ! interface Vlan1 - ip address 10.133.28.231 255.255.255.0 + ip address 10.133.28.231 255.255.254.0 ip pim sparse-mode ! interface Vlan10 -- 2.30.2