backuptool: Execute check_blacklist from the current directory
* For some odd reasons executing `cd /system/addon.d` makes the system
hang and unmount error:
umount: /system_root: Device or resource busy
* Don't change directory to not allow the system partition hang
Change-Id: I3d30bdc59c2f05d16823e99046c1dce2e1e6eb73
diff --git a/prebuilt/common/bin/backuptool.sh b/prebuilt/common/bin/backuptool.sh
index 1d9dd4e..861a664 100755
--- a/prebuilt/common/bin/backuptool.sh
+++ b/prebuilt/common/bin/backuptool.sh
@@ -52,8 +52,7 @@
check_blacklist() {
if [ -f $S/addon.d/blacklist ];then
## Discard any known bad backup scripts
- cd $1/addon.d/
- for f in *sh; do
+ for f in /$1/addon.d/*sh; do
s=$(md5sum $f | awk {'print $1'})
grep -q $s $S/addon.d/blacklist && rm -f $f
done