On Tue 29 Nov 2022 at 14:12:37 (+0100), Steve Keller wrote: > For some retro feeling I grabbed my old modem and attached it to the > phone line. Minicom and dial-out work but now I'd like to allow > dial-in with a getty waiting on the line. > > Systemd has a serial-getty@ service which uses agetty but that doesn't > work. It seems agetty is just not suited for that job although the > manual page claims it to be. But I couldn't get agetty to wait for an > incoming call, answer it, and then send the login prompt. Instead, it > always immediately sends the prompt, execve()s to /bin/login which then > terminates after a 60s timeout. > > I've now installed mgetty but there is no systemd service file for it. > > Should I change the serial-getty@ service to use mgetty or should I > create a new service for it? In case of the latter, does it suffice > to only add the .service file or do I need anything else?
I'd certainly try using the service that's already there, just changing the ExecStart line. I used mgetty for years a couple of decades ago, and it worked really well. I could dial out from work to home, and I could use callback to call me at home when I dialled in to work, logging in with a secret word. (The word selects the number that it dials back.) In fact, I used callback from anywhere I happened to be staying if it could receive an external call directly. To prevent interfering with normal phone use, I set -n to something like 19 rings, by which time most humans will have given up. (IIRC this exceeded the number of rings that an internal caller could wait for pickup, but not external callers.) Restart=always was important if, like me, you find you have to restart the modem every so often, otherwise after a few days, it would just not pick up. I ran the modem off a mechanical timer switch with just one ¼hr segment set to Off, at ~04:30. Another wrinkle with callback: don't put ABORT "NO CARRIER" into the chat script, because you get that string when the modem hangs up to call back. It saved a lot of money, as the office could dial National Calls for a flatrate 10p (IIRC), whereas I would be paying by the minute. (The Friends and Family tariff would lower the cost of my calls, but that meant redialling before an hour had passed, else the rate would go up.) It also broke the security rules which mandated using a dongle to log in from off site. Of course, the dongle only worked if you logged in to a Windows server, and all my machines ran linux. At that time, interoperability was crude to say the least. Does this sound suitably retro? Cheers, David.