On Sun, Sep 26, 2010 at 8:41 AM, Philip Prindeville
<philipp_s...@redfish-solutions.com> wrote:
>  On 9/26/10 12:34 AM, Benjamin Henrion wrote:
>>
>> On Sun, Sep 26, 2010 at 2:12 AM, Philip Prindeville
>> <philipp_s...@redfish-solutions.com>  wrote:
>>>
>>>  Hi.
>>>
>>> I have a box (a net5501 with a Perle serial octal RS-232 card in it) that
>>> I
>>> want to use as a console server for a bunch of headless computers.
>>>
>>> I was wondering if there's a trivial app that I can run as the shell that
>>> ssh (or telnet) would run, example:
>>>
>>> #!/bin/bash
>>>
>>> port=$(echo "$SSH_CONNECT" | cut -d' ' -f4)
>>>
>>> let -i tty=$port-2000
>>>
>>> ttyname=$(printf "/dev/ttyS%02d" $tty)
>>>
>>> (stty 19200 ; \
>>>  termserv)<$ttyname>$ttyname
>>>
>>> exit
>>>
>>> I could write one from scratch, but if someone already has, that would be
>>> even better.
>>
>> You want to push commands through the telnet interface?
>>
>> Try expect, or even netcat, I used it in owrtconfig to push commands
>> to openwrt boxes opened in telnet.
>>
>
> No, not really pushing commands...  I just need to be able hop on the
> console of a rebooting box and type 'y' for an fsck prompt, or see why a box
> panicked, etc.

My solution:

1. Disable the OpenWRT serial port by modifying the kernel boot
arguments, so that the system does not ouput on its serial port
2. Use this serial port with screen to access a device like this:

screen /dev/ttyS0 19200

--
Benjamin Henrion <bhenrion at ffii.org>
FFII Brussels - +32-484-566109 - +32-2-4148403
"In July 2005, after several failed attempts to legalise software
patents in Europe, the patent establishment changed its strategy.
Instead of explicitly seeking to sanction the patentability of
software, they are now seeking to create a central European patent
court, which would establish and enforce patentability rules in their
favor, without any possibility of correction by competing courts or
democratically elected legislators."
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to