| #!/bin/bash |
| |
| # Copyright 2018-present Open Networking Foundation |
| # |
| # This program is free software: you can redistribute it and/or modify |
| # it under the terms of the GNU General Public License as published by |
| # the Free Software Foundation, either version 3 of the License, or |
| # (at your option) any later version. |
| # |
| # This program is distributed in the hope that it will be useful, |
| # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| # GNU General Public License for more details. |
| # |
| # You should have received a copy of the GNU General Public License |
| # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| |
| # kill CLI applications |
| echo "kill running time application" |
| [ -n "`pidof bcm_user_appl`" ] && killall bcm_user_appl |
| [ -n "`pidof bcm.user`" ] && killall bcm.user |
| [ -n "`pidof voltha_bal_driver`" ] && killall voltha_bal_driver |
| # service bal_core_dist stop |
| # service openolt stop |
| [ -n "`pidof bal_core_dist`" ] && killall bal_core_dist |
| rm -f /var/run/bal_core_dist.pid |
| [ -n "`pidof openolt`" ] && killall openolt |
| rm -f /var/run/openolt.pid |
| |
| # unload drivers |
| echo "unload kernel drivers" |
| [ -n "`lsmod | grep bcm_coop_dba_linux`" ] && rmmod bcm_coop_dba_linux && sleep 1 |
| [ -n "`lsmod | grep bcm_dev_ctrl_linux`" ] && rmmod bcm_dev_ctrl_linux && sleep 1 |
| [ -n "`lsmod | grep i2c_devs`" ] && rmmod i2c_devs && sleep 1 |
| [ -n "`lsmod | grep trmux`" ] && rmmod trmux && sleep 1 |
| [ -n "`lsmod | grep fld`" ] && rmmod fld && sleep 1 |
| [ -n "`lsmod | grep os_linux`" ] && rmmod os_linux && sleep 1 |
| [ -n "`lsmod | grep ll_pcie`" ] && rmmod ll_pcie && sleep 1 |
| [ -n "`lsmod | grep linux_user_bde`" ] && rmmod linux-user-bde && sleep 1 |
| [ -n "`lsmod | grep linux_kernel_bde`" ] && rmmod linux-kernel-bde && sleep 1 |
| rm -rf /dev/maple_i2c |
| rm -rf /dev/bcm_log |
| rm -rf /dev/maple_dev_ctrl |
| rm -rf /dev/linux-user-bde |
| rm -rf /dev/linux-kernel-bde |
| rm -rf /dev/coop_dba |
| |
| rm -rf /opt/bcm68620 |
| rm -rf /run/bcm68620 |
| |
| rm -rf /broadcom |
| |
| rm -rf /usr/local/lib/libgrpc++.so.1 |
| rm -rf /usr/local/lib/libgrpc.so.5 |
| rm -rf /usr/local/lib/libbal_api_dist.so |
| |