mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-03-28 02:42:16 +00:00
scripts: fix remaining instances of && ||
Looks like I may have missed this in ce84f1762c
originally
This commit is contained in:
parent
2248af00f3
commit
10e236abdf
@ -99,7 +99,8 @@ post_ota() {
|
|||||||
rm -f $1
|
rm -f $1
|
||||||
chmod 755 bootctl
|
chmod 755 bootctl
|
||||||
./bootctl hal-info || return
|
./bootctl hal-info || return
|
||||||
[ $(./bootctl get-current-slot) -eq 0 ] && SLOT_NUM=1 || SLOT_NUM=0
|
SLOT_NUM=0
|
||||||
|
[ $(./bootctl get-current-slot) -eq 0 ] && SLOT_NUM=1
|
||||||
./bootctl set-active-boot-slot $SLOT_NUM
|
./bootctl set-active-boot-slot $SLOT_NUM
|
||||||
cat << EOF > post-fs-data.d/post_ota.sh
|
cat << EOF > post-fs-data.d/post_ota.sh
|
||||||
/data/adb/bootctl mark-boot-successful
|
/data/adb/bootctl mark-boot-successful
|
||||||
@ -142,7 +143,8 @@ adb_pm_install() {
|
|||||||
|
|
||||||
check_boot_ramdisk() {
|
check_boot_ramdisk() {
|
||||||
# Create boolean ISAB
|
# Create boolean ISAB
|
||||||
[ -z $SLOT ] && ISAB=false || ISAB=true
|
ISAB=true
|
||||||
|
[ -z $SLOT ] && ISAB=false
|
||||||
|
|
||||||
# If we are A/B, then we must have ramdisk
|
# If we are A/B, then we must have ramdisk
|
||||||
$ISAB && return 0
|
$ISAB && return 0
|
||||||
@ -170,7 +172,8 @@ check_encryption() {
|
|||||||
CRYPTOTYPE="file"
|
CRYPTOTYPE="file"
|
||||||
else
|
else
|
||||||
# We are either FDE or metadata encryption (which is also FBE)
|
# We are either FDE or metadata encryption (which is also FBE)
|
||||||
grep -q ' /metadata ' /proc/mounts && CRYPTOTYPE="file" || CRYPTOTYPE="block"
|
CRYPTOTYPE="block"
|
||||||
|
grep -q ' /metadata ' /proc/mounts && CRYPTOTYPE="file"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -186,12 +189,14 @@ check_encryption() {
|
|||||||
mount_partitions() {
|
mount_partitions() {
|
||||||
[ "$(getprop ro.build.ab_update)" = "true" ] && SLOT=$(getprop ro.boot.slot_suffix)
|
[ "$(getprop ro.build.ab_update)" = "true" ] && SLOT=$(getprop ro.boot.slot_suffix)
|
||||||
# Check whether non rootfs root dir exists
|
# Check whether non rootfs root dir exists
|
||||||
grep ' / ' /proc/mounts | grep -qv 'rootfs' && SYSTEM_ROOT=true || SYSTEM_ROOT=false
|
SYSTEM_ROOT=false
|
||||||
|
grep ' / ' /proc/mounts | grep -qv 'rootfs' && SYSTEM_ROOT=true
|
||||||
}
|
}
|
||||||
|
|
||||||
get_flags() {
|
get_flags() {
|
||||||
KEEPVERITY=$SYSTEM_ROOT
|
KEEPVERITY=$SYSTEM_ROOT
|
||||||
[ "$(getprop ro.crypto.state)" = "encrypted" ] && ISENCRYPTED=true || ISENCRYPTED=false
|
ISENCRYPTED=false
|
||||||
|
[ "$(getprop ro.crypto.state)" = "encrypted" ] && ISENCRYPTED=true
|
||||||
KEEPFORCEENCRYPT=$ISENCRYPTED
|
KEEPFORCEENCRYPT=$ISENCRYPTED
|
||||||
# Although this most certainly won't work without root, keep it just in case
|
# Although this most certainly won't work without root, keep it just in case
|
||||||
if [ -e /dev/block/by-name/vbmeta_a ] || [ -e /dev/block/by-name/vbmeta ]; then
|
if [ -e /dev/block/by-name/vbmeta_a ] || [ -e /dev/block/by-name/vbmeta ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user