blob: e9c752c3cc8892db808ce3fe2bb96c2590ee0810 [file] [log] [blame]
Shad Ansari6cd46a62018-05-13 23:20:51 +00001#!/bin/bash
2
Zack Williams477ba092018-10-17 10:50:06 -07003# Copyright 2018-present Open Networking Foundation
4#
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation, either version 3 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program. If not, see <http://www.gnu.org/licenses/>.
17
Shad Ansaricb004c52018-05-30 18:07:23 +000018rm -rf /opt/bcm68620
19rm -rf /broadcom
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000020tar zxf /tmp/release_asgvolt64_V3.1.1.201908010203.tar.gz -C / 2>&1 > /dev/null
Shad Ansaricb004c52018-05-30 18:07:23 +000021grep -q '\/opt\/bcm68620\/svk_init.sh' /etc/rc.local || sed -i -e '$i \/opt\/bcm68620\/svk_init.sh' /etc/rc.local
22rm -f /run/bcm68620
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000023cp /tmp/init.d/dev_mgmt_daemon /etc/init.d
Shad Ansarid0eaf752018-08-16 00:26:12 +000024cp /tmp/init.d/openolt /etc/init.d
Nicolas Palpacuer967438f2018-09-07 14:41:54 -040025cp /tmp/logrotate.d/openolt /etc/logrotate.d
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000026chmod +x /etc/init.d/dev_mgmt_daemon
Shad Ansarid0eaf752018-08-16 00:26:12 +000027chmod +x /etc/init.d/openolt
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000028update-rc.d dev_mgmt_daemon defaults
Shad Ansarid0eaf752018-08-16 00:26:12 +000029update-rc.d openolt defaults
Shad Ansari9fb007d2018-05-14 18:31:38 +000030mv /tmp/openolt /broadcom
Shad Ansari9fb007d2018-05-14 18:31:38 +000031mv /tmp/libgrpc++.so.1 /usr/local/lib
32mv /tmp/libgrpc.so.6 /usr/local/lib
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000033mv /tmp/libstdc++.so.6 /usr/local/lib
34mv /tmp/libbal_host_api.so /usr/local/lib
Shad Ansaricb004c52018-05-30 18:07:23 +000035/opt/bcm68620/svk_init.sh
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000036[ "A`cat ~/.bashrc| grep LD_LIBRARY_PATH`" = "A" ] && echo "export LD_LIBRARY_PATH=/broadcom:\$LD_LIBRARY_PATH" >> ~/.bashrc; . ~/.bashrc
37ldconfig /broadcom