modem answering at wrong speed
John F. Haugh II
jfh at rpp386.UUCP
Thu Jul 28 15:07:51 AEST 1988
In article <1373 at ssc.UUCP> fyl at ssc.UUCP (Phil Hughes) writes:
>I never found a clean solution, but my dirty one almost works.
>Every hour, cron starts a shell script that disables all the 2400
>baud lines that are not in use, sends commands to the modems
>(a few ATs or a reset are cool) to the modems and then enables them.
>Ugly, but it almost works.
okay. since we are sending out ugly solutions, how about an almost
clean one which works flawlessly modulo 200 or some phone calls a day ...
compile this, move /etc/getty to /etc/ogetty and copy the a.out to
/etc/getty. don't forget to change a few things, like line number
and so on. all you have to do is insure the modem is hung-up before
invoking getty. this was just a simple hack i wrote some months ago
and it has worked since.
--- fkgetty.c ---
main (argc, argv, envp)
int argc;
char *argv[], *envp[];
{
if (argc < 2 || strcmp (argv[1], "tty1A") != 0) {
execl ( "/etc/ogetty", argv[0], argv[1],
argv[2], argv[3], (char *) 0 );
_exit (127);
}
sleep (1);
system ("/usr/lib/uucp/dial -h /dev/tty1A 2400");
sleep (1);
execl ("/etc/ogetty", argv[0], argv[1], argv[2], argv[3], (char *) 0);
_exit (127);
}
---------------
--
John F. Haugh II +--------- Cute Chocolate Quote ---------
HASA, "S" Division | "USENET should not be confused with
UUCP: killer!rpp386!jfh | something that matters, like CHOCOLATE"
DOMAIN: jfh at rpp386.uucp | -- with my apologizes
More information about the Comp.unix.xenix
mailing list