in reply to Replacing getty with a perl script?

My linux distro comes with a program called agetty. It allows you to bypass login and specify which program to run (as a replacement for /bin/login). So /sbin/agetty -l /path/to/program -n 9600 ttyname causes /path/to/program to run on ttyname (it runs as root since no login was prompted for). I don't know if agetty is available for OpenBSD, but if not there may be something with similar functionality.
  • Comment on Re: Replacing getty with a perl script?

Replies are listed 'Best First'.
Re: Re: Replacing getty with a perl script?
by ginseng (Pilgrim) on Jun 28, 2001 at 12:20 UTC

    My first response is Ahah! Exactly what I want...alas, agetty does not currently run on OpenBSD. It seems to use termio.h, rather than the POSIX termios.h. OpenBSD only has support for the latter.

    I understand that it's not too bad to redefine constants based on the changes between the two files, but that may be a bit much for what i'm expected to do here. I really don't want to go through a 1232 line program and port it to a different operating system.

    So naturally, my second response was "Bummer."

    But you did clue me in on something - I need to find an alternative getty program suppported under OpenBSD, that allows the configuration to dictate whether or not a username is required. I've checked the OpenBSD ports tree, and find only mgetty as an alternative. In order to get the man page with little effort, I did start to install mgetty, and this is what I got:

    bash-2.04# cd /usr/ports/comms/mgetty+sendfax/
    bash-2.04# make install
    ===>  mgetty-1.1.21 is marked as broken: insecure tempfile handling: can overwrite any file on the system.
    

    Probably not what I'm after :(

    So I guess I'll check out FreeBSD and see what alternative getty's are available there...I can probably install some of them without major difficulty.

    All the same, thank you for the assistance!