On 2013/10/14 22:58, Remi Locherer wrote:
> On Sun, Oct 13, 2013 at 12:03:41AM +0200, Antoine Jacoutot wrote:
> > On Sat, Oct 12, 2013 at 03:29:01PM +0200, Remi Locherer wrote:
> > > On Fri, Oct 11, 2013 at 10:02:08AM +0100, Stuart Henderson wrote:
> > > > On 2013/10/10 23:00, Remi Locherer wrote:
> > > > > On Thu, Oct 03, 2013 at 11:32:59PM -0400, Brad Smith wrote:
> > > > > > Here is an update to darkstat 3.0.717.
> > > > > > 
> > > > > > One nice new feature is darkstat can now monitor multiple 
> > > > > > interfaces.
> > > > > > 
> > > > > > OK?
> > > > > 
> > > > > Works for me on amd64. I added an rc.d script for convenience.
> > > > 
> > > > If you're adding a script, I think it also needs a readme to explain
> > > > that the user must set darkstat_flags="-i <interface>"
> > > > 
> > > > Brad, update is ok with me, let's deal with the script separately.
> > > > 
> > > 
> > > Here a patch that adds an rc script and a readme.
> > 
> > That is a pretty useless readme imho....

I disagree as it does show the user how to set the interface..

> Maybe it's better to have an rc script with default flags and no readme. 
> The new diff works as long as there is an egress interface.

It's useful to have this as a default, but I think the instructions are
still needed as this might get the wrong egress interface (e.g. for
people who have default IPv4 and IPv6 routes pointing over different
interfaces and the "wrong" one is first - or, uh, no interface if it
uses dhcpd and the server is down ;-)

> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/net/darkstat/Makefile,v
> retrieving revision 1.20
> diff -u -p -r1.20 Makefile
> --- Makefile    11 Oct 2013 17:23:16 -0000      1.20
> +++ Makefile    14 Oct 2013 20:53:04 -0000
> @@ -3,6 +3,7 @@
>  COMMENT=               network statistics gatherer with graphs
>  
>  DISTNAME=              darkstat-3.0.717
> +REVISION=              1

not really important, but 0 is normal for the first REVISION after
a version update.

> +#
> +# $OpenBSD$
> +
> +egress_if=$( ifconfig egress 2>/dev/null | head -1 | cut -d : -f 1 )
> +
> +daemon="/usr/local/sbin/darkstat"
> +daemon_flags="-i $egress_if -b 127.0.0.1 --syslog"
> +
> +. /etc/rc.d/rc.subr
> +
> +rc_reload=NO
> +
> +rc_cmd $1
> 

Reply via email to