[Bro-Dev] #1007: Broctl cron message if stats/www already exists

Bro Tracker bro at tracker.bro.org
Thu May 16 22:53:17 PDT 2013


#1007: Broctl cron message if stats/www already exists
-----------------------------+------------------------
  Reporter:  seth            |      Owner:  seth
      Type:  Merge Request   |     Status:  closed
  Priority:  Medium          |  Milestone:  Bro2.2
 Component:  BroControl      |    Version:  git/master
Resolution:  Solved/Applied  |   Keywords:
-----------------------------+------------------------

Comment (by dnthayer):

 Replying to [comment:11 seth]:
 > > Applied, however I'm not sure is fixes the issue: {{{mkdir -p}}}
 should be
 > > safe against the directory already existing. I believe the error
 messages
 > > indicates that a *file* of that name exists, in which case the new
 > > {{{-d}}} test will probably fail in the same way.
 >
 > Oh, the report I got must have just been a hang over from the old
 problem where the accidental www file was still in place.  I'm hesitant to
 include a line which check to see if it's a file and deletes it though
 (essentially as a silent update).

 Since we're using "mkdir -p www", we don't need a check if "www" is a
 directory (that's the point of the "-p" flag).  If "www" is a file,
 then "mkdir -p" fails in the same way as just plain "mkdir" would,
 and the "-d" test doesn't make a difference in the outcome.

 I believe what's happening is that someone was running Bro 2.1, then
 the "www" file got created, then they updated to git master, and now
 an error message appears "mkdir: ... File exists".

-- 
Ticket URL: <http://tracker.bro.org/bro/ticket/1007#comment:12>
Bro Tracker <http://tracker.bro.org/bro>
Bro Issue Tracker



More information about the bro-dev mailing list