Raspberry Pi hanging on SSH after Piglow digital clock updated to init.d startupPosted: September 14, 2013
After updating the start-up script of my RPi, I discovered the pi would hang as it began the SSH server. A quick look online confirmed what I suspected, the clock script was hanging the machine. Not wanting to remove the script, I looked in to another means of working around the problem.
I am by no means an expert at python and I apologise in advance if I explain this incorrectly. All you Python gurus out there, please forgive me!
As I understand it, once the clock.py script is executed by init, the computer waits for the python script to finish. Somewhere along the line this is not happening. Perhaps because it is a clock script and clocks don’t have a habit of stopping unless you stop them. So to get the init.d script to finish you need to make the clock.py script run in the background.
To do this you need to edit the clock.py, adding an “&” to the end this line.
case “$1” in
sudo python /home/pi/piglow/clock.py&
You may also wish to remove the “sudo” command, the script is executed just fine without it.
The clock.py script is awesome, it makes use of the Piglow in a practical and fun way. I really can not wait to play around with this little board and python some more.