rendered paste bodyNUMPRESS=0while : ; do sleep 1 #SES Button Press if [ $BUTTON = "SES" && $ACTION = Pressed" ]; then if [ $NUMPRESS == 0]; then #Log and Dial Cingular logger "Dialing Cingular SES Button" echo "f" > /proc/diag/led/ses_white /usr/sbin/pppd call cingular wait 10 ping -c 1 google.com #No Connection if [ $? == 1 ]; then echo "0" > /proc/diag/led/ses_white logger "No Connection Made" killall pppd exit 10 fi echo "1" > /proc/diag/ses_white NUMMPRESS++ fi if [ $NUMPRESS == 1] #Hangup on Cingular logger "Hanging up Cingular SES Button" killall pppd echo "0" > /proc/diag/ses_white NUMPRESS=0 fi fidone