Hi Oliver,

On Wed, Jul 18, 2007 at 02:27:34PM +0200, Oliver Hummel wrote:
> Hello.
> This is my first time, that I write to the mailinglist and I don`t know if 
> you discuse such problems here in this list.
> 
> My problem is that I want to make an autologin.
> I work with an embedded linux image on a board.
> For that board I want to make an autologin, because the device which will be 
> connect to the board isn`t able to enter a password or a login.
> 
> I write a shell script(mylogin):
> #!/bin/sh
> exec login -f root
> 
> and I edit the etc/inittab from:
> console :: respawn:/sbin/getty -L 115200 /dev/ttyNX0 vt100
> to
> console::respawn:/sbin/getty -n -l /bin/mylogin -L 115200 /dev/ttyNX0 vt100
> 
> when I start the mylogin script in the /bin folder with ./mylogin I become 
> this output:
> /bin # ./mylogin
> login[825]: root login  on `ttyNX0'
> 
> [EMAIL PROTECTED]:~>
> 
> but when I edit the /etc/inittab and start my board again, the bootloader and 
> kernelinformation starts but then I become a black screen and every 10 
> seconds the cursor move one line down.
> 
> But my goal is, that I get such a output "[EMAIL PROTECTED]:~>" and that I 
> can work with my Image.

You could add a line like this to your /etc/inittab:

console::respawn:/bin/sh

But I suspect your real problem is another one. If you want to remote
control your board you should write some program that listens for
commands on the serial port. Maybe you already have such a program, but
it listens on stdin. Modify it to open the serial port and read its
input from there instead. Then you can replace the /bin/sh above with
your program. The linux serial programming howto is a good starting
point: http://tldp.org/HOWTO/Serial-Programming-HOWTO/index.html
 

 Sascha

-- 
Pengutronix - Linux Solutions for Science and Industry
Entwicklungszentrum Nord     http://www.pengutronix.de

-- 
ptxdist mailing list
[email protected]

Reply via email to