[unix-pc.general] UUCP problems

rlw@ttardis.UUCP (Ron Wilson) (01/10/90)

In an article, Thad Floryan <thad@cup.portal.com>, says that when using
the ver 2 uucp on the UNIX-PC, one must alter the /etc/inittab entry for
the tty port being used for the modem to turn off the getty.

I've been running 3.51's stock uucp for almost 2 years now - more
precisely, I've been using the uucico that was on the disk labeled
"UNIX-PC UNIX System V Rel 3.51 Communications Patch" (or something
like that) WHICH CAME WITH the 3.51 disk set.

One time when I needed to place a uucp call to another machine, I
forgot to adjust inittab; but uucico worked correctly anyway:
Since uucico worked just fine, I didn't release what happened until
I started to re-edit inittab to restart the getty - it was already
reactivated in the inittab; at that point I released I had forgotten
to deactivated the getty.  I then did a ps -ef to get the PID of the
getty so I could kill it and let init start another (assuming that
the one must have hung); the listing showed that a "new" getty had
already been started (time stamp was after uucico hung up the modem).

Upon further examination, I found that uucico checked for the getty,
and, if it found one, it forked and exec'd a program called
setgetty.  After further investigation, I found that UA setup
menus used setgetty (in a shell script) - so I was able to get
the syntax:

	setgetty id action
where:
	id is the first field in the inittab entry (ph0, ph1, 000, 001,...)
	action is either 0 (= turn off getty) or 1 (= turn on getty)

When it hangs up, it runs setgetty again to turn the getty back on (unless,
of course, it didn't turn the getty off when it started).

The only drawback to this method of switching a getty on and off is if
the system goes down while the getty is off - then I have to trun it
back on myself.

thad@cup.portal.com (Thad P Floryan) (01/14/90)

A comment was just made concerning my advice to Andy regarding "undo"ing
the getty camped on /dev/tty000 pertaining to his uucp problems.

I stated to replace the leading space in /etc/inittab's tty000 entry with a
``:'', then either "# telinit q" or reboot (whichever was most convenient :-).

Ron Wilson mentioned the setgetty program (on the UNIXPC) which, as both the
"ls" and the strings output (below) suggests, does exactly the same thing:

	$ ls -l /usr/bin/setgetty
	-rwsr-xr-x  1 root    bin        2156 Jan  1  1970 /usr/bin/setgetty
	$ strings /usr/bin/setgetty
	usage: setgetty devname state
	tty%s
1 ===>	/etc/inittab
2 ===>	telinit q
	@(#) adminbin:adminbin.sl 1.137 

1>  /etc/inittab is 'edited'
2>  telinit is exec'd


Thad Floryan [ thad@cup.portal.com (OR) ..!sun!portal!cup.portal.com!thad ]