#!/bin/ksh # This script is called by the PCNS client to shutdown all systems COUT='logger -s -p local0.notice' #COUT=echo $COUT "Executing PowerChute Network Shutdown script at `date +"%H%M"`" print "[iqprbu01]" ssh iqprbu01 '/sbin/shutdown -y -h now &' >/dev/null 2>&1 & $COUT "sent shutdown to iqprbu01 at `date +"%H%M"`" sleep 2 print "[iqprdes001]" ssh iqprdes001 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to irpdes001 at `date +"%H%M"`" sleep 2 print "[iqprdes002]" ssh iqprdes002 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqprdes002 at `date +"%H%M"`" sleep 2 print "[iqads02]" ssh iqads02 '/bin/PowerChute/omnitrak/ads_halt.sh &' >/dev/null 2>&1 & $COUT "sent shutdown to iqads01 at `date +"%H%M"`" sleep 2 print "[iqads01]" ssh iqads01 '/bin/PowerChute/omnitrak/ads_halt.sh &' >/dev/null 2>&1 & $COUT "sent shutdown to iqads02 at `date +"%H%M"`" sleep 2 print "[iqpramp001]" ssh iqpramp001 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpramp001 at `date +"%H%M"`" sleep 2 print "[iqpramp002]" ssh iqpramp002 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpramp002 at `date +"%H%M"`" sleep 2 print "[iqpramp003]" ssh iqpramp003 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpramp003 at `date +"%H%M"`" sleep 2 print "[iqpramp004]" ssh iqpramp004 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpramp004 at `date +"%H%M"`" sleep 2 print "[iqpramp005]" ssh iqpramp005 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpramp005 at `date +"%H%M"`" sleep 2 print "[iqpramp006]" ssh iqpramp006 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpramp006 at `date +"%H%M"`" sleep 2 print "[iqpramp007]" ssh iqpramp007 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpramp007 at `date +"%H%M"`" sleep 2 print "[iqpramp008]" ssh iqpramp008 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpramp008 at `date +"%H%M"`" sleep 2 print "[iqpramp009]" ssh iqpramp009 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpramp009 at `date +"%H%M"`" sleep 2 print "[iqpramp010]" ssh iqpramp010 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpramp010 at `date +"%H%M"`" sleep 2 print "[iqpramp011]" ssh iqpramp011 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpramp011 at `date +"%H%M"`" sleep 2 print "[iqpramp012]" ssh iqpramp012 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpramp012 at `date +"%H%M"`" sleep 2 print "[iqpramp013]" ssh iqpramp013 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpramp013 at `date +"%H%M"`" sleep 2 print "[iqpramp014]" ssh iqpramp014 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpramp014 at `date +"%H%M"`" sleep 2 print "[iqpramp015]" ssh iqpramp015 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpramp015 at `date +"%H%M"`" sleep 2 print "[iqpramp016]" ssh iqpramp016 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpramp016 at `date +"%H%M"`" sleep 2 print "[iqpramp017]" ssh iqpramp017 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpramp017 at `date +"%H%M"`" sleep 2 print "[iqpramp018]" ssh iqpramp018 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpramp018 at `date +"%H%M"`" sleep 2 print "[iqpramp019]" ssh iqpramp019 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpramp019 at `date +"%H%M"`" sleep 2 print "[iqpramp020]" ssh iqpramp020 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpramp020 at `date +"%H%M"`" sleep 2 print "[iqpramp021]" ssh iqpramp021 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpramp021 at `date +"%H%M"`" sleep 2 print "[iqpramp022]" ssh iqpramp022 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpramp022 at `date +"%H%M"`" sleep 2 print "[iqprdps001]" ssh iqprdps001 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqprdps001 at `date +"%H%M"`" sleep 2 print "[iqprdps002]" ssh iqprdps002 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqpdps002 at `date +"%H%M"`" sleep 2 print "[iqprem001] " ssh iqprem001 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqprem001 at `date +"%H%M"`" sleep 2 print "[iqprem002] " ssh iqprem002 '/sbin/shutdown -h now' >/dev/null 2>&1 & $COUT "sent shutdown to iqprem002 at `date +"%H%M"`" sleep 2 $COUT "PCNS Script Execution finished at `date +"%H%M"`"