core: 过滤 reinstall.sh 日志文件的密码

This commit is contained in:
bin456789 2024-10-18 23:34:54 +08:00
parent 05c15c0964
commit 9452044746
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -18,8 +18,8 @@ export LC_ALL=C
# 不要漏了最后的 $PATH否则会找不到 windows 系统程序例如 diskpart
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH
# 记录日志
exec > >(exec tee /reinstall.log) 2>&1
# 记录日志,过滤含有 password 的行
exec > >(tee >(grep -iv password >>/reinstall.log)) 2>&1
THIS_SCRIPT=$(readlink -f "$0")
trap 'trap_err $LINENO $?' ERR