Some times systemd-boot splits output, so we gotta check trigger in the trace_log instead.

Slightly more taxing, but it yields better (accurate) results.
This commit is contained in:
Anton Hvornum 2019-06-20 15:25:29 +00:00 committed by GitHub
parent bcb4a2d618
commit 943ce56974
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -172,7 +172,7 @@ class sys_command():
lower = output.lower()
if 'triggers' in self.opts:
for trigger in list(self.opts['triggers']):
if trigger.lower() in lower:
if trigger.lower() in trace_log.lower():
if 'debug' in self.opts and self.opts['debug']:
print('[N] Writing to subsystem: {}'.format(self.opts['triggers'][trigger]))
os.write(child_fd, self.opts['triggers'][trigger])