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)..."
|
2024-01-07 23:56:06 +01:00
|
|
|
|
echo "❯ For support visit https://github.com/vdsm/virtual-dsm"
|
2023-05-11 17:23:40 +02:00
|
|
|
|
|
2023-11-15 20:54:51 +01:00
|
|
|
|
cd /run
|
|
|
|
|
|
2023-11-16 21:57:43 +01:00
|
|
|
|
. reset.sh # Initialize system
|
|
|
|
|
. install.sh # Run installation
|
|
|
|
|
. disk.sh # Initialize disks
|
2023-12-29 16:56:49 +01:00
|
|
|
|
. display.sh # Initialize graphics
|
2023-11-16 21:57:43 +01:00
|
|
|
|
. network.sh # Initialize network
|
2023-12-29 18:27:51 +01:00
|
|
|
|
. proc.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
|
|
|
|
|
|
2023-12-09 21:19:08 +01:00
|
|
|
|
if [[ "$CONSOLE" == [Yy]* ]]; then
|
2023-12-28 17:58:07 +01:00
|
|
|
|
exec qemu-system-x86_64 ${ARGS:+ $ARGS}
|
2023-11-29 20:24:28 +01:00
|
|
|
|
fi
|
|
|
|
|
|
2023-12-28 03:42:06 +01:00
|
|
|
|
[[ "$DEBUG" == [Yy1]* ]] && info "$VERS" && set -x
|
2023-12-28 17:58:07 +01:00
|
|
|
|
msg=$(qemu-system-x86_64 ${ARGS:+ $ARGS})
|
2023-12-28 05:04:40 +01:00
|
|
|
|
|
2023-12-28 16:08:12 +01:00
|
|
|
|
{ set +x; } 2>/dev/null && terminal "$msg"
|
2023-12-28 17:58:07 +01:00
|
|
|
|
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 03:42:06 +01:00
|
|
|
|
|
2023-12-28 16:08:12 +01:00
|
|
|
|
sleep 1 && finish 0
|