Commit 2742edd7 authored by Chris Renshaw's avatar Chris Renshaw Committed by John Wu

scripts: only show addon.d error once on failures

parent 834561a5
...@@ -12,7 +12,7 @@ trampoline() { ...@@ -12,7 +12,7 @@ trampoline() {
if [ -f $MAGISKBIN/addon.d.sh ]; then if [ -f $MAGISKBIN/addon.d.sh ]; then
exec sh $MAGISKBIN/addon.d.sh "$@" exec sh $MAGISKBIN/addon.d.sh "$@"
exit $? exit $?
else elif [ "$1" = post-restore ]; then
ps | grep zygote | grep -v grep >/dev/null && BOOTMODE=true || BOOTMODE=false ps | grep zygote | grep -v grep >/dev/null && BOOTMODE=true || BOOTMODE=false
$BOOTMODE || ps -A 2>/dev/null | grep zygote | grep -v grep >/dev/null && BOOTMODE=true $BOOTMODE || ps -A 2>/dev/null | grep zygote | grep -v grep >/dev/null && BOOTMODE=true
...@@ -31,8 +31,8 @@ trampoline() { ...@@ -31,8 +31,8 @@ trampoline() {
ui_print "***********************" ui_print "***********************"
ui_print "! Cannot find Magisk binaries - was data wiped or not decrypted?" ui_print "! Cannot find Magisk binaries - was data wiped or not decrypted?"
ui_print "! Reflash OTA from decrypted recovery or reflash Magisk" ui_print "! Reflash OTA from decrypted recovery or reflash Magisk"
exit 1
fi fi
exit 1
} }
# Always use the script in /data # Always use the script in /data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment