Can't read netnews with "rn" from dialup ?

Michael "Ford" Ditto ditto at cbmvax.UUCP
Fri Dec 9 15:48:53 AEST 1988


In article <5437 at cbmvax.UUCP> I wrote:
>What I did was to modify the /dev/ph? driver to ALWAYS use data mode.
>This, of course, means that the phone manager is not usable, but I
>never run it anyway.  I have this modification available as a loadable
>driver (source code) if anyone wants it.

Below is the "loadable driver" I mentioned, but I think I should
apologize for any ambiguity in my statement above:  I do NOT have
the source code to an actual ph driver, only to this simple "driver"
that essentially makes an in-memory patch to the normal driver.

Remember that this will completely prevent any kind of "VOICE" mode
access to either phone line.  The phone manager will no longer work.

I threw in an "Install" script which has not been tested, but should
work, or at least give you the right idea.

A lot of people asked for this, and I think I lost a few of their
names, so I decided to just post it.

					-=] Ford [=-

"The number of Unix installations	(In Real Life:  Mike Ditto)
has grown to 10, with more expected."	ford at kenobi.cts.com
- The Unix Programmer's Manual,		...!sdcsvax!crash!elgar!ford
  2nd Edition, June, 1972.		ditto at cbmvax.commodore.com


#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
#	Install
#	phfx.c
# This archive created: Fri Dec  9 00:38:11 1988
export PATH; PATH=/bin:$PATH
echo shar: extracting "'Install'" '(128 characters)'
if test -f 'Install'
then
	echo shar: will not over-write existing file "'Install'"
else
cat << \SHAR_EOF > 'Install'
set -e
/etc/masterupd -a init release phfx
make phfx.o
cp phfx.o /etc/lddrv
cd /etc/lddrv
./lddrv -av phfx
echo phfx >> drivers
SHAR_EOF
if test 128 -ne "`wc -c < 'Install'`"
then
	echo shar: error transmitting "'Install'" '(should have been 128 characters)'
fi
chmod +x 'Install'
fi # end of overwriting check
echo shar: extracting "'phfx.c'" '(548 characters)'
if test -f 'phfx.c'
then
	echo shar: will not over-write existing file "'phfx.c'"
else
cat << \SHAR_EOF > 'phfx.c'
#define KERNEL

#include <sys/types.h>
#include <sys/conf.h>
#include <sys/user.h>
#include <sys/file.h>
#include <sys/errno.h>

extern int phopen();

int fakephopen();
static int cdevidx;

phfxinit()
{
    for ( cdevidx=0 ; cdevidx < cdevcnt ; ++cdevidx )
	if (cdevsw[cdevidx].d_open == phopen)
	{
	    cdevsw[cdevidx].d_open = fakephopen;
	    return 0;
	}
    u.u_error = ESRCH;
    return -1;
}


fakephopen(dev, flag)
dev_t dev;
int flag;
{
    return phopen(dev, flag|FREAD|FWRITE);
}


phfxrelease()
{
    cdevsw[cdevidx].d_open = phopen;
}
SHAR_EOF
if test 548 -ne "`wc -c < 'phfx.c'`"
then
	echo shar: error transmitting "'phfx.c'" '(should have been 548 characters)'
fi
fi # end of overwriting check
#	End of shell archive
exit 0
-- 
					-=] Ford [=-

"The number of Unix installations	(In Real Life:  Mike Ditto)
has grown to 10, with more expected."	ford at kenobi.cts.com
- The Unix Programmer's Manual,		...!sdcsvax!crash!elgar!ford
  2nd Edition, June, 1972.		ditto at cbmvax.commodore.com



More information about the Unix-pc.general mailing list