bug fix
This commit is contained in:
@@ -11,6 +11,7 @@ path="/data/media/0/Android"
|
||||
path2="/data/data"
|
||||
[[ ! -d $TMPDIR ]] && mkdir "$TMPDIR"
|
||||
[[ ! -d $path2 ]] && echoRgb "設備不存在user目錄" "0" && exit 1
|
||||
[[ $(restorecon --help 2>/dev/null) = "" ]] && echoRgb "restorecon命令不存在" "0" && exit 1
|
||||
#記錄開始時間
|
||||
starttime1="$(date -u "+%s")"
|
||||
{
|
||||
@@ -111,7 +112,7 @@ if [[ $Recovery_mode = true ]]; then
|
||||
Path_details="$(stat -c "%A/%a %U/%G" "$X")"
|
||||
chown -hR "$G:$G" "$X"
|
||||
echo_log "設置用戶組:$(echo "$Path_details" | awk '{print $2}')"
|
||||
restorecon -R "$X" >/dev/null 2>&1
|
||||
restorecon -RF "$X/" >/dev/null 2>&1
|
||||
echo_log "selinux上下文設置"
|
||||
else
|
||||
echoRgb "uid獲取失敗" "0"
|
||||
@@ -120,9 +121,9 @@ if [[ $Recovery_mode = true ]]; then
|
||||
echoRgb "路徑$X不存在" "0"
|
||||
fi
|
||||
elif [[ $FILE_NAME2 = data ]]; then
|
||||
[[ -d $path/data/$name2 ]] && chown -R "1023:1078" "$path/data/$name2"
|
||||
[[ -d $path/data/$name2 ]] && chown -R "1023:1023" "$path/data/$name2"
|
||||
elif [[ $FILE_NAME2 = thanox ]]; then
|
||||
restorecon -R "$(find "/data/system" -name "thanos*" -maxdepth 1 -type d)" >/dev/null 2>&1
|
||||
restorecon -R "$(find "/data/system" -name "thanos*" -maxdepth 1 -type d)/" >/dev/null 2>&1
|
||||
echo_log "selinux上下文設置" && echoRgb "警告 thanox配置恢復後務必重啟\n -否則不生效" "0"
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user