Scripts to deal with A/UX's buggy UUCP

Jeff Mann mann at intacc.uucp
Wed Mar 27 11:41:05 AEST 1991


In article <1991Mar10.194813.10357 at panix.uucp> alexis at panix.uucp (Alexis Rosen) writes:
>A few days ago I mentioned some scripts I had written to make life with A/UX's
>UUCP more bearable. As I got over a dozen requests, I'm posting both scripts
>here.
>
>The first one, uupoll, will call the named system up to a specified number of
>times. One key feature is that it will call again if the first connection
>fails before it's done. The other feature is that it permits two-way use of
>serial lines. In other words, you can use one serial port for both dial-in
>and dial-out.

[excerpt from the uupoll script:]

>		# check to see if we're calling on ttya0. If we are, we don't
>		# have to worry about a getty. If not, we need to handle the
>		# getty by doing a stty -modem.
>	if [ $line != a0 ] ; then
>		# check to see if the line is in use. If not, use stty to
>		# turn off 'modem', thereby allowing uucico to grab the line.
>		# It is critical that there be a trap to turn it back on,
>		# since otherwise logins on that line will be disabled.
>	    if [ ! -f /usr/spool/uucp/LCK..tty$line ] ; then
>		trap "stty -n /dev/tty$line modem" 0 1 2 3 15
>		stty -n /dev/tty$line -modem
>	    fi		# if the LCK file exists, uucico won't even try to run.
>	fi
>		# invoke uucico and get its process number. Then wait for the
>		# uucico to exit.
>	uucico -s$1 -r1 & uuproc=$! ; wait
>		# undo the stty right away, if we didn't use ttya0. The trap
>		# will do this for us but this frees the line for logins faster.
>	stty -n /dev/tty$line modem

I don't know if you've done something else to get around this, or what,
but on my system uucico will die if there is a getty on the line, 
regardless of whether you do an stty -modem. In other words, your
>		# have to worry about a getty. If not, we need to handle the
>		# getty by doing a stty -modem.
doesn't work for me. I have had to use the old method of specifiying
run levels which getty can exist in, and using init to turn the getty
on or off. Am I missing something? Anyone else with the same problem?
I'm planning to post my code which handles this, but part of it runs
suid root to handle the init, and if there's another way around it...

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|  Jeff Mann  Inter/Access Artists' Computer Centre, Toronto  [416] 535-8601 |
|  intacc!mann at cs.toronto.edu   Matrix Artists' BBS: [416] 535-7598 2400 8N1 |
| ...uunet!mnetor!intacc!mann  mann at intacc.uucp   [416] 535-1443 Telebit 8N1 |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



More information about the Comp.unix.aux mailing list