Adjust some old scripts to gluon (TODO: reimplement backwards compatiblity)

This commit is contained in:
Matthias Schiffer 2013-09-28 21:45:04 +02:00
parent cd7c703b99
commit df84149325
10 changed files with 14 additions and 113 deletions

View File

@ -1,16 +0,0 @@
#!/bin/sh
[ -r /etc/config/ffhl ] || exit 0
cp /etc/config/ffhl /etc/config/config_mode
mv /etc/config/ffhl /etc/config/freifunk
uci -q batch <<EOF
delete config_mode.@bandwidth[0]
commit config_mode
delete freifunk.@wizard[0]
commit freifunk
EOF

View File

@ -1,18 +0,0 @@
#!/bin/sh
get_main_address() {
case "$board" in
tl-wdr3600|tl-wdr4300)
uci get wireless.radio1.macaddr
;;
*)
uci get wireless.radio0.macaddr
;;
esac
}
uci set network.freifunk.proto='none'
uci set network.freifunk.auto='1'
uci set network.freifunk.accept_ra='1'
uci set network.freifunk.macaddr=$(get_main_address)
uci commit network

View File

@ -1,6 +0,0 @@
#!/bin/sh
uci -q batch <<EOF
set wireless.wifi_freifunk.ssid='luebeck.freifunk.net'
commit wireless
EOF

View File

@ -1,9 +0,0 @@
#!/bin/sh
uci -q batch <<EOF
delete fastd.ffhl_mesh_vpn.config
add_list fastd.ffhl_mesh_vpn.config=/lib/freifunk/mesh-vpn-up.conf
commit fastd
EOF

View File

@ -1,6 +0,0 @@
#!/bin/sh
if [ "$(md5sum /etc/avahi/avahi-daemon.conf | cut -d ' ' -f 1)" = e63b3d69311b496c0a06555ea04bc20b ]; then
cp /rom/etc/avahi/avahi-daemon.conf /etc/avahi/avahi-daemon.conf
fi

View File

@ -1,33 +0,0 @@
#!/bin/sh
uci rename fastd.ffhl_mesh_vpn=mesh_vpn
bind="$(uci -q get fastd.mesh_vpn.bind)"
uci -q delete fastd.mesh_vpn.bind
if [ "$bind" -a "$bind" != '0.0.0.0' ]; then
uci add_list fastd.mesh_vpn.bind="$bind"
fi
method="$(uci -q get fastd.mesh_vpn.method)"
uci -q delete fastd.mesh_vpn.method
if [ "$method" ]; then
uci add_list fastd.mesh_vpn.method="$method"
fi
uci -q batch <<EOF
set fastd.mesh_vpn.interface=mesh-vpn
delete fastd.mesh_vpn.config
add_list fastd.mesh_vpn.config=/lib/freifunk/mesh-vpn/fastd.conf
delete fastd.mesh_vpn.config_peer_dir
add_list fastd.mesh_vpn.config_peer_dir=/etc/fastd/mesh-vpn/peers
commit fastd
EOF

View File

@ -1,11 +0,0 @@
#!/bin/sh
(
cd /etc/fastd/ffhl-mesh-vpn/peers
rm -f burgtor holstentor muehlentor huextertor
mv * /etc/fastd/mesh-vpn/peers/ 2>/dev/null || true
)
rmdir -p /etc/fastd/ffhl-mesh-vpn/peers 2>/dev/null || true

View File

@ -34,7 +34,7 @@ EOF
esac
uci -q batch <<EOF
set system.@system[0].hostname='Freifunk-${macaddr//:/}'
set system.@system[0].hostname='gluon-${macaddr//:/}'
set system.@system[0].timezone='CET-1CEST,M3.5.0,M10.5.0/3'
commit system
EOF

View File

@ -13,12 +13,12 @@ set network.wan.proto='dhcp'
set network.wan.accept_ra='0'
set network.wan.auto='1'
set network.freifunk='interface'
set network.freifunk.ifname='$lan_ifname bat0'
set network.freifunk.type='bridge'
set network.freifunk.proto='none'
set network.freifunk.auto='1'
set network.freifunk.accept_ra='1'
set network.client='interface'
set network.client.ifname='$lan_ifname bat0'
set network.client.type='bridge'
set network.client.proto='none'
set network.client.auto='1'
set network.client.accept_ra='1'
set network.mesh='interface'
set network.mesh.proto='batadv'
@ -48,7 +48,7 @@ local b2mask=0x02
local vpnaddr=$(printf "%02x:%s:%s:%02x:%s:%s" $(( 0x$1 | $b2mask )) $2 $3 $(( (0x$4 + 1) % 0x100 )) $5 $6)
uci set network.freifunk.macaddr="$mainaddr"
uci set network.client.macaddr="$mainaddr"
uci set network.mesh_vpn.macaddr="$vpnaddr"
case "$board" in

View File

@ -5,14 +5,14 @@ delete wireless.radio0.disabled
delete wireless.@wifi-iface[0]
set wireless.radio0.channel='@wifi24.channel@'
set wireless.radio0.htmode='HT40+'
set wireless.radio0.htmode='@wifi24.htmode@'
set wireless.radio0.country='DE'
set wireless.wifi_freifunk='wifi-iface'
set wireless.wifi_freifunk.device='radio0'
set wireless.wifi_freifunk.network='freifunk'
set wireless.wifi_freifunk.mode='ap'
set wireless.wifi_freifunk.ssid='@wifi24.ssid@'
set wireless.wifi_client='wifi-iface'
set wireless.wifi_client.device='radio0'
set wireless.wifi_client.network='client'
set wireless.wifi_client.mode='ap'
set wireless.wifi_client.ssid='@wifi24.ssid@'
set wireless.wifi_mesh='wifi-iface'
set wireless.wifi_mesh.device='radio0'