Project

General

Profile

Statistics
| Branch: | Revision:

root / scout_gumstix / etc / rc.local @ a0644b40

History | View | Annotate | Download (597 Bytes)

1 83163372 Tom Mullins
#!/bin/sh -e
2
#
3
# rc.local
4
#
5
# This script is executed at the end of each multiuser runlevel.
6
# Make sure that the script will "exit 0" on success or any other
7
# value on error.
8
#
9
# In order to enable or disable this script just change the execution
10
# bits.
11
#
12
# By default this script does nothing.
13
14 0276f557 Tom Mullins
dhclient -nw usb0
15
16 83163372 Tom Mullins
export_as_output() {
17
  last_dir="$PWD"
18
  cd /sys/class/gpio
19
  echo "$1" > export
20
  cd "gpio$1"
21
  echo out > direction
22
  chgrp gpio value
23 a0644b40 Tom Mullins
  chmod g+w value
24 83163372 Tom Mullins
  cd "$last_dir"
25
}
26
27
# export motor driver gpio pins
28
for i in 70 71 72 73 74 75 76 77; do
29
  export_as_output $i
30
done
31
32
exit 0