Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!mailrus!ames!killer!vector!rpp386!jfh From: jfh@rpp386.UUCP (John F. Haugh II) Newsgroups: comp.unix.xenix Subject: Re: modem answering at wrong speed Keywords: modems 2400 1200 Xenix getty line speeds Message-ID: <4541@rpp386.UUCP> Date: 28 Jul 88 05:07:51 GMT References: <273@mjbtn.UUCP> <1373@ssc.UUCP> Reply-To: jfh@rpp386.UUCP (The Beach Bum) Organization: Big "D" Home for Wayward Hackers Lines: 38 In article <1373@ssc.UUCP> fyl@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@rpp386.uucp | -- with my apologizes