mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-18 20:39:14 +08:00
core: 修复因 subshell 导致变量丢失,从而重复运行 virt-what
This commit is contained in:
parent
89800f18ed
commit
d8692e787c
6
trans.sh
6
trans.sh
@ -3809,6 +3809,12 @@ install_windows() {
|
||||
mkdir -p "$drv" # 驱动下载临时文件夹
|
||||
mkdir -p "/wim/drivers" # boot.wim 驱动文件夹
|
||||
|
||||
# 这里有坑
|
||||
# $(get_cloud_vendor) 调用了 cache_dmi_and_virt
|
||||
# 但是 $(get_cloud_vendor) 运行在 subshell 里面
|
||||
# subshell 运行结束后里面的变量就消失了
|
||||
# 因此先运行 cache_dmi_and_virt
|
||||
cache_dmi_and_virt
|
||||
vendor="$(get_cloud_vendor)"
|
||||
|
||||
# virtio
|
||||
|
Loading…
x
Reference in New Issue
Block a user