From a952f74ec7b96fccb6c0163fee2ba15429e58051 Mon Sep 17 00:00:00 2001 From: ChrisStokes Date: Wed, 18 May 2016 22:38:09 -0400 Subject: [PATCH] Create 2startupScripts for Ubuntu rc.local script needs to be changed to executable; 3 lines added to it, 1 calling bbbstart in the /etc/ folder for root. bbbstart has to rename i2c-2 to i2c-1, and set the reset pin high for the motor bridge cape. --- scripts/2startupScripts for Ubuntu | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 scripts/2startupScripts for Ubuntu diff --git a/scripts/2startupScripts for Ubuntu b/scripts/2startupScripts for Ubuntu new file mode 100644 index 0000000..cbbd157 --- /dev/null +++ b/scripts/2startupScripts for Ubuntu @@ -0,0 +1,32 @@ +root/etc bbbstart script (chmod to executable) below: + +#!/bin/sh -x +cd /dev +mv i2c-2 i2c-1 +cd /sys/class/gpio +echo 49 > export +cd gpio49 +echo out > direction +echo 1 > value + +executable file rc.local: +root@ubuntubone2:/etc# cat rc.local + +#!/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. + +echo "" >> ~root/bbbstart.log +date >> ~root/bbbstart.log +/etc/bbbstart >> ~root/bbbstart.log 2>&1 + +exit 0