Re: [OpenWrt-Devel] iperf: add minimal init.d script

2012-08-08 Thread Gui Iribarren
On Wed, Aug 8, 2012 at 5:21 PM, Roberto Riggio
 wrote:
> Wouldn't this imply that iperf will start in any case?
Uhm, I thought that would need a "/etc/init.d/iperf enable" to be run
in the first place.
So that simply "opkg install"ing the package wouldn't make it start at
every boot.

> This is probably not something
> I would would want as default behavior (am I alone on this?).
Definitely, I wouldn't want that neither.

On Wed, Aug 8, 2012 at 5:24 PM, Luka Perkov  wrote:
> On Wed, Aug 08, 2012 at 05:02:30PM -0300, Gui Iribarren wrote:
>> Starts iperf in server mode as a daemon, with IPv4 + IPv6 support enabled 
>> (-V)
>
> Can you change your patch so the script instalation is optional and
> disabled by default? Something like we have fw_setenv in uboot-envtools
> package.

Could do, but i haven't seen other daemons take this approach:
two packages i can recall right now are aiccu and nodogsplash, both of
them include a "START=xx" in the init.d script, but that doesn't take
into effect until you "enable" them after opkg install

They do "enable" themselves (per definition) if you include them as
precompiled packages in the firmware binary, but that's a whole
differt story :)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] iperf: add minimal init.d script

2012-08-08 Thread Luka Perkov
On Wed, Aug 08, 2012 at 05:02:30PM -0300, Gui Iribarren wrote:
> Starts iperf in server mode as a daemon, with IPv4 + IPv6 support enabled (-V)

Can you change your patch so the script instalation is optional and
disabled by default? Something like we have fw_setenv in uboot-envtools
package.

Luka
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] iperf: add minimal init.d script

2012-08-08 Thread Roberto Riggio
Wouldn't this imply that iperf will start in any case? This is probably not 
something
I would would want as default behavior (am I alone on this?). Maybe you could 
add a
build time option or a dummy package containing only the init script.

On 08/08/2012 10:02 PM, Gui Iribarren wrote:
> Starts iperf in server mode as a daemon, with IPv4 + IPv6 support enabled (-V)
> 
> Signed-off-by: Gui Iribarren 
> 
> Index: net/iperf/files/iperf
> ===
> --- net/iperf/files/iperf   (revision 0)
> +++ net/iperf/files/iperf   (revision 0)
> @@ -0,0 +1,12 @@
> +#!/bin/sh /etc/rc.common
> +# Copyright (C) 2006-2012 OpenWrt.org
> +
> +START=98
> +
> +start () {
> +   service_start /usr/bin/iperf -s -D -V
> +}
> +
> +stop() {
> +   killall iperf
> +}
> 
> Property changes on: net/iperf/files/iperf
> ___
> Added: svn:executable
>+ *
> 
> Index: net/iperf/Makefile
> ===
> --- net/iperf/Makefile  (revision 32789)
> +++ net/iperf/Makefile  (working copy)
> @@ -9,7 +9,7 @@
> 
>  PKG_NAME:=iperf
>  PKG_VERSION:=2.0.5
> -PKG_RELEASE:=1
> +PKG_RELEASE:=2
> 
>  
> PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
>  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
> @@ -77,6 +77,8 @@
>  define Package/iperf/install
> $(INSTALL_DIR) $(1)/usr/bin
> $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/iperf $(1)/usr/bin/iperf
> +   $(INSTALL_DIR) $(1)/etc/init.d
> +   $(INSTALL_BIN) ./files/iperf $(1)/etc/init.d/iperf
>  endef
>  Package/iperf-mt/install = $(Package/iperf/install)
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 


-- 

Roberto Riggio, Ph.D.
CREATE-NET
Network & Security Solutions for Pervasive Computing Systems (iNSPIRE)
Senior Researcher
Via alla Cascata 56/D - 38123 Povo Trento (Italy)
e-mail: roberto.rig...@create-net.org
Tel: (+39) 0461 408400 - interno/extension 708
Fax: (+39) 0461 421157
www.create-net.org/~rriggio


The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited according to
the Italian Law 196/2003 of the Legislature. If you received this in
error, please contact the sender and delete the material from any
computer.

Le informazioni contenute in questo messaggio di posta elettronica e nei
file allegati sono da considerarsi strettamente riservate. Il loro
utilizzo e' consentito esclusivamente al destinatario del messaggio, per
le finalita' indicate nel messaggio stesso. Qualora riceveste questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla cancellazione del
messaggio stesso dal Vostro sistema. Trattenere il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo,
od utilizzarlo per finalita' diverse, costituisce comportamento
contrario ai principi dettati dal D. Lgs. 196/2003.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] iperf: add minimal init.d script

2012-08-08 Thread Gui Iribarren
Starts iperf in server mode as a daemon, with IPv4 + IPv6 support enabled (-V)

Signed-off-by: Gui Iribarren 

Index: net/iperf/files/iperf
===
--- net/iperf/files/iperf   (revision 0)
+++ net/iperf/files/iperf   (revision 0)
@@ -0,0 +1,12 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2012 OpenWrt.org
+
+START=98
+
+start () {
+   service_start /usr/bin/iperf -s -D -V
+}
+
+stop() {
+   killall iperf
+}

Property changes on: net/iperf/files/iperf
___
Added: svn:executable
   + *

Index: net/iperf/Makefile
===
--- net/iperf/Makefile  (revision 32789)
+++ net/iperf/Makefile  (working copy)
@@ -9,7 +9,7 @@

 PKG_NAME:=iperf
 PKG_VERSION:=2.0.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2

 
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -77,6 +77,8 @@
 define Package/iperf/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/iperf $(1)/usr/bin/iperf
+   $(INSTALL_DIR) $(1)/etc/init.d
+   $(INSTALL_BIN) ./files/iperf $(1)/etc/init.d/iperf
 endef
 Package/iperf-mt/install = $(Package/iperf/install)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel