#/bin/bash if [ -d /sys/class/net/gprs0 ] && /sbin/ifconfig gprs0 | grep UP; then ssh irc; else dbus-send --type=method_call --system --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:"Vodafone GPRS" uint32:0; for i in $(seq 0 10); do if /sbin/ifconfig gprs0 | grep UP; then i=10; else sleep 1; fi; done; ssh irc; fi;