virtual-dsm/src/entry.sh

33 lines
852 B
Bash
Raw Normal View History

2019-03-11 00:35:19 -07:00
#!/usr/bin/env bash
2023-05-03 19:52:06 +02:00
set -Eeuo pipefail
2023-03-27 19:23:50 +02:00
2023-11-29 18:07:41 +01:00
echo " Starting Virtual DSM for Docker v$(</run/version)..."
echo " For support visit https://github.com/vdsm/virtual-dsm/"
2023-05-11 17:23:40 +02:00
cd /run
2023-11-16 21:57:43 +01:00
. reset.sh # Initialize system
. install.sh # Run installation
. disk.sh # Initialize disks
. network.sh # Initialize network
. gpu.sh # Initialize graphics
2023-12-16 04:38:15 +01:00
. cpu.sh # Initialize processor
2023-11-16 21:57:43 +01:00
. serial.sh # Initialize serialport
. power.sh # Configure shutdown
. config.sh # Configure arguments
2023-04-21 10:38:06 +02:00
2023-05-03 18:12:11 +02:00
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})
2023-12-28 16:08:12 +01:00
{ set +x; } 2>/dev/null && terminal "$msg"
tail -fn +0 "$QEMU_LOG" 2>/dev/null &
2023-12-28 16:08:12 +01:00
cat "$QEMU_TERM" 2>/dev/null & wait $! || true
2023-12-28 16:08:12 +01:00
sleep 1 && finish 0