how to use serial for both pppd and getty

Submitted by zixenus
on July 22, 2009 - 7:38am

Hi Everybody, I am using our only serial port(/dev/ttyS0) for pppd. We are also getting console output through serial. So, to get things going I blocked getty in inittab. I am currently connecting my box via ssh and then i can run pppd, chat script etc.Can I have a setup so that I can give exlusive access of serial to pppd when it runs and when it exits it will unblock it?

In inittab, getty is respawned. Should I run in any other way so that it can get killed to be used by pppd.

I tried by passing SIGSTOP to getty, it shows its state in "ps" as "T", but still pppd doesnt run as it should be. Then I Is it possible at all in this setup? Any confirmation/links will be of great help.

Thanks and Regards,
zix

why getty

strcmp
on
July 26, 2009 - 1:46pm

what do you need the getty for? the console messages should appear anyway, even if no one is logged in. btw. don't the messages disturb the ppp sessions?

have you tried starting getty from somewhere else, not from the inittab? if you don't need it for emergency login, you should be able to start it on demand as a normal process.

but it should be easier to just declare a separate init level, on with getty on ttyS0, one without (i.e. the runlevel list in the ttyS0 inittab entry only contains the one where getty should be active), and change between them interactively with telinit.

Comment viewing options