mirror of
https://github.com/dockur/windows.git
synced 2025-10-27 19:35:49 +00:00
feat: Daemonize QEMU
This commit is contained in:
parent
2278184fd8
commit
2b6d174868
1 changed files with 12 additions and 4 deletions
16
src/entry.sh
16
src/entry.sh
|
|
@ -2,23 +2,31 @@
|
||||||
set -Eeuo pipefail
|
set -Eeuo pipefail
|
||||||
|
|
||||||
APP="Windows"
|
APP="Windows"
|
||||||
export BOOT_MODE=windows
|
export BOOT_MODE="windows"
|
||||||
SUPPORT="https://github.com/dockur/windows"
|
SUPPORT="https://github.com/dockur/windows"
|
||||||
|
|
||||||
cd /run
|
cd /run
|
||||||
|
|
||||||
. reset.sh # Initialize system
|
. reset.sh # Initialize system
|
||||||
. install.sh # Get bootdisk
|
. install.sh # Run installation
|
||||||
. disk.sh # Initialize disks
|
. disk.sh # Initialize disks
|
||||||
. display.sh # Initialize graphics
|
. display.sh # Initialize graphics
|
||||||
. network.sh # Initialize network
|
. network.sh # Initialize network
|
||||||
. boot.sh # Configure boot
|
. boot.sh # Configure boot
|
||||||
. proc.sh # Initialize processor
|
. proc.sh # Initialize processor
|
||||||
|
. power.sh # Configure shutdown
|
||||||
. config.sh # Configure arguments
|
. config.sh # Configure arguments
|
||||||
|
|
||||||
trap - ERR
|
trap - ERR
|
||||||
|
|
||||||
info "Booting $APP using $VERS..."
|
info "Booting $APP using $VERS..."
|
||||||
|
[[ "$DEBUG" == [Yy1]* ]] && echo "Arguments: $ARGS" && echo
|
||||||
|
|
||||||
[[ "$DEBUG" == [Yy1]* ]] && set -x
|
{ qemu-system-x86_64 ${ARGS:+ $ARGS} >"$QEMU_OUT" 2>"$QEMU_LOG"; rc=$?; } || :
|
||||||
exec qemu-system-x86_64 ${ARGS:+ $ARGS}
|
(( rc != 0 )) && error "$(<"$QEMU_LOG")" && exit 15
|
||||||
|
|
||||||
|
terminal
|
||||||
|
tail -fn +0 "$QEMU_LOG" 2>/dev/null &
|
||||||
|
cat "$QEMU_TERM" 2>/dev/null & wait $! || :
|
||||||
|
|
||||||
|
sleep 1 && finish 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue