[Bro] OpenBSD bro.rc unexpected "("
Camiel Dobbelaar
cd at sentia.nl
Thu Nov 10 12:02:01 PST 2005
"stop" is an alias that is defined automatically in OpenBSD sh (pdksh):
camield at zigzag $ alias stop
stop='kill -STOP'
I made some other adjustments to bro.rc as well, diff at the bottom.
--
Cam
On Mon, 24 Oct 2005, Roger Winslow wrote:
> bro.rc does it's best at catching failures to start but unfortunately
> doesn't catch it 100% of the time. Sometimes programs that segfault can
> produce error that you are seeing. It is likely that what is happening
> is that Bro is unable to start for some reason and the shell script is
> failing to catch the error. Is there anything in the *.info file in your
> $BROLOGS directory after this happens? If so could you send me that?
> Another thing to try is by starting Bro manually from the command line.
> I suspect if you do this you will get closer to what the real problem is.
>
> Roger Winslow
>
>
> Jeff wrote:
>
> > Hi,
> >
> > I've had the fun of getting Bro installed on OpenBSD and now have a
> > problem with the bro.rc file. Here is the error from the bro.rc:
> >
> > bash-3.00# /usr/local/bro/etc/bro.rc --start
> > /usr/local/bro/etc/bro.rc[476]: syntax error: `(' unexpected
> > bash-3.00#
> >
> > Here are the corresponding lines form the bro.rc:
> >
> >
> > 468
> > 469 return ${_start_res}
> > 470 fi
> > 471
> > 472 return 0
> > 473 }
> > 474
> > 475
> > 476 stop() {
> > 477 # Check to see if bro is running
> > 478 local _pid
> > 479 local _bro_is_running
> > 480 local _status_result
> > 481
> > 482 status 2>/dev/null >/dev/null
> > 483 _status_result=$?
> > 484
> > 485 if [ "${_status_result}" = '0' ]; then
> > 486 # try and stop it
> >
> >
> > Has anyone else seen this error?
> >
> > Thanks,
> >
> > Jeff
> >
> > When working on the install, we had to copy ip_ether.h to if_ether.h
> > and then use the gmake 3.8 to get it to work. I'm running OpenBSD 3.8
> > from the snapshots. Thanks to all who helped!
>
>
> _______________________________________________
> Bro mailing list
> bro at bro-ids.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/bro
>
--- /home/camield/Bro/bro-0.9a9/scripts/bro.rc Fri Jul 22 12:47:41 2005
+++ bro.rc Fri Aug 26 11:30:36 2005
@@ -447,7 +447,7 @@
# Check why the loop exited
if ! [ ${_cur_restart_count} -lt ${_max_restart_count} ]; then
# Stop Bro, this will force a cleanup of the run-time directory
- stop 2> /dev/null 1> /dev/null
+ brostop 2> /dev/null 1> /dev/null
EXIT_CODE=${_start_res}
ERROR_MESSAGE="Exceeded maximum autorestart count of
${BRO_MAX_RESTART_ATTEMPTS}. No further attempts will be made to restart
Bro"
END_TIME=`date`
@@ -473,7 +473,7 @@
}
-stop() {
+brostop() {
# Check to see if bro is running
local _pid
local _bro_is_running
@@ -666,9 +666,9 @@
# trap some signals
# Ignore HUP, QUIT, INT signals
- trap '' SIGHUP SIGINT SIGQUIT
+ trap '' HUP INT QUIT
# Call stop if a TERM signal is sent to this ($$) process
- trap 'stop 2>/dev/null >/dev/null; true' SIGTERM
+ trap 'stop 2>/dev/null >/dev/null; true' TERM
wait ${PID} 2> /dev/null
More information about the Bro
mailing list