blob: 1237c876dd77b0f17fd3291b24b767264692d103 [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 Ansari6cd46a62018-05-13 23:20:51 +000018# kill CLI applications
19echo "kill running time application"
Shad Ansaricb004c52018-05-30 18:07:23 +000020[ -n "`pidof bcm_user_appl`" ] && killall bcm_user_appl
21[ -n "`pidof bcm.user`" ] && killall bcm.user
Shad Ansaricb004c52018-05-30 18:07:23 +000022[ -n "`pidof voltha_bal_driver`" ] && killall voltha_bal_driver
Shad Ansarid0eaf752018-08-16 00:26:12 +000023# service bal_core_dist stop
24# service openolt stop
Zack Williams477ba092018-10-17 10:50:06 -070025[ -n "`pidof bal_core_dist`" ] && killall bal_core_dist
Shad Ansarid0eaf752018-08-16 00:26:12 +000026rm -f /var/run/bal_core_dist.pid
Shad Ansari9fb007d2018-05-14 18:31:38 +000027[ -n "`pidof openolt`" ] && killall openolt
Shad Ansarid0eaf752018-08-16 00:26:12 +000028rm -f /var/run/openolt.pid
Shad Ansari6cd46a62018-05-13 23:20:51 +000029
30# unload drivers
31echo "unload kernel drivers"
32[ -n "`lsmod | grep bcm_coop_dba_linux`" ] && rmmod bcm_coop_dba_linux && sleep 1
33[ -n "`lsmod | grep bcm_dev_ctrl_linux`" ] && rmmod bcm_dev_ctrl_linux && sleep 1
34[ -n "`lsmod | grep i2c_devs`" ] && rmmod i2c_devs && sleep 1
Shad Ansaricb004c52018-05-30 18:07:23 +000035[ -n "`lsmod | grep trmux`" ] && rmmod trmux && sleep 1
36[ -n "`lsmod | grep fld`" ] && rmmod fld && sleep 1
Shad Ansari6cd46a62018-05-13 23:20:51 +000037[ -n "`lsmod | grep os_linux`" ] && rmmod os_linux && sleep 1
38[ -n "`lsmod | grep ll_pcie`" ] && rmmod ll_pcie && sleep 1
39[ -n "`lsmod | grep linux_user_bde`" ] && rmmod linux-user-bde && sleep 1
40[ -n "`lsmod | grep linux_kernel_bde`" ] && rmmod linux-kernel-bde && sleep 1
41rm -rf /dev/maple_i2c
42rm -rf /dev/bcm_log
43rm -rf /dev/maple_dev_ctrl
44rm -rf /dev/linux-user-bde
45rm -rf /dev/linux-kernel-bde
46rm -rf /dev/coop_dba
47
Shad Ansari9fb007d2018-05-14 18:31:38 +000048rm -rf /opt/bcm68620
49rm -rf /run/bcm68620
50
51rm -rf /broadcom
52
Shad Ansari9fb007d2018-05-14 18:31:38 +000053rm -rf /usr/local/lib/libgrpc++.so.1
54rm -rf /usr/local/lib/libgrpc.so.5
Shad Ansarif1e0bc82018-05-21 17:51:45 +000055rm -rf /usr/local/lib/libbal_api_dist.so
56