core: 阻止在 Live OS 下运行 reinstall.sh

This commit is contained in:
bin456789 2025-01-01 17:38:33 +08:00
parent a4eaa2186a
commit 3fcbc8fd75
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -3375,6 +3375,10 @@ remove_useless_initrd_files() {
}
# 脚本入口
if mount | grep -q 'tmpfs on / type tmpfs'; then
error_and_exit "Can't run this script in Live OS."
fi
if is_in_windows; then
# win系统盘
c=$(echo $SYSTEMDRIVE | cut -c1)