Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- set -e
- SETTING_DATA_PATH=".ztemtapp/ZTEEVDO"
- #e.g. /var/lib/dpkg/info
- # when execs "sudo dpkg -P xxxx", 1st execute this script with "remove" arg, then execute this script with "purge" arg
- if [ "$1" = "remove" ] ; then
- sudo sed '/ztemt/d' /etc/init.d/rc.local > tmpfile; sudo mv -f tmpfile /etc/init.d/rc.local; sudo chmod 0755 /etc/init.d/rc.local
- #kill ztemtvcdromd
- sudo killall -9 ztemtvcdromd
- if [ -d /usr/local/bin/ztemtApp/zteusbserial ] ; then
- sudo /bin/rm -Rd /usr/local/bin/ztemtApp/zteusbserial
- fi
- #purge: Remove USB Driver
- if [ -n "$(lsmod|grep ztemt)" ]; then
- sudo /sbin/rmmod ztemt ;
- fi
- sudo /sbin/ldconfig
- #Delete Setting.conf
- /bin/rm -f /root/$SETTING_DATA_PATH/Setting.conf
- /bin/rm -f /root/$SETTING_DATA_PATH/MultiUser.xml
- /bin/rm -f /root/$SETTING_DATA_PATH/EVDOApp.pid
- for ALLUSERPATH in `find /home -mount -maxdepth 1 -mindepth 1 -type d`;
- do
- if [ -d $ALLUSERPATH ] ; then
- /bin/rm -f $ALLUSERPATH/$SETTING_DATA_PATH/Setting.conf
- /bin/rm -f $ALLUSERPATH/$SETTING_DATA_PATH/MultiUser.xml
- /bin/rm -f $ALLUSERPATH/$SETTING_DATA_PATH/EVDOApp.pid
- fi
- done
- fi
- #if [ "$1" = "purge" ] ; then
- #fi
- # End automatically added section
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement