Add option '--exec <command>' for running shell command

Runs shell command with I/O redirected to device.
This commit is contained in:
Martin Lund 2024-05-07 14:38:19 +02:00
parent 545d473220
commit e75e19eb00
9 changed files with 89 additions and 10 deletions

View file

@ -2277,6 +2277,12 @@ int tty_connect(void)
exit(EXIT_SUCCESS);
}
if (option.exec != NULL)
{
int status = execute_shell_command(device_fd, option.exec);
exit(status);
}
/* Input loop */
while (true)
{