forked from freifunk-franken/firmware
Remove references to community.cfg
This removes all references to community.cfg except in the buildscript and except the file itself. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
parent
235644be8d
commit
6463e2d2cf
|
@ -1,28 +1,27 @@
|
|||
/etc/init.d/fastd disable
|
||||
#!/bin/sh
|
||||
|
||||
. /etc/community.cfg
|
||||
project="$VPN_PROJECT"
|
||||
/etc/init.d/fastd disable
|
||||
|
||||
>/etc/config/fastd
|
||||
|
||||
uci batch <<EOF
|
||||
set fastd.${project}='fastd'
|
||||
set fastd.${project}.enabled='1'
|
||||
set fastd.${project}.config_peer_dir="/etc/fastd/${project}/peers"
|
||||
set fastd.${project}.syslog_level='warn'
|
||||
set fastd.${project}.method='null'
|
||||
set fastd.${project}.mode='tap'
|
||||
set fastd.${project}.interface="${project}VPN"
|
||||
set fastd.${project}.mtu='1426'
|
||||
set fastd.${project}.on_up="/etc/fastd/${project}/up.sh"
|
||||
set fastd.${project}.secure_handshakes='0'
|
||||
set fastd.${project}.secret="generate"
|
||||
set fastd.fff='fastd'
|
||||
set fastd.fff.enabled='1'
|
||||
set fastd.fff.config_peer_dir="/etc/fastd/fff/peers"
|
||||
set fastd.fff.syslog_level='warn'
|
||||
set fastd.fff.method='null'
|
||||
set fastd.fff.mode='tap'
|
||||
set fastd.fff.interface="fffVPN"
|
||||
set fastd.fff.mtu='1426'
|
||||
set fastd.fff.on_up="/etc/fastd/fff/up.sh"
|
||||
set fastd.fff.secure_handshakes='0'
|
||||
set fastd.fff.secret="generate"
|
||||
EOF
|
||||
|
||||
[ ! -d /etc/fastd/${project} ] && mkdir -p /etc/fastd/${project}
|
||||
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
|
||||
[ ! -d /etc/fastd/fff ] && mkdir -p /etc/fastd/fff
|
||||
ln -s /tmp/fastd_fff_peers /etc/fastd/fff/peers
|
||||
echo "#!/bin/sh" > /etc/fastd/fff/up.sh
|
||||
echo "ip link set up dev fffVPN" >> /etc/fastd/fff/up.sh
|
||||
echo "echo enable > /sys/devices/virtual/net/fffVPN/batman_adv/no_rebroadcast" >> /etc/fastd/fff/up.sh
|
||||
echo "batctl if add fffVPN" >> /etc/fastd/fff/up.sh
|
||||
chmod +x /etc/fastd/fff/up.sh
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
# Copyright 2017 Adrian Schmutzler
|
||||
# License GPLv3
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
getUpgradePath() {
|
||||
if [ -s /tmp/keyxchangev2data ]; then
|
||||
json_load "$(cat /tmp/keyxchangev2data)"
|
||||
json_select hood
|
||||
json_get_var upath upgrade_path
|
||||
echo "$upath"
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
. /lib/functions/fff/wireless
|
||||
. /lib/functions/fff/timeserver
|
||||
|
||||
rm -f /tmp/keyxchangev2data
|
||||
|
||||
|
@ -121,6 +122,7 @@ if [ -s /tmp/keyxchangev2data ]; then
|
|||
json_get_var mesh_bssid mesh_bssid
|
||||
json_get_var mesh_essid mesh_essid
|
||||
json_get_var essid essid
|
||||
json_get_var ntpip ntp_ip
|
||||
# i think the next things we don't active this in the first version! we can do it later
|
||||
#json_get_var channel2 channel2
|
||||
#json_get_var mode2 mode2
|
||||
|
@ -162,6 +164,10 @@ if [ -s /tmp/keyxchangev2data ]; then
|
|||
echo "Loading wifi"
|
||||
wifi
|
||||
|
||||
oldntp="$(uci -q get system.ntp.server)"
|
||||
newntp="${ntpip}" # requires routable address, no link-local
|
||||
[ "$newntp" = "$oldntp" ] || setTimeserver "${newntp}" # only rewrite if changed
|
||||
|
||||
# copy the file to webroot so that other Meshrouter can download it;
|
||||
# copy only after all other steps so IF can be reentered if something goes wrong
|
||||
cp /tmp/keyxchangev2data /www/public/
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
. /etc/community.cfg
|
||||
. /etc/firmware_release
|
||||
|
||||
board_name=$(uci -q get board.model.name)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=fff-sysupgrade
|
||||
PKG_VERSION:=0.0.4
|
||||
PKG_VERSION:=5
|
||||
PKG_RELEASE:=4
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-sysupgrade
|
||||
|
@ -13,7 +13,7 @@ define Package/fff-sysupgrade
|
|||
CATEGORY:=Freifunk
|
||||
TITLE:=Freifunk-Franken sysupgrade
|
||||
URL:=http://www.freifunk-franken.de
|
||||
DEPENDS:=+fff-boardname +@BUSYBOX_CONFIG_WGET
|
||||
DEPENDS:=+fff-boardname +fff-hoods +@BUSYBOX_CONFIG_WGET
|
||||
endef
|
||||
|
||||
define Package/fff-sysupgrade/description
|
||||
|
|
|
@ -1,9 +1,16 @@
|
|||
#!/bin/sh
|
||||
cd /tmp/
|
||||
|
||||
. /lib/functions/fff/keyxchange
|
||||
. /etc/firmware_release
|
||||
|
||||
. /etc/community.cfg
|
||||
UPGRADE_PATH="$(getUpgradePath)"
|
||||
|
||||
if [ -z "$UPGRADE_PATH" ]; then
|
||||
echo "Upgrade path not set! Aborting."
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BOARD=$(uci get board.model.name)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=fff-timeserver
|
||||
PKG_VERSION:=0.0.1
|
||||
PKG_VERSION:=2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-timeserver
|
||||
|
|
3
src/packages/fff/fff-timeserver/files/etc/uci-defaults/51-fff-timeserver
Executable file → Normal file
3
src/packages/fff/fff-timeserver/files/etc/uci-defaults/51-fff-timeserver
Executable file → Normal file
|
@ -1,9 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
. /lib/functions/fff/timeserver
|
||||
. /etc/community.cfg
|
||||
|
||||
setTimeserver "${NTPD_IP}"
|
||||
# No initialization here, this is done in configurehood
|
||||
|
||||
uci -q set "system.@system[0].timezone=CET-1CEST,M3.5.0,M10.5.0/3"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user