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

This commit is contained in:
bin456789 committed 2025-01-01 17:38:33 +08:00
1 parent a4eaa2186a
commit 3fcbc8fd75
1 file changed
+4
+4
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)