Fix copy sepolicy rules when install module

This commit is contained in:
vvb2060 2021-04-27 23:28:31 +08:00 committed by John Wu
parent fe4981da21
commit 93ba4cca68

View File

@ -608,6 +608,7 @@ copy_sepolicy_rules() {
local active_dir=$(magisk --path)/.magisk/mirror/sepolicy.rules local active_dir=$(magisk --path)/.magisk/mirror/sepolicy.rules
if [ -L $active_dir ]; then if [ -L $active_dir ]; then
RULESDIR=$(readlink $active_dir) RULESDIR=$(readlink $active_dir)
[ "${RULESDIR:0:1}" != "/" ] && RULESDIR="$(magisk --path)/.magisk/mirror/$RULESDIR"
elif [ -d /data/unencrypted ] && ! grep ' /data ' /proc/mounts | grep -qE 'dm-|f2fs'; then elif [ -d /data/unencrypted ] && ! grep ' /data ' /proc/mounts | grep -qE 'dm-|f2fs'; then
RULESDIR=/data/unencrypted/magisk RULESDIR=/data/unencrypted/magisk
elif grep -q ' /cache ' /proc/mounts; then elif grep -q ' /cache ' /proc/mounts; then