Skip to content

Commit

Permalink
update is_mounted() in all places
Browse files Browse the repository at this point in the history
Nanolx committed Oct 18, 2020
1 parent 53d4b29 commit 1aaf79f
Showing 3 changed files with 4 additions and 16 deletions.
6 changes: 1 addition & 5 deletions patcher/CommonPatcher
Original file line number Diff line number Diff line change
@@ -35,11 +35,7 @@ ui_print() {
}

is_mounted () {
if [ -n "$2" ]; then
cat /proc/mounts | grep $1 | grep $2, >/dev/null
else
cat /proc/mounts | grep $1 >/dev/null
fi
grep -q " $(readlink -f ${1}) " /proc/mounts 2>/dev/null
return $?
}

6 changes: 1 addition & 5 deletions systest/SysTest
Original file line number Diff line number Diff line change
@@ -29,11 +29,7 @@ ui_print() {
}

is_mounted () {
if [ -n "$2" ]; then
cat /proc/mounts | grep $1 | grep $2, >/dev/null
else
cat /proc/mounts | grep $1 >/dev/null
fi
grep -q " $(readlink -f ${1}) " /proc/mounts 2>/dev/null
return $?
}

8 changes: 2 additions & 6 deletions uninstaller/META-INF/com/google/android/update-binary
Original file line number Diff line number Diff line change
@@ -26,12 +26,8 @@ grep_cmdline() {
sed -n "${REGEX}" 2>/dev/null
}

is_mounted() {
if [ -n "$2" ]; then
cat /proc/mounts | grep $1 | grep $2, >/dev/null
else
cat /proc/mounts | grep $1 >/dev/null
fi
is_mounted () {
grep -q " $(readlink -f ${1}) " /proc/mounts 2>/dev/null
return $?
}

0 comments on commit 1aaf79f

Please # to comment.