mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 21:40:01 +08:00
33 lines
851 B
Bash
Executable File
33 lines
851 B
Bash
Executable File
#!/usr/bin/env bash
|
||
set -Eeuo pipefail
|
||
|
||
echo "❯ Starting Virtual DSM for Docker v$(</run/version)..."
|
||
echo "❯ For support visit https://github.com/vdsm/virtual-dsm"
|
||
|
||
cd /run
|
||
|
||
. reset.sh # Initialize system
|
||
. install.sh # Run installation
|
||
. disk.sh # Initialize disks
|
||
. display.sh # Initialize graphics
|
||
. network.sh # Initialize network
|
||
. proc.sh # Initialize processor
|
||
. serial.sh # Initialize serialport
|
||
. power.sh # Configure shutdown
|
||
. config.sh # Configure arguments
|
||
|
||
trap - ERR
|
||
|
||
if [[ "$CONSOLE" == [Yy]* ]]; then
|
||
exec qemu-system-x86_64 ${ARGS:+ $ARGS}
|
||
fi
|
||
|
||
[[ "$DEBUG" == [Yy1]* ]] && info "$VERS" && set -x
|
||
msg=$(qemu-system-x86_64 ${ARGS:+ $ARGS})
|
||
|
||
{ set +x; } 2>/dev/null && terminal "$msg"
|
||
tail -fn +0 "$QEMU_LOG" 2>/dev/null &
|
||
cat "$QEMU_TERM" 2>/dev/null & wait $! || true
|
||
|
||
sleep 1 && finish 0
|