Raspberry Pi hanging on SSH after Piglow digital clock updated to init.d startup


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.

Final words

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.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.