mirror of
https://github.com/AlbrechtL/openwrt-docker.git
synced 2026-10-14 16:01:29 +00:00
Minor debug option improvement
This commit is contained in:
+2
-3
@@ -76,10 +76,9 @@ services:
|
||||
#OPENWRT_AFTER_BOOT_CMD: '[ -f /etc/first_boot_over ] || { touch /etc/first_boot_over; echo "Crazy first boot"; }' # Example to run a command only once
|
||||
|
||||
# Enable debugging mode.
|
||||
# Currently it show the final qemu command
|
||||
# This function will be removed in further versions
|
||||
# Showing the final qemu command
|
||||
# If unset -> disabled
|
||||
#DEBUG: "y"
|
||||
#DEBUG: "true"
|
||||
|
||||
ports:
|
||||
# Container web page (TTY console to OpenWrt, some convenience features) port
|
||||
|
||||
+1
-1
@@ -18,4 +18,4 @@ trap 'error "Status $? while: $BASH_COMMAND (line $LINENO/$BASH_LINENO)"' ERR
|
||||
: "${FORWARD_LUCI:=""}" # Make LuCI OpenWrt web interface accessible via host LAN
|
||||
: "${OPENWRT_AFTER_BOOT_CMD:=""}" # User command or script to run after OpenWrt is booted
|
||||
: "${IS_U_OS_APP:=""}" # By default this container is not a u-OS app
|
||||
: "${DEBUG:="n"}" # Disable debugging
|
||||
: "${DEBUG:=""}" # Disable debugging
|
||||
|
||||
+11
-2
@@ -265,7 +265,15 @@ PCI_ARGS="${PCI_1_ARGS}"
|
||||
info "Booting image using $VERS..."
|
||||
|
||||
# See qemu command if debug is enabled
|
||||
[[ "$DEBUG" == [Yy1]* ]] && set -x
|
||||
if [[ -z "${DEBUG}" ]]; then
|
||||
DEBUG_ARGS=""
|
||||
else
|
||||
set -x # Show final qemu command
|
||||
|
||||
# Not working as expected grub output will delete previous log messages
|
||||
#DEBUG_ARGS="-serial stdio" # Show OpenWrt kernel message in container log
|
||||
DEBUG_ARGS=""
|
||||
fi
|
||||
|
||||
#************************ FINAL BOOTING ************************
|
||||
exec qemu-system-"$CPU_ARCH" \
|
||||
@@ -284,4 +292,5 @@ exec qemu-system-"$CPU_ARCH" \
|
||||
-qmp unix:/run/qmp-sock,server=on,wait=off \
|
||||
-chardev socket,path=/run/qga.sock,server=on,wait=off,id=qga0 \
|
||||
-device virtio-serial \
|
||||
-device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0
|
||||
-device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 \
|
||||
$DEBUG_ARGS
|
||||
|
||||
Reference in New Issue
Block a user