forked from bigjosh/bbbphyfix
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·32 lines (29 loc) · 701 Bytes
/
install
File metadata and controls
executable file
·32 lines (29 loc) · 701 Bytes
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
30
31
32
#!/bin/bash
#first install the bbbrtc command that we will need
DIR=$(mktemp -d -t bbbrtc.XXXXXX) || exit 1
echo "tmpdir = $DIR"
pushd "$DIR"
git clone https://github.com/bigjosh/bbbrtc
cd bbbrtc
make
popd
rm -r $DIR
#next install the bbbphyreg command that we will need
DIR=$(mktemp -d -t bbbrtc.XXXXXX) || exit 1
echo "tmpdir = $DIR"
pushd "$DIR"
git clone https://github.com/bigjosh/phyreg
cd phyreg
make clean
make
make install
popd
rm -r $DIR
#remove an existing init.rc if present
update-rc.d -f chkphy remove
#install our script to run every boot
cp bbb-check-phy /usr/sbin/
chmod +x /usr/sbin/bbb-check-phy
cp chkphy /etc/init.d
chmod +x /etc/init.d/chkphy
sudo update-rc.d chkphy defaults