mirror of
https://github.com/dockur/windows.git
synced 2025-04-21 16:12:52 +00:00
Update install.sh
This commit is contained in:
parent
beec871e66
commit
de395da486
@ -128,6 +128,8 @@ finishInstall() {
|
||||
|
||||
rm -f "$STORAGE/windows.old"
|
||||
rm -f "$STORAGE/windows.vga"
|
||||
rm -f "$STORAGE/windows.net"
|
||||
rm -f "$STORAGE/windows.usb"
|
||||
rm -f "$STORAGE/windows.args"
|
||||
rm -f "$STORAGE/windows.base"
|
||||
rm -f "$STORAGE/windows.boot"
|
||||
@ -170,10 +172,18 @@ finishInstall() {
|
||||
echo "$ARGS" > "$STORAGE/windows.args"
|
||||
fi
|
||||
|
||||
if [ -n "${USB:-}" ] && [[ "${USB:-}" != "qemu-xhci"* ]]; then
|
||||
echo "$USB" > "$STORAGE/windows.usb"
|
||||
fi
|
||||
|
||||
if [ -n "${DISK_TYPE:-}" ] && [[ "${DISK_TYPE:-}" != "scsi" ]]; then
|
||||
echo "$DISK_TYPE" > "$STORAGE/windows.type"
|
||||
fi
|
||||
|
||||
if [ -n "${ADAPTER:-}" ] && [[ "${ADAPTER:-}" != "virtio-net-pci" ]]; then
|
||||
echo "$ADAPTER" > "$STORAGE/windows.net"
|
||||
fi
|
||||
|
||||
rm -rf "$TMP"
|
||||
return 0
|
||||
}
|
||||
@ -1054,6 +1064,20 @@ bootWindows() {
|
||||
ARGUMENTS="$ARGS ${ARGUMENTS:-}"
|
||||
fi
|
||||
|
||||
if [ -s "$STORAGE/windows.usb" ] && [ -f "$STORAGE/windows.usb" ]; then
|
||||
if [ -z "${USB:-}" ]; then
|
||||
USB=$(<"$STORAGE/windows.usb")
|
||||
USB="${USB//[![:print:]]/}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -s "$STORAGE/windows.net" ] && [ -f "$STORAGE/windows.net" ]; then
|
||||
if [ -z "${ADAPTER:-}" ]; then
|
||||
ADAPTER=$(<"$STORAGE/windows.net")
|
||||
ADAPTER="${ADAPTER//[![:print:]]/}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -s "$STORAGE/windows.type" ] && [ -f "$STORAGE/windows.type" ]; then
|
||||
if [ -z "${DISK_TYPE:-}" ]; then
|
||||
DISK_TYPE=$(<"$STORAGE/windows.type")
|
||||
|
Loading…
Reference in New Issue
Block a user