[PATCH 3/9] fff-fastd: new package

Christian Dresel fff at chrisi01.de
Di Apr 5 03:47:55 CEST 2016


hi

ich hab das ganze mal durchgebaut und ich hab hier ein kleines "Problem"
eher eine Frage bzw eine Sache die für mich nicht ganz schlüssig ist,
siehe Inline

Am 15.03.2016 um 07:31 schrieb Tim Niemeyer:
> Signed-off-by: Tim Niemeyer <tim at tn-x.org>
> ---
> 
>  .../root_file_system/usr/lib/micron.d/default      |  1 -
>  src/packages/fff/fff-fastd/Makefile                | 45 ++++++++++++++++++++++
>  .../files}/etc/hotplug.d/iface/50-fastdstart       |  0
>  .../fff/fff-fastd/files/usr/lib/micron.d/fff-fastd |  1 +
>  .../fff/fff-fastd/files/usr/sbin/fastdstart        |  4 +-
>  5 files changed, 49 insertions(+), 2 deletions(-)
>  delete mode 100644 bsp/default/root_file_system/usr/lib/micron.d/default
>  create mode 100644 src/packages/fff/fff-fastd/Makefile
>  rename {bsp/default/root_file_system => src/packages/fff/fff-fastd/files}/etc/hotplug.d/iface/50-fastdstart (100%)

wenn ich am fertig gebauten FW am Router in die File gucke, find ich
folgendes vor:

root at l2tptest:~# cat /etc/hotplug.d/iface/50-fastdstart
#!/bin/sh
[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && {
        sleep 3
        sh /etc/fastdstart.sh
}

(vorletzte Zeile ist die Interessante)

>  create mode 100644 src/packages/fff/fff-fastd/files/usr/lib/micron.d/fff-fastd

nur hast du die fastdstart.sh hierher verschoben:

>  rename bsp/default/root_file_system/etc/fastdstart.sh.tpl => src/packages/fff/fff-fastd/files/usr/sbin/fastdstart (98%)

root at l2tptest:~# cat /etc/fastdstart.sh
cat: can't open '/etc/fastdstart.sh': No such file or directory


root at l2tptest:/usr/sbin# cat /usr/sbin/fastdstart
#!/bin/sh

SERVER="no"
#SERVERNAME="--servername--"

. /etc/community.cfg
usw...


ich weiß nicht genau für was diese 50-fastdstart gut ist aber richtig
sieht das irgendwie nicht aus oder?

Funktionieren tut fastd (und der ganze Rest) aber anscheinend trotzdem
problemlos.

mfg

Christian

> 
> diff --git a/bsp/default/root_file_system/usr/lib/micron.d/default b/bsp/default/root_file_system/usr/lib/micron.d/default
> deleted file mode 100644
> index a5cebb0..0000000
> --- a/bsp/default/root_file_system/usr/lib/micron.d/default
> +++ /dev/null
> @@ -1 +0,0 @@
> -*/5 * * * * sleep $(/usr/bin/random 0 29); sh /etc/fastdstart.sh
> diff --git a/src/packages/fff/fff-fastd/Makefile b/src/packages/fff/fff-fastd/Makefile
> new file mode 100644
> index 0000000..26565e1
> --- /dev/null
> +++ b/src/packages/fff/fff-fastd/Makefile
> @@ -0,0 +1,45 @@
> +include $(TOPDIR)/rules.mk
> +
> +PKG_NAME:=fff-fastd
> +PKG_VERSION:=1
> +PKG_RELEASE:=1
> +
> +PKG_BUILD_DIR:=$(BUILD_DIR)/fff-fastd
> +
> +include $(INCLUDE_DIR)/package.mk
> +
> +define Package/fff-fastd
> +    SECTION:=base
> +    CATEGORY:=Freifunk
> +    TITLE:=Freifunk-Franken fastd
> +    URL:=http://www.freifunk-franken.de
> +    DEPENDS:=+ at BUSYBOX_CUSTOM \
> +             + at BUSYBOX_CONFIG_FEATURE_WGET_TIMEOUT \
> +             + at FASTD_ENABLE_METHOD_NULL \
> +             + at FASTD_ENABLE_CIPHER_NULL \
> +             + at FASTD_WITH_STATUS_SOCKET \
> +             +fastd
> +endef
> +
> +define Package/fff-batman-adv-legacy/description
> +    This is the fastd for the Freifunk Franken Firmware
> +    It is used to configure fastd.
> +endef
> +
> +define Build/Prepare
> +	echo "all: " > $(PKG_BUILD_DIR)/Makefile
> +endef
> +
> +define Build/Configure
> +	# nothing
> +endef
> +
> +define Build/Compile
> +	# nothing
> +endef
> +
> +define Package/fff-fastd/install
> +	$(CP) ./files/* $(1)/
> +endef
> +
> +$(eval $(call BuildPackage,fff-fastd))
> diff --git a/bsp/default/root_file_system/etc/hotplug.d/iface/50-fastdstart b/src/packages/fff/fff-fastd/files/etc/hotplug.d/iface/50-fastdstart
> similarity index 100%
> rename from bsp/default/root_file_system/etc/hotplug.d/iface/50-fastdstart
> rename to src/packages/fff/fff-fastd/files/etc/hotplug.d/iface/50-fastdstart
> diff --git a/src/packages/fff/fff-fastd/files/usr/lib/micron.d/fff-fastd b/src/packages/fff/fff-fastd/files/usr/lib/micron.d/fff-fastd
> new file mode 100644
> index 0000000..b0022e8
> --- /dev/null
> +++ b/src/packages/fff/fff-fastd/files/usr/lib/micron.d/fff-fastd
> @@ -0,0 +1 @@
> +*/5 * * * * sleep $(/usr/bin/random 0 29); sh /usr/sbin/fastdstart
> diff --git a/bsp/default/root_file_system/etc/fastdstart.sh.tpl b/src/packages/fff/fff-fastd/files/usr/sbin/fastdstart
> similarity index 98%
> rename from bsp/default/root_file_system/etc/fastdstart.sh.tpl
> rename to src/packages/fff/fff-fastd/files/usr/sbin/fastdstart
> index 5bb5165..611a3f8 100755
> --- a/bsp/default/root_file_system/etc/fastdstart.sh.tpl
> +++ b/src/packages/fff/fff-fastd/files/usr/sbin/fastdstart
> @@ -3,7 +3,9 @@
>  SERVER="no"
>  #SERVERNAME="--servername--"
>  
> -project="${VPN_PROJECT}"
> +. /etc/community.cfg
> +
> +project="$VPN_PROJECT"
>  
>  test_ipv4_host1="keyserver.freifunk-franken.de" # Freifunk-Franken keyserver
>  test_ipv4_host2="8.8.8.8"        # Google DNS
> 


-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : signature.asc
Dateityp    : application/pgp-signature
Dateigröße  : 819 bytes
Beschreibung: OpenPGP digital signature
URL         : <http://lists.freifunk.net/pipermail/franken-dev-freifunk.net/attachments/20160405/1428919e/attachment-0001.sig>


Mehr Informationen über die Mailingliste franken-dev