mirror of
https://github.com/dockur/windows.git
synced 2025-10-28 03:45:48 +00:00
add static network interface configuration when network is bridge
This commit is contained in:
parent
3bd9ccb2b1
commit
7323ae399b
3 changed files with 95 additions and 30 deletions
47
src/entry.sh
Normal file → Executable file
47
src/entry.sh
Normal file → Executable file
|
|
@ -8,32 +8,45 @@ SUPPORT="https://github.com/dockur/windows"
|
|||
|
||||
cd /run
|
||||
|
||||
. reset.sh # Initialize system
|
||||
. define.sh # Define versions
|
||||
. mido.sh # Download code
|
||||
. install.sh # Run installation
|
||||
. disk.sh # Initialize disks
|
||||
. display.sh # Initialize graphics
|
||||
. network.sh # Initialize network
|
||||
. samba.sh # Configure samba
|
||||
. boot.sh # Configure boot
|
||||
. proc.sh # Initialize processor
|
||||
. power.sh # Configure shutdown
|
||||
. config.sh # Configure arguments
|
||||
. reset.sh # Initialize system
|
||||
. define.sh # Define versions
|
||||
. mido.sh # Download code
|
||||
. install.sh # Run installation
|
||||
. disk.sh # Initialize disks
|
||||
. display.sh # Initialize graphics
|
||||
. network.sh # Initialize network
|
||||
. samba.sh # Configure samba
|
||||
. boot.sh # Configure boot
|
||||
. proc.sh # Initialize processor
|
||||
. power.sh # Configure shutdown
|
||||
. config.sh # Configure arguments
|
||||
|
||||
trap - ERR
|
||||
|
||||
version=$(qemu-system-x86_64 --version | head -n 1 | cut -d '(' -f 1 | awk '{ print $NF }')
|
||||
info "Booting ${APP}${BOOT_DESC} using QEMU v$version..."
|
||||
|
||||
{ qemu-system-x86_64 ${ARGS:+ $ARGS} >"$QEMU_OUT" 2>"$QEMU_LOG"; rc=$?; } || :
|
||||
(( rc != 0 )) && error "$(<"$QEMU_LOG")" && exit 15
|
||||
{
|
||||
qemu-system-x86_64 ${ARGS:+ $ARGS} >"$QEMU_OUT" 2>"$QEMU_LOG"
|
||||
rc=$?
|
||||
} || :
|
||||
((rc != 0)) && error "$(<"$QEMU_LOG")" && exit 15
|
||||
|
||||
terminal
|
||||
( sleep 30; boot ) &
|
||||
(
|
||||
sleep 30
|
||||
boot
|
||||
configure_guest_network_interface
|
||||
info "Windows started succesfully, you can now connect using RDP"
|
||||
if [[ "${NETWORK,,}" != "bridge"* ]]; then
|
||||
info "or visit http://localhost:8006/ to view the screen..."
|
||||
fi
|
||||
touch "$STORAGE/ready"
|
||||
) &
|
||||
tail -fn +0 "$QEMU_LOG" 2>/dev/null &
|
||||
cat "$QEMU_TERM" 2> /dev/null | tee "$QEMU_PTY" &
|
||||
cat "$QEMU_TERM" 2>/dev/null | tee "$QEMU_PTY" &
|
||||
wait $! || :
|
||||
|
||||
sleep 1 & wait $!
|
||||
sleep 1 &
|
||||
wait $!
|
||||
[ ! -f "$QEMU_END" ] && finish 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue