fix: Display fallback (#170)
This commit is contained in:
parent
1091fc9dca
commit
cb548a0cfb
2 changed files with 8 additions and 7 deletions
|
@ -6,20 +6,22 @@ set -Eeuo pipefail
|
|||
: "${VGA:="ramfb"}" # VGA adaptor
|
||||
: "${DISPLAY:="web"}" # Display type
|
||||
|
||||
[[ "$DISPLAY" == ":0" ]] && DISPLAY="web"
|
||||
|
||||
case "${DISPLAY,,}" in
|
||||
vnc)
|
||||
"vnc" )
|
||||
DISPLAY_OPTS="-display vnc=:0 -device $VGA"
|
||||
;;
|
||||
web)
|
||||
"web" )
|
||||
DISPLAY_OPTS="-display vnc=:0,websocket=5700 -device $VGA"
|
||||
;;
|
||||
ramfb)
|
||||
"ramfb" )
|
||||
DISPLAY_OPTS="-display vnc=:0,websocket=5700 -device ramfb"
|
||||
;;
|
||||
disabled)
|
||||
"disabled" )
|
||||
DISPLAY_OPTS="-display none -device $VGA"
|
||||
;;
|
||||
none)
|
||||
"none" )
|
||||
DISPLAY_OPTS="-display none"
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -177,6 +177,7 @@ configureUser() {
|
|||
configureNAT() {
|
||||
|
||||
local tuntap="TUN device is missing. $ADD_ERR --device /dev/net/tun"
|
||||
local tables="The 'ip_tables' kernel module is not loaded. Try this command: sudo modprobe ip_tables iptable_nat"
|
||||
|
||||
# Create the necessary file structure for /dev/net/tun
|
||||
if [ ! -c /dev/net/tun ]; then
|
||||
|
@ -198,8 +199,6 @@ configureNAT() {
|
|||
fi
|
||||
fi
|
||||
|
||||
local tables="The 'ip_tables' kernel module is not loaded. Try this command: sudo modprobe ip_tables iptable_nat"
|
||||
|
||||
# Create a bridge with a static IP for the VM guest
|
||||
|
||||
{ ip link add dev dockerbridge type bridge ; rc=$?; } || :
|
||||
|
|
Loading…
Reference in a new issue