virtual-dsm/src/entry.sh

36 lines
883 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
2024-01-20 19:59:44 +01:00
APP="Virtual DSM"
SUPPORT="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
. 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
2024-01-23 19:29:07 +01:00
info "Booting $APP using $VERS..."
2024-01-23 19:32:15 +01:00
[[ "$DEBUG" == [Yy1]* ]] && echo "Arguments: $ARGS" && echo
2024-01-23 19:29:07 +01:00
if [[ "$CONSOLE" == [Yy]* ]]; then
exec qemu-system-x86_64 ${ARGS:+ $ARGS}
fi
2024-01-13 18:16:17 +01:00
{ qemu-system-x86_64 ${ARGS:+ $ARGS} >"$QEMU_OUT" 2>"$QEMU_LOG"; rc=$?; } || :
2024-01-14 00:37:36 +01:00
(( rc != 0 )) && error "$(<"$QEMU_LOG")" && exit 15
2024-01-13 18:16:17 +01:00
terminal
tail -fn +0 "$QEMU_LOG" 2>/dev/null &
2024-01-13 18:16:17 +01:00
cat "$QEMU_TERM" 2>/dev/null & wait $! || :
2023-12-28 16:08:12 +01:00
sleep 1 && finish 0