aboutsummaryrefslogtreecommitdiffstats
path: root/pilc/templates/rc.local
blob: 05c69f06f40cb331cbf6908571db6a4717a86e02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
#
# 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.
#

set +e

export PATH=/bin:/usr/bin:/sbin:/usr/sbin
export LC_ALL=C LANGUAGE=C LANG=C

# Workaround firmware issue leaving i2c0 in an non-ALT0 state.
for i in 28 29; do
	echo $i > /sys/class/gpio/export
	echo in > /sys/class/gpio/gpio${i}/direction
done

# Add /dev/ttyS0 link for convenience.
if ! [ -e /dev/ttyS0 ]; then
	ln -s /dev/ttyAMA0 /dev/ttyS0
fi

exit 0
bues.ch cgit interface