Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!ames!pacbell.com!pacbell!pbhyf!kjk From: kjk@PacBell.COM (Ken Keirnan) Newsgroups: comp.unix.i386 Subject: Re: UUCP files/directories being removed under SCO UNIX Keywords: uucp Message-ID: <7585@pbhyf.PacBell.COM> Date: 5 Jun 90 18:50:50 GMT References: <45@raysnec.UUCP> Reply-To: kjk@PacBell.COM (Ken Keirnan) Distribution: na Organization: Pacific * Bell, San Ramon, CA Lines: 62 In article <45@raysnec.UUCP> shwake@raysnec.UUCP (Ray Shwake) writes: >On at least two occasions, all the files in /usr/lib/uucp except uugetty >and a local subdirectory were removed at 23:45 upon running uudemon.clean. >Yet on other occasions it functioned correctly. This morning I found, >again at 23:45 the sub-directories in /usr/spool/uucp/.Log were removed. > >Has anyone else experienced such occurrences??? Please email if you have >any ideas. Some versions of the HDB cleanup script(s) do a very bad thing. They assume all the files under /usr/spool/uucp are directory names. The "for" loop that does the cleanup looks something like: cd /usr/spool/uucp for i in * do cd $i . . cleanup code . . cd .. done Note that if one of the files in /usr/spool/uucp is not a directory (an ordinary file created by accident or by a locally developed program), the "cd $i" will fail leaving the program in /usr/spool/uucp and the "cd .." at the end of the loop will change directory to /usr/spool and the cleanup will continue from there. If this happens again, you are in /usr... you can figure out the rest. I strongly recommend if you have the above problem, to add a line at the top of the "for" loop to insure a directory is being processed: for i in * do if [ ! -d $i ]; then continue; fi cd $i . . Even better, also modify the "cd $i" to read "cd /usr/spool/uucp/$i" just to be sure. Hope this helps. Ken Keirnan Pacific Bell -- Ken Keirnan - Pacific Bell - {att,bellcore,sun,ames,pyramid}!pacbell!kjk San Ramon, California kjk@PacBell.COM