From fb39235d2a8173ec33f3b05287dfa258186c3f73 Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 16 Nov 2023 21:26:34 +0100 Subject: [PATCH] fix: Entrypoint --- src/entry.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/entry.sh b/src/entry.sh index 704492dd..ea46202b 100755 --- a/src/entry.sh +++ b/src/entry.sh @@ -12,28 +12,28 @@ set -Eeuo pipefail : ${RAM_SIZE:='512M'} # Maximum RAM amount echo "❯ Starting QEMU for Docker v${VERSION}..." +echo "❯ For support visit https://github.com/qemu-tools/qemu-docker/" info () { echo -e "\E[1;34m❯ \E[1;36m$1\E[0m" ; } error () { echo -e >&2 "\E[1;31m❯ ERROR: $1\E[0m" ; } trap 'error "Status $? while: ${BASH_COMMAND} (line $LINENO/$BASH_LINENO)"' ERR -[ ! -f "/run/run.sh" ] && error "Script must run inside Docker container!" && exit 11 +[ ! -f "/run/entry.sh" ] && error "Script must run inside Docker container!" && exit 11 [ "$(id -u)" -ne "0" ] && error "Script must be executed with root privileges." && exit 12 -STORAGE="/storage" KERNEL=$(uname -r | cut -b 1) MINOR=$(uname -r | cut -d '.' -f2) ARCH=$(dpkg --print-architecture) VERS=$(qemu-system-x86_64 --version | head -n 1 | cut -d '(' -f 1) +STORAGE="/storage" [ ! -d "$STORAGE" ] && error "Storage folder (${STORAGE}) not found!" && exit 13 -if [ ! -f "$STORAGE/boot.img" ]; then - . /run/install.sh -fi +cd /run -. /run/disk.sh # Initialize disks -. /run/network.sh # Initialize network +. install.sh # Get bootdisk +. disk.sh # Initialize disks +. network.sh # Initialize network KVM_ERR="" KVM_OPTS=""