How do you check if ph0 is set to DATA?

Future Unix Gurus upl at puff.cs.wisc.edu
Fri Sep 8 09:20:53 AEST 1989


Hello, again

Ok.  I'm trying to do this:  I want to create a uucp polling shell script
on a UNIX pc.  I want to be able to have cron (actually smgr) run this
script at various periods in the day.  I only have one phone line, so
I can't dedicate it to a DATA line.  Question:  is there some way that
I can check to see if ph0 is set to VOICE and if so can I then check if
it's active?  

Here's the plan: if ph0 is set to VOICE and active, don't try to poll 
anywhere.  If ph0 is set to VOICE but not active, then do a phtoggle,
and try polling.  If ph0 is set to DATA check the LCK..ph0 file If it 
exists, don't poll, otherwise poll.  Currently I've got it set up in
my crontab and L.sys files to do all of my sending between midnight
and 8am everyday.  That's fine for things I send.  But when I need to 
poll a site (for things I might be receiving), I want to be able to do 
it whenever I'm not using the phone.

Any suggestions?  I'm reasonably capable in C.  I could write a program to
look at /dev/kmem, but I don't know how to do something like that.

Thanks in advance for any help!!

- sparkie
p.s. please respond to the following address (not the address listed above)
 ___  ___  ___  ___  _  _  _  ___
/ __\| . \/ . \| . \| |/ /|_|| _ |
\___\| __/|   || _ /|   < | || _[  	sparkie at uhura.cs.wisc.edu 
\___/|_|  |_|_||_|\\|_|\_\|_||___|



More information about the Unix-pc.general mailing list