Revision 04270a10
Changed everything to use group scout because of Upstart bug
scout_gumstix/etc/rc.local | ||
---|---|---|
11 | 11 |
# |
12 | 12 |
# By default this script does nothing. |
13 | 13 |
|
14 |
set_perms() { |
|
15 |
chgrp scout "$1" |
|
16 |
chmod g+w "$1" |
|
17 |
} |
|
18 |
|
|
14 | 19 |
export_as_output() { |
15 | 20 |
last_dir="$PWD" |
16 | 21 |
cd /sys/class/gpio |
17 | 22 |
echo "$1" > export |
18 | 23 |
cd "gpio$1" |
19 | 24 |
echo out > direction |
20 |
chgrp gpio value |
|
21 |
chmod g+w value |
|
25 |
set_perms value |
|
22 | 26 |
cd "$last_dir" |
23 | 27 |
} |
24 | 28 |
|
... | ... | |
27 | 31 |
export_as_output $i |
28 | 32 |
done |
29 | 33 |
|
34 |
for i in /sys/class/encoder/enc*; do |
|
35 |
set_perms $i/ticks |
|
36 |
done |
|
37 |
|
|
30 | 38 |
exit 0 |
Also available in: Unified diff