I've put some scripts into /root/bin
First theres bin/initialize_gpio
Code: Select all
#! /usr/bin/python
import Adafruit_BBIO.GPIO as GPIO
import time
GPIO.setup("P8_10", GPIO.OUT)
GPIO.output("P8_10", GPIO.HIGH)
Code: Select all
ifconfig eth0 0.0.0.0 0.0.0.0 && dhclient
Code: Select all
echo "setting up the GPIO port"
/root/bin/initialize_gpio
echo "setting eth0 to use dhcp"
/root/bin/set_eth0_dhcp
echo "done - let's boogie"
But in any case I'm still not sure the best way to run the startup_script on boot, since it doesn't seem to be following normal Debian patterns.
How do you guys do something like this?