Call the given phone number (if none is given on the command line, ask user for one), and if a CONNECT is established, hand over control to mgetty(8) to present user with a login name prompt.
callback is used for various purposes:
by calling a well-known phone number.
Use the given level of verbosity for logging - 0 means no logging, 5 is really noisy.
Print version number and quit.
Do not go into the background. This is helpful for debugging.
Use the given modem lines. Multiple lines can be separated by
Set the modem initialization sequence (as usual: expect send expect ...). This can do nearly everything, as long as it leaves the modem command responses on (that is, no ATQ1 here!) and switches the modem to data mode (AT+FCLASS=0) if it is used in data/fax mode.
This is the bit rate that should be used for the machine-modem connection. Usually you'll set this via the
In most cases, callback can't print any error messages to the console, because it must detach itself immediately from the terminal, in case someone wants to be called back on the modem line he called in. So, nothing to print messages to...
Because of this, all callback errors are logged to a protocol file (the extent of the data written is controlled by the
How does it work?
This is a bit tricky, because of the way init(8) handles the utmp(5) file. You can't just have any program ask the user for a login name, and then start a mgetty(8)'' has to be started from /etc/inittab).
So, mgetty has to do the
The way it works is this: callback dials out on a modem device. It will only take a modem device that has a mgetty watching over it (!). When the connection is established (CONNECT), callback will send a signal SIGUSR1 to mgetty, which, in turn, will send the same signal back to signal callback then exits, and mgetty takes over the existing connection, prompts the user for a login name, and forks off /bin/login.
callback is ''
callback is fairly dumb concerning retries.
callback must be run as root.
lib/main.php:944: Notice: PageInfo: Cannot find action page