[B.A.T.M.A.N.] error code

Marek Lindner lindner_marek at yahoo.de
Fri Jul 27 12:33:03 UTC 2007


Hi,

> i've experienced some trouble with batman. when batman is started with
> an invalid interface, due a typo eht1, batman exits/crushes but gives no
> message and the exit value is 0 too. i would propose that batman, gives
> a message or at least changes the exit value, when it crushes.

this is not entirely correct. We have to distinguish between two cases:


1. batman forks into the background (batmand eth1):

- You get an exit code of 0 because the daemon forks into the background. The 
foreground process exits normally. After forking all the interfaces are 
checked.
- Batman logs its error message to syslog (similar to all other daemons). 
Depending on your syslog configuration you will find the error message 
in /var/log/<logfile>.


2. batman does not fork (use a debug level of 3 or 4 -> batmand -d 3 eth1)

- You get an error exit code because batman does not fork before checking the 
interfaces.
- The error message is printed in the current shell.

Regards,
Marek



More information about the B.A.T.M.A.N mailing list