Xref: utzoo comp.sys.att:7508 unix-pc.general:3692 unix-pc.uucp:142 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!rutgers!uwvax!puff!upl From: upl@puff.cs.wisc.edu (Future Unix Gurus) Newsgroups: comp.sys.att,unix-pc.general,unix-pc.uucp Subject: How do you check if ph0 is set to DATA? Message-ID: <2938@puff.cs.wisc.edu> Date: 7 Sep 89 23:20:53 GMT Distribution: usa Organization: U of Wisconsin CS Dept Lines: 30 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@uhura.cs.wisc.edu \___/|_| |_|_||_|\\|_|\_\|_||___|