grep usb0:0 /etc/network/interfaces > /dev/null; if [ "$?" == "0" ]; then echo "usb0:0 already exists, skipping file write"; else echo "amending network information"; echo -e "\n\nauto usb0:0\niface usb0:0 inet dhcp\n" >> /etc/network/interfaces; echo "disabling USB network interface #2"; ifdown usb0:0 > /dev/null 2>&1 ; fi; echo "Attempting to bring up network interface usb0:0"; ifup usb0:0; ifconfig usb0:0; ping labby.co.uk -c 4; if [ "$?" == "0" ]; then echo "Setting the time from internet time server"; a=20$(telnet time-a.nist.gov 13 | cut -b7-23 | tail -n 2 | head -n 1); date -s "${a:0:4}.${a:5:2}.${a:8:2}-${a:11}"; echo -n "Successfully connected"; else echo -n "Failed to connect"; fi; echo " to the internet";