mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-31 19:08:07 +08:00
windows: 修复 if 判断逻辑,导致添加了错误驱动
This commit is contained in:
parent
75e4b5027a
commit
f24906c060
11
trans.sh
11
trans.sh
@ -322,9 +322,9 @@ if [ "$distro" = "windows" ]; then
|
|||||||
mkdir -p $drv
|
mkdir -p $drv
|
||||||
if virt-what | grep aws &&
|
if virt-what | grep aws &&
|
||||||
virt-what | grep kvm &&
|
virt-what | grep kvm &&
|
||||||
arch_wim=x86_64; then
|
[ "$arch_wim" = x86_64 ]; then
|
||||||
# aws nitro
|
# aws nitro
|
||||||
# 只有 64 位驱动
|
# 只有 x64 位驱动
|
||||||
# https://docs.aws.amazon.com/zh_cn/AWSEC2/latest/WindowsGuide/migrating-latest-types.html
|
# https://docs.aws.amazon.com/zh_cn/AWSEC2/latest/WindowsGuide/migrating-latest-types.html
|
||||||
apk add unzip
|
apk add unzip
|
||||||
download https://s3.amazonaws.com/ec2-windows-drivers-downloads/NVMe/Latest/AWSNVMe.zip $drv/AWSNVMe.zip
|
download https://s3.amazonaws.com/ec2-windows-drivers-downloads/NVMe/Latest/AWSNVMe.zip $drv/AWSNVMe.zip
|
||||||
@ -334,7 +334,7 @@ if [ "$distro" = "windows" ]; then
|
|||||||
|
|
||||||
elif virt-what | grep aws &&
|
elif virt-what | grep aws &&
|
||||||
virt-what | grep xen &&
|
virt-what | grep xen &&
|
||||||
arch_wim=x86_64; then
|
[ "$arch_wim" = x86_64 ]; then
|
||||||
# aws xen
|
# aws xen
|
||||||
# 只有 64 位驱动
|
# 只有 64 位驱动
|
||||||
# 未测试
|
# 未测试
|
||||||
@ -346,8 +346,10 @@ if [ "$distro" = "windows" ]; then
|
|||||||
mkdir -p $drv/aws/
|
mkdir -p $drv/aws/
|
||||||
cp -rf $drv/.Drivers/* $drv/aws/
|
cp -rf $drv/.Drivers/* $drv/aws/
|
||||||
|
|
||||||
elif virt-what | grep xen; then
|
elif virt-what | grep xen &&
|
||||||
|
[ "$arch_wim" != arm64 ]; then
|
||||||
# xen
|
# xen
|
||||||
|
# 有 x86 x64,没arm64驱动
|
||||||
# 未测试
|
# 未测试
|
||||||
# https://xenbits.xenproject.org/pvdrivers/win/
|
# https://xenbits.xenproject.org/pvdrivers/win/
|
||||||
ver='9.0.0'
|
ver='9.0.0'
|
||||||
@ -360,6 +362,7 @@ if [ "$distro" = "windows" ]; then
|
|||||||
|
|
||||||
elif virt-what | grep kvm; then
|
elif virt-what | grep kvm; then
|
||||||
# virtio
|
# virtio
|
||||||
|
# x86 x64 arm64 都有
|
||||||
# https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/
|
# https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/
|
||||||
case $(echo "$image_name" | tr '[:upper:]' '[:lower:]') in
|
case $(echo "$image_name" | tr '[:upper:]' '[:lower:]') in
|
||||||
'windows server 2022'*) sys=2k22 ;;
|
'windows server 2022'*) sys=2k22 ;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user