>>527
>if ping -c 1 www.yahoo.com >/dev/null 2>&1; then

関係ないが、この 2>&1
エラー対策でつか?