state=$(qdbus --system com.nokia.icd2.context /org/maemo/contextkit/Internet/NetworkState org.maemo.contextkit.Property.Get) if [ "$state" = "connected" ] blah-blah fi