Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site phri.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxb!houxm!vax135!timeinc!phri!roy From: roy@phri.UUCP (Roy Smith) Newsgroups: net.news Subject: Re: Turning off news and uucp for a period of time Message-ID: <192@phri.UUCP> Date: Sat, 23-Feb-85 11:49:19 EST Article-I.D.: phri.192 Posted: Sat Feb 23 11:49:19 1985 Date-Received: Wed, 27-Feb-85 06:59:53 EST References: <233@resonex.UUCP> Distribution: net Organization: Public Health Research Inst. (NY, NY) Lines: 39 > When we are running experiments [...] we would prefer not to have news > or uucp running because they slow down the system. > > Do you have any recommendations on how to block news and uucp? Instead of having /usr/lib/uucp/uucico in the shell field of /etc/passwd for your uucp logins, put in /usr/lib/uucp/checktime, which appears below. I don't actually have this running here; I made this up just now, so please don't flame me if I messed up a few details. And, yes, I'm sure this can be done just a simply with a shell file. main () { if (open ("/usr/spool/uucp/shutup", FIO_READ) < 0) exec ("/usr/lib/uucp/uucico"); else { printf ("sorry -- we're closed\n"); exit (1); } } This attempts to open the "shutup" file for reading. If the file DOES NOT EXIST, open returns an error, and you just run uucico like you usually do. If you can open the file, it exists, and you just exit. The uucico at the other end will get either a HANDSHAKE or TIMEOUT error and will give up. All you have to do when you don't want uucp's to call you up is to create this file; when you want to allow incoming uucp's again, just remove it. You might want to warn you uucp partners about this; if they happen to run uucico in debug mode, they will see the "sorry -- we're closed" message and get confused as hell. You can expand on this, I'm sure. -- The opinions expressed herein do not necessarily reflect the views of the Public Health Research Institute. {decvax,ihnp4}!vax135!timeinc\ >!phri!roy (Roy Smith) {allegra,rocky2}!cubsvax/