Message ID | 1459859465-2158-4-git-send-email-rlanghammer@web.de |
---|---|
State | Superseded, archived |
Headers | show |
diff --git a/src/packages/fff/fff-fastd/Makefile b/src/packages/fff/fff-fastd/Makefile deleted file mode 100644 index 4a7f770..0000000 --- a/src/packages/fff/fff-fastd/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=fff-fastd -PKG_VERSION:=1 -PKG_RELEASE:=2 - -PKG_BUILD_DIR:=$(BUILD_DIR)/fff-fastd - -include $(INCLUDE_DIR)/package.mk - -define Package/fff-fastd - SECTION:=base - CATEGORY:=Freifunk - TITLE:=Freifunk-Franken fastd configuration script - URL:=http://www.freifunk-franken.de - DEPENDS:=+@BUSYBOX_CUSTOM \ - +@BUSYBOX_CONFIG_FEATURE_WGET_TIMEOUT \ - +@FASTD_ENABLE_METHOD_NULL \ - +@FASTD_ENABLE_CIPHER_NULL \ - +@FASTD_WITH_STATUS_SOCKET \ - +fastd \ - +fff-random -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/src/packages/fff/fff-fastd/files/etc/hotplug.d/iface/50-fastdstart b/src/packages/fff/fff-fastd/files/etc/hotplug.d/iface/50-fastdstart deleted file mode 100755 index 8b435ea..0000000 --- a/src/packages/fff/fff-fastd/files/etc/hotplug.d/iface/50-fastdstart +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && { - sleep 3 - sh /etc/fastdstart.sh -} 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 deleted file mode 100644 index b0022e8..0000000 --- a/src/packages/fff/fff-fastd/files/usr/lib/micron.d/fff-fastd +++ /dev/null @@ -1 +0,0 @@ -*/5 * * * * sleep $(/usr/bin/random 0 29); sh /usr/sbin/fastdstart diff --git a/src/packages/fff/fff-fastd/files/usr/sbin/fastdstart b/src/packages/fff/fff-fastd/files/usr/sbin/fastdstart deleted file mode 100755 index 611a3f8..0000000 --- a/src/packages/fff/fff-fastd/files/usr/sbin/fastdstart +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/sh - -SERVER="no" -#SERVERNAME="--servername--" - -. /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 -test_ipv6_host1="heise.de" # heise Zeitschriftenverlag - -if [ "$SERVER" = "no" ]; then - test -f /tmp/started || exit -fi - -# Only do something with fastd when the router has internet connection -if ping -w5 -c3 "$test_ipv4_host1" &>/dev/null || - ping -w5 -c3 "$test_ipv4_host2" &>/dev/null || - ping6 -w5 -c3 "$test_ipv6_host1" &>/dev/null; then - mac=$(awk '{ mac=toupper($1); gsub(":", "", mac); print mac }' /sys/class/net/br-mesh/address 2>/dev/null) - if [ "$SERVER" = "no" ]; then - hostname=$(cat /proc/sys/kernel/hostname) - - if [ "$hostname" = "OpenWrt" ]; then - hostname="" - fi - - if [ "$hostname" = "" ]; then - hostname=$mac - fi - else - hostname=$SERVERNAME - fi - - if [ ! -d /etc/fastd ]; then - mkdir /etc/fastd - fi - - if [ ! -d /etc/fastd/$project ]; then - mkdir /etc/fastd/$project - - mkdir /tmp/fastd_${project}_peers - ln -s /tmp/fastd_${project}_peers /etc/fastd/$project/peers - echo "#!/bin/sh" > /etc/fastd/$project/up.sh - echo "ip link set up dev ${project}VPN" >> /etc/fastd/$project/up.sh - echo "echo enable > /sys/devices/virtual/net/${project}VPN/batman_adv/no_rebroadcast" >> /etc/fastd/$project/up.sh - echo "batctl if add ${project}VPN" >> /etc/fastd/$project/up.sh - chmod +x /etc/fastd/$project/up.sh - - secret=$(fastd --generate-key 2>&1 | grep -i secret | awk '{ print $2 }') - echo "include peers from \"/etc/fastd/$project/peers\";" >> /etc/fastd/${project}/${project}.conf - echo "log to syslog level warn;" >> /etc/fastd/${project}/${project}.conf - echo "method \"null\";" >> /etc/fastd/${project}/${project}.conf -# http://lists.nord-west.net/pipermail/freifunk-ol-dev/2013-July/000322.html -# echo "bind 0.0.0.0:10000;" >> /etc/fastd/${project}/${project}.conf - echo "interface \"${project}VPN\";" >> /etc/fastd/${project}/${project}.conf - echo "mtu 1426;" >> /etc/fastd/${project}/${project}.conf - echo "secret \"$secret\";" >> /etc/fastd/${project}/${project}.conf - echo "on up \"/etc/fastd/${project}/up.sh\";" >> /etc/fastd/${project}/${project}.conf - echo "secure handshakes no;" >> /etc/fastd/${project}/${project}.conf - fi - - if [ ! -d /tmp/fastd_${project}_peers ]; then - mkdir /tmp/fastd_${project}_peers - fi - - pubkey=$(fastd -c /etc/fastd/$project/$project.conf --show-key --machine-readable) -# port=666 - lat=$(uci get system.@system[0].latitude) - long=$(uci get system.@system[0].longitude) - -# fire up - if [ "$(/sbin/ifconfig -a | grep -i ethernet | grep $project)" = "" ]; then - /bin/rm /var/run/fastd.$project.pid - fastd -c /etc/fastd/$project/$project.conf -d --pid-file /var/run/fastd.$project.pid - fi - -# register - wget -T15 "http://keyserver.freifunk-franken.de/${project}/geo.php?mac=$mac&name=$hostname&port=$port&key=$pubkey&lat=$lat&long=$long" -O /tmp/fastd_${project}_output - - filenames=$(awk '/^####/ { gsub(/^####/, "", $0); gsub(/.conf/, "", $0); print $0; }' /tmp/fastd_${project}_output) - for file in $filenames; do - awk "{ if(a) print }; /^####$file.conf$/{a=1}; /^$/{a=0};" /tmp/fastd_${project}_output | sed 's/ float;/;/g' > /etc/fastd/$project/peers/$file - echo 'float yes;' >> /etc/fastd/$project/peers/$file - done - - #reload - kill -HUP $(cat /var/run/fastd.$project.pid) -else - echo "Der Router kann keine Verbindung zum Fastdserver aufbauen" - echo "$0 macht nichts!" -fi - -exit 0 -# vim: noexpandtab diff --git a/src/packages/fff/fff/Makefile b/src/packages/fff/fff/Makefile index 4c79ac2..d914872 100644 --- a/src/packages/fff/fff/Makefile +++ b/src/packages/fff/fff/Makefile @@ -19,7 +19,6 @@ define Package/fff-base +fff-web \ +fff-uradvd \ +fff-batman-adv-legacy \ - +fff-fastd \ +fff-firewall\ +fff-tunneldigger endef
Hi Ich halte es für keine gute Idee das ganze Package zu entfernen. Ich würde sogar gern den fastd support noch länger drin behalten. Ich wünsche mir die Freiheit eine Hood anzulegen, wo man auch anderen VPN's verwenden kann als fastd und tunneldigger. Es würde Sinn machen das Package so zu ändern, dass fastd nicht automatisch an ist. Ein vorheriges aktivieren könnte sinnvoll sein. Tim Am Dienstag, den 05.04.2016, 14:31 +0200 schrieb Robert Langhammer: > Signed-off-by: Robert Langhammer <rlanghammer@web.de> > --- > src/packages/fff/fff-fastd/Makefile | 46 ---------- > .../files/etc/hotplug.d/iface/50-fastdstart | 5 -- > .../fff/fff-fastd/files/usr/lib/micron.d/fff-fastd | 1 - > .../fff/fff-fastd/files/usr/sbin/fastdstart | 97 ---------------------- > src/packages/fff/fff/Makefile | 1 - > 5 files changed, 150 deletions(-) > delete mode 100644 src/packages/fff/fff-fastd/Makefile > delete mode 100755 src/packages/fff/fff-fastd/files/etc/hotplug.d/iface/50-fastdstart > delete mode 100644 src/packages/fff/fff-fastd/files/usr/lib/micron.d/fff-fastd > delete mode 100755 src/packages/fff/fff-fastd/files/usr/sbin/fastdstart > > diff --git a/src/packages/fff/fff-fastd/Makefile b/src/packages/fff/fff-fastd/Makefile > deleted file mode 100644 > index 4a7f770..0000000 > --- a/src/packages/fff/fff-fastd/Makefile > +++ /dev/null > @@ -1,46 +0,0 @@ > -include $(TOPDIR)/rules.mk > - > -PKG_NAME:=fff-fastd > -PKG_VERSION:=1 > -PKG_RELEASE:=2 > - > -PKG_BUILD_DIR:=$(BUILD_DIR)/fff-fastd > - > -include $(INCLUDE_DIR)/package.mk > - > -define Package/fff-fastd > - SECTION:=base > - CATEGORY:=Freifunk > - TITLE:=Freifunk-Franken fastd configuration script > - URL:=http://www.freifunk-franken.de > - DEPENDS:=+@BUSYBOX_CUSTOM \ > - +@BUSYBOX_CONFIG_FEATURE_WGET_TIMEOUT \ > - +@FASTD_ENABLE_METHOD_NULL \ > - +@FASTD_ENABLE_CIPHER_NULL \ > - +@FASTD_WITH_STATUS_SOCKET \ > - +fastd \ > - +fff-random > -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/src/packages/fff/fff-fastd/files/etc/hotplug.d/iface/50-fastdstart b/src/packages/fff/fff-fastd/files/etc/hotplug.d/iface/50-fastdstart > deleted file mode 100755 > index 8b435ea..0000000 > --- a/src/packages/fff/fff-fastd/files/etc/hotplug.d/iface/50-fastdstart > +++ /dev/null > @@ -1,5 +0,0 @@ > -#!/bin/sh > -[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && { > - sleep 3 > - sh /etc/fastdstart.sh > -} > 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 > deleted file mode 100644 > index b0022e8..0000000 > --- a/src/packages/fff/fff-fastd/files/usr/lib/micron.d/fff-fastd > +++ /dev/null > @@ -1 +0,0 @@ > -*/5 * * * * sleep $(/usr/bin/random 0 29); sh /usr/sbin/fastdstart > diff --git a/src/packages/fff/fff-fastd/files/usr/sbin/fastdstart b/src/packages/fff/fff-fastd/files/usr/sbin/fastdstart > deleted file mode 100755 > index 611a3f8..0000000 > --- a/src/packages/fff/fff-fastd/files/usr/sbin/fastdstart > +++ /dev/null > @@ -1,97 +0,0 @@ > -#!/bin/sh > - > -SERVER="no" > -#SERVERNAME="--servername--" > - > -. /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 > -test_ipv6_host1="heise.de" # heise Zeitschriftenverlag > - > -if [ "$SERVER" = "no" ]; then > - test -f /tmp/started || exit > -fi > - > -# Only do something with fastd when the router has internet connection > -if ping -w5 -c3 "$test_ipv4_host1" &>/dev/null || > - ping -w5 -c3 "$test_ipv4_host2" &>/dev/null || > - ping6 -w5 -c3 "$test_ipv6_host1" &>/dev/null; then > - mac=$(awk '{ mac=toupper($1); gsub(":", "", mac); print mac }' /sys/class/net/br-mesh/address 2>/dev/null) > - if [ "$SERVER" = "no" ]; then > - hostname=$(cat /proc/sys/kernel/hostname) > - > - if [ "$hostname" = "OpenWrt" ]; then > - hostname="" > - fi > - > - if [ "$hostname" = "" ]; then > - hostname=$mac > - fi > - else > - hostname=$SERVERNAME > - fi > - > - if [ ! -d /etc/fastd ]; then > - mkdir /etc/fastd > - fi > - > - if [ ! -d /etc/fastd/$project ]; then > - mkdir /etc/fastd/$project > - > - mkdir /tmp/fastd_${project}_peers > - ln -s /tmp/fastd_${project}_peers /etc/fastd/$project/peers > - echo "#!/bin/sh" > /etc/fastd/$project/up.sh > - echo "ip link set up dev ${project}VPN" >> /etc/fastd/$project/up.sh > - echo "echo enable > /sys/devices/virtual/net/${project}VPN/batman_adv/no_rebroadcast" >> /etc/fastd/$project/up.sh > - echo "batctl if add ${project}VPN" >> /etc/fastd/$project/up.sh > - chmod +x /etc/fastd/$project/up.sh > - > - secret=$(fastd --generate-key 2>&1 | grep -i secret | awk '{ print $2 }') > - echo "include peers from \"/etc/fastd/$project/peers\";" >> /etc/fastd/${project}/${project}.conf > - echo "log to syslog level warn;" >> /etc/fastd/${project}/${project}.conf > - echo "method \"null\";" >> /etc/fastd/${project}/${project}.conf > -# http://lists.nord-west.net/pipermail/freifunk-ol-dev/2013-July/000322.html > -# echo "bind 0.0.0.0:10000;" >> /etc/fastd/${project}/${project}.conf > - echo "interface \"${project}VPN\";" >> /etc/fastd/${project}/${project}.conf > - echo "mtu 1426;" >> /etc/fastd/${project}/${project}.conf > - echo "secret \"$secret\";" >> /etc/fastd/${project}/${project}.conf > - echo "on up \"/etc/fastd/${project}/up.sh\";" >> /etc/fastd/${project}/${project}.conf > - echo "secure handshakes no;" >> /etc/fastd/${project}/${project}.conf > - fi > - > - if [ ! -d /tmp/fastd_${project}_peers ]; then > - mkdir /tmp/fastd_${project}_peers > - fi > - > - pubkey=$(fastd -c /etc/fastd/$project/$project.conf --show-key --machine-readable) > -# port=666 > - lat=$(uci get system.@system[0].latitude) > - long=$(uci get system.@system[0].longitude) > - > -# fire up > - if [ "$(/sbin/ifconfig -a | grep -i ethernet | grep $project)" = "" ]; then > - /bin/rm /var/run/fastd.$project.pid > - fastd -c /etc/fastd/$project/$project.conf -d --pid-file /var/run/fastd.$project.pid > - fi > - > -# register > - wget -T15 "http://keyserver.freifunk-franken.de/${project}/geo.php?mac=$mac&name=$hostname&port=$port&key=$pubkey&lat=$lat&long=$long" -O /tmp/fastd_${project}_output > - > - filenames=$(awk '/^####/ { gsub(/^####/, "", $0); gsub(/.conf/, "", $0); print $0; }' /tmp/fastd_${project}_output) > - for file in $filenames; do > - awk "{ if(a) print }; /^####$file.conf$/{a=1}; /^$/{a=0};" /tmp/fastd_${project}_output | sed 's/ float;/;/g' > /etc/fastd/$project/peers/$file > - echo 'float yes;' >> /etc/fastd/$project/peers/$file > - done > - > - #reload > - kill -HUP $(cat /var/run/fastd.$project.pid) > -else > - echo "Der Router kann keine Verbindung zum Fastdserver aufbauen" > - echo "$0 macht nichts!" > -fi > - > -exit 0 > -# vim: noexpandtab > diff --git a/src/packages/fff/fff/Makefile b/src/packages/fff/fff/Makefile > index 4c79ac2..d914872 100644 > --- a/src/packages/fff/fff/Makefile > +++ b/src/packages/fff/fff/Makefile > @@ -19,7 +19,6 @@ define Package/fff-base > +fff-web \ > +fff-uradvd \ > +fff-batman-adv-legacy \ > - +fff-fastd \ > +fff-firewall\ > +fff-tunneldigger > endef > -- > 2.8.0.rc3 >
Signed-off-by: Robert Langhammer <rlanghammer@web.de> --- src/packages/fff/fff-fastd/Makefile | 46 ---------- .../files/etc/hotplug.d/iface/50-fastdstart | 5 -- .../fff/fff-fastd/files/usr/lib/micron.d/fff-fastd | 1 - .../fff/fff-fastd/files/usr/sbin/fastdstart | 97 ---------------------- src/packages/fff/fff/Makefile | 1 - 5 files changed, 150 deletions(-) delete mode 100644 src/packages/fff/fff-fastd/Makefile delete mode 100755 src/packages/fff/fff-fastd/files/etc/hotplug.d/iface/50-fastdstart delete mode 100644 src/packages/fff/fff-fastd/files/usr/lib/micron.d/fff-fastd delete mode 100755 src/packages/fff/fff-fastd/files/usr/sbin/fastdstart