From 45d0b85887809beaea1abc6b997d869097768743 Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Fri, 4 Aug 2017 17:46:11 +1000 Subject: [PATCH] made it only spawn a tty and keyboard driver when the machine has the hardware --- modules/setup.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/setup.lua b/modules/setup.lua index 2657902..3373449 100644 --- a/modules/setup.lua +++ b/modules/setup.lua @@ -1,7 +1,9 @@ -tty(component.list("gpu")(),component.list("screen")()) -log(pcall(function() -local ka = component.list("keyboard")() -kbd(ka) -end)) +if component.list("gpu")() and component.list("screen")() and component.list("keyboard")() then + tty(component.list("gpu")(),component.list("screen")()) + log(pcall(function() + local ka = component.list("keyboard")() + kbd(ka) + end)) +end luash() computer.beep()