Skip to content

Instantly share code, notes, and snippets.

@davidgyoung
Created July 5, 2013 20:51
Show Gist options
  • Save davidgyoung/5937170 to your computer and use it in GitHub Desktop.
Save davidgyoung/5937170 to your computer and use it in GitHub Desktop.
echo 'running test script in /home/pi/test. may reboot' | wall
echo "starting run" >> /home/pi/test.log
for i in {1..10}; do
date >> /home/pi/test.log
/home/pi/usb_modeswitch_v_1_1_3 -I -W -D -s 20 -u -1 -v 12d1 -p 1446 -V 12d1 -P 1436 -c /home/pi/sakis3g-HEAD-4ee19e0/dependencies/usb-modeswitch-data/usb_modeswitch.d/12d1:1446
ls /dev/ttyU* >> /home/pi/test.log
ls /dev/ttyU* && ( echo "worked" >> /home/pi/test.log; sync; reboot; exit )
done
echo "failed" >> /home/pi/test.log
sync
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment