Enhancing booted mode command calls
This commit is contained in:
parent
809d6bf316
commit
4e5f811d75
|
|
@ -189,6 +189,23 @@ class sys_command():
|
||||||
break
|
break
|
||||||
yield output
|
yield output
|
||||||
|
|
||||||
|
print('[N] Waiting for output to settle (5 sec)')
|
||||||
|
last = time()
|
||||||
|
while time()-last < 5:
|
||||||
|
for fileno, event in poller.poll(0.1):
|
||||||
|
try:
|
||||||
|
output = os.read(child_fd, 8192).strip()
|
||||||
|
trace_log += output
|
||||||
|
except OSError:
|
||||||
|
last = time() - 60
|
||||||
|
break
|
||||||
|
|
||||||
|
if 'debug' in self.opts and self.opts['debug']:
|
||||||
|
if len(output):
|
||||||
|
print(output)
|
||||||
|
|
||||||
|
last = time()
|
||||||
|
|
||||||
if 'debug' in self.opts and self.opts['debug']:
|
if 'debug' in self.opts and self.opts['debug']:
|
||||||
print('[N] Exited subsystem, instructing it to shutdown.')
|
print('[N] Exited subsystem, instructing it to shutdown.')
|
||||||
# Since we're in a subsystem, we gotta bail out!
|
# Since we're in a subsystem, we gotta bail out!
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue