I have been using the Pi in an operating systems class this quarter and at the beginning of the quarter we set up our Pi's to email the IP address on boot up so we could just putty into the Pi's without hassle. I bought a new 32 gig card and in trying to set up the email script like I did the first time, I get an error with rc.local (the file I added the command to run the email program). If I manually type the command to run the email program it works just fine.
I hope I'm asking the right question but I'm still new to the Pi world.
rc.local file contents:
#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. # Print the IP address _IP=$(hostname -I) || true if [ "$_IP" ]; then printf "My IP address is %s\n" "$_IP" fi (sleep 10; python /home/pi/emailnotification.py)& exit 0