tpat: tpat1

tpat1: igntt
	echo '1. Get the new telnetd from ucbarpa.berkeley.edu:' 1>&2
	echo 'This command will retrieve telnet.90.06.28.tar.Z.' 1>&2
	echo 'To execute it, just press return.' 1>&2
	echo 'To continue, just make tpat2 > /dev/null.' 1>&2
	./igntt tiocsti 'ftp -n 128.32.130.11 < TELNET.FTP'

tpat2: igntt
	echo '2. Unpack telnetd:' 1>&2
	echo 'This is self-explanatory. You may want tar xvf to see a file list.' 1>&2
	echo 'To continue, just make tpat3 > /dev/null.' 1>&2
	if test -f telnet.90.06.28.tar.Z ;\
	then ./igntt tiocsti 'uncompress < telnet.90.06.28.tar.Z | tar xf -' ;\
	else echo 'Aack! telnet.90.06.28.tar.Z doesn'\''t exist!' ;\
	fi

tpat3: igntt
	echo '3. Apply these patches, and check that they'\''re safe:' 1>&2
	echo 'If all goes well, you should see a flood of successful patch output.' 1>&2
	echo 'The unifdefs are to check the safety of the patches;' 1>&2
	echo 'as you will see, the patches do nothing with USEPTY undefined.' 1>&2
	echo 'To continue, just make tpat4 > /dev/null.' 1>&2
	if test -d telnet.90.06.28 ;\
	then ./igntt tiocsti 'cd telnet.90.06.28/telnetd; ' \
			     'patch < ../../telnetd.90.06.28.patch; ' \
			     'unifdef -UUSEPTY sys_term.c | cmp - sys_term.c.orig; ' \
			     'unifdef -UUSEPTY telnetd.c | cmp - telnetd.c.orig; ' \
			     'unifdef -UUSEPTY pathnames.h | cmp - pathnames.h.orig; ' \
			     'cd ../..' ;\
	fi

tpat4: igntt
	echo '4. Check the pty pathname and fix it if necessary:' 1>&2
	echo 'Since there is no standard like /inst for where programs go,' 1>&2
	echo 'you had better make sure telnetd's pathnames.h is correct.' 1>&2
	echo 'To continue, just make tpat5 > /dev/null.' 1>&2
	./igntt tiocsti 'grep PATH_PTY telnet.90.06.28/telnetd/pathnames.h'

tpat5: igntt
	echo '5. Add sock.o and sock.h symlinks:' 1>&2
	echo 'This is self-explanatory.' 1>&2
	echo 'To continue, just make tpat6 > /dev/null.' 1>&2
	./igntt tiocsti 'ln -s ../../../sock.{h,o} telnet.90.06.28/telnetd'

tpat6: igntt
	echo '6. Preparing for compile: Edit Makefile and Makefile.generic.' 1>&2
	echo 'You must at least add -DUSEPTY to CFLAGS and sock.o to OBJS' 1>&2
	echo 'in Makefile.generic.' 1>&2
	echo 'telnetd isn'\''t too high on the portability scale, so you' 1>&2
	echo 'may have to make quite a few more changes.' 1>&2
	echo 'Anyway, make tpat7 > /dev/null to continue.' 1>&2
	./igntt tiocsti 'vi telnet.90.06.28/telnetd/Makefile.generic'

tpat7: igntt
	echo '7. Compile!' 1>&2
	echo 'As explained in the telnetd source documentation, you have' 1>&2
	echo 'to provide the machine name to make. Under SunOS 4.0.3,' 1>&2
	echo 'you can just press return here.' 1>&2
	echo 'When and if this succeeds, go to step 8 of README.' 1>&2
	./igntt tiocsti '( cd telnet.90.06.28/telnetd; (date;make sun4.0) >>&Makelog ) &'

igntt: igntt.c
	cc -o igntt igntt.c
