# ========== sk25152 ========== # Verify which link is up with this command: tail -f /tmp/cpisp_state echo "--------------------------" >> /tmp/cpisp_state echo `/bin/date +%d-%b-%Y_%Hh-%Mm-%Ss` >> /tmp/cpisp_state echo "RESTARTING SCRIPT" >> /tmp/cpisp_state echo "LINK1" >> /tmp/cpisp_state echo $LINK1_STATE >> /tmp/cpisp_state echo "LINK2" >> /tmp/cpisp_state echo $LINK2_STATE >> /tmp/cpisp_state echo "LINK3" >> /tmp/cpisp_state echo $LINK3_STATE >> /tmp/cpisp_state echo "--------------------------" >> /tmp/cpisp_state echo " " >> /tmp/cpisp_state # If link 1 is up if ($LINK1_STATE == "up") then fw tab -t dynobj_cache -x -y dynamic_objects -o DYN_ISP_A -r 0.0.0.0 255.255.255.255 -a dynamic_objects -o DYN_ISP_B -r 0.0.0.0 255.255.255.255 -d dynamic_objects -o DYN_ISP_B -r 0.0.0.0 0.0.0.0 -a dynamic_objects -o DYN_ISP_C -r 0.0.0.0 255.255.255.255 -d dynamic_objects -o DYN_ISP_C -r 0.0.0.0 0.0.0.0 -a endif # If link 1 is down but 2 is up if (($LINK1_STATE == "down" || $LINK1_STATE == "disabled") && $LINK2_STATE == "up") then fw tab -t dynobj_cache -x -y dynamic_objects -o DYN_ISP_B -r 0.0.0.0 255.255.255.255 -a dynamic_objects -o DYN_ISP_A -r 0.0.0.0 255.255.255.255 -d dynamic_objects -o DYN_ISP_A -r 0.0.0.0 0.0.0.0 -a dynamic_objects -o DYN_ISP_C -r 0.0.0.0 255.255.255.255 -d dynamic_objects -o DYN_ISP_C -r 0.0.0.0 0.0.0.0 -a endif # If both link 1 and 2 are down if (($LINK1_STATE == "down" || $LINK1_STATE == "disabled") && ($LINK2_STATE == "down" || $LINK2_STATE == "disabled")) then fw tab -t dynobj_cache -x -y dynamic_objects -o DYN_ISP_C -r 0.0.0.0 255.255.255.255 -a dynamic_objects -o DYN_ISP_A -r 0.0.0.0 255.255.255.255 -d dynamic_objects -o DYN_ISP_A -r 0.0.0.0 0.0.0.0 -a dynamic_objects -o DYN_ISP_B -r 0.0.0.0 255.255.255.255 -d dynamic_objects -o DYN_ISP_B -r 0.0.0.0 0.0.0.0 -a endif # ========== sk25152 ==========