diff --git a/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile b/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile index 8c80802784e8d4ba03b5ddb3a0bf5694a01b17a7..89af84c823590b27facb27b5c65cb79c5837de3c 100644 --- a/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile +++ b/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile @@ -94,10 +94,10 @@ getGatewayHoodfile() { } getKeyserverHoodfile() { - if [ $# == 1 ]; then + if [ $# = 1 ]; then lat=$(uci -q get fff.system.latitude) long=$(uci -q get fff.system.longitude) - elif [ $# == 3 ]; then + elif [ $# = 3 ]; then lat=$2 long=$3 else diff --git a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood index 00e36418d6c17fe62363ec145fb86aca3760a040..57c6f9f7b9fbfa853a1497828a53b4d89646a78c 100755 --- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood +++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood @@ -158,16 +158,16 @@ if [ -s "$hoodfiletmp" ]; then exit 1 fi - # add 802.11s mesh if type == "802.11s" - if ( [ -n "$radio5" ] && [ "$mesh_type5" == "802.11s" ] ) || [ "$mesh_type2" == "802.11s" ]; then + # add 802.11s mesh if type = "802.11s" + if ( [ -n "$radio5" ] && [ "$mesh_type5" = "802.11s" ] ) || [ "$mesh_type2" = "802.11s" ]; then if ! wifiAddMesh "$radio" "$mesh_id"; then echo "Can't add Mesh interface on $radio." exit 1 fi fi - # add IBSS mesh if type == "ibss" - if ( [ -n "$radio5" ] && [ "$mesh_type5" == "ibss" ] ) || [ "$mesh_type2" == "ibss" ]; then + # add IBSS mesh if type = "ibss" + if ( [ -n "$radio5" ] && [ "$mesh_type5" = "ibss" ] ) || [ "$mesh_type2" = "ibss" ]; then if ! wifiAddAdHocMesh "$radio" "$mesh_essid" "$mesh_bssid"; then echo "Can't add AdHocMesh interface on $radio." exit 1 diff --git a/src/packages/fff/fff-vpn-select/files/usr/sbin/vpn-select b/src/packages/fff/fff-vpn-select/files/usr/sbin/vpn-select index 135c0633d261c53af36df4205a515ae31337082b..7c9bced3bb0d42d39cdb58340d7d0ec77622abda 100755 --- a/src/packages/fff/fff-vpn-select/files/usr/sbin/vpn-select +++ b/src/packages/fff/fff-vpn-select/files/usr/sbin/vpn-select @@ -15,7 +15,7 @@ json_select vpn while json_select "$Index" > /dev/null do json_get_var protocol protocol - if [ "$protocol" == "fastd" ]; then + if [ "$protocol" = "fastd" ]; then json_get_var servername name filename="/etc/fastd/fff/peers/$servername" echo "#name \"${servername}\";" > "$filename" diff --git a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/header b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/header index d149c044819f1c65d0bffe70310885af0f368e98..b9ca1b61bfb49e3ea1814ef87343f7e3fa1a6c0b 100755 --- a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/header +++ b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/header @@ -9,7 +9,7 @@ UPGRADE_PATH="$(getUpgradePath)" echo -en "Content-Type: text/html\r\n\r\n" nav_entry() { script_file="/cgi-bin/$1" - if [ "$script_file" == "$REQUEST_URI" ] ; then + if [ "$script_file" = "$REQUEST_URI" ] ; then local class_active=' class="active"' fi echo -ne "\t<li${class_active}><a href=\"${script_file}\">$2</a></li>\n\t\t" diff --git a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/home.html b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/home.html index bc15df70ef7efd909bb9858ee7568b9bd64f716c..45b618d4a2dec11ee3952b24f319e3b1ff54cb4f 100755 --- a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/home.html +++ b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/home.html @@ -5,7 +5,7 @@ . /lib/functions/fff/evalhoodinfo # prepare -if [ "$REQUEST_METHOD" == "POST" ] ; then +if [ "$REQUEST_METHOD" = "POST" ] ; then if [ "$POST_resethood" != "" ] ; then # reset hood rm "$hoodfileref" 2> /dev/null diff --git a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/password.html b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/password.html index d3287bf9e935e8b91941c601238be81afaf8e472..fc3055a91908c7dc314a5a1a6edde879b2560355 100755 --- a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/password.html +++ b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/password.html @@ -2,10 +2,10 @@ <% # write -if [ "$REQUEST_METHOD" == "POST" ] ; then +if [ "$REQUEST_METHOD" = "POST" ] ; then #check for special characters in password regex='^[a-zA-Z0-9!#\$%\(\)\*\+,\.:;=\?@\^_-]+$' - if [ "$POST_pass1" == "" ] ; then + if [ "$POST_pass1" = "" ] ; then MSG='<span class="red">Das Passwort darf nicht leer sein!</span>' elif ! echo -n "$POST_pass1" | egrep -q "$regex"; then MSG='<span class="red">Passwort enthält ungültige Zeichen!</span>' @@ -46,7 +46,7 @@ fi <%in /www/ssl/cgi-bin/footer %> <% #force instant password change -if [ "$restart_uhttpd" == "1" ] ; then +if [ "$restart_uhttpd" = "1" ] ; then /etc/init.d/uhttpd restart 2>/dev/null fi %> diff --git a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/ports.html b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/ports.html index 5912126f66cade2ed5751db3ec06f2adc0c5bf24..01506fce0e4e51f87e39e6b8fbad87b05f2c9462 100755 --- a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/ports.html +++ b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/ports.html @@ -3,7 +3,7 @@ <% board_name=$(uci -q get board.model.name) # write -if [ "$REQUEST_METHOD" == "POST" ] ; then +if [ "$REQUEST_METHOD" = "POST" ] ; then if [ "$POST_change_mode" != "" ] ; then sed -i '/^.*# set via WebUI/d' /etc/network.config echo "ETHMODE=\"${POST_mode}\" # set via WebUI" >> /etc/network.config @@ -45,7 +45,7 @@ format_state() { format_port() { port=$(echo "$1" | sed 's/.* port:\([^ ]*\) .*/\1/') link=$(echo "$1" | sed 's/.* link:\([^ ]*\).*/\1/') - if [ "$link" == "up" ] ; then + if [ "$link" = "up" ] ; then speed=$(echo "$1" | sed 's/.* speed:\([^ ]*\).*/\1/') duplex=$(echo "$1" | sed 's/.* \([^ ]*-duplex\).*/\1/') else @@ -95,7 +95,7 @@ format_port() { if [ ! "$(awk -F= '/WANDEV=/ { print $2 }' /etc/network.$board_name)" = "$(awk -F= '/SWITCHDEV=/ { print $2 }' /etc/network.$board_name)" ] ; then wanif=$(uci -q get network.wan.ifname) link=$(cat /sys/class/net/${wanif}/operstate) - if [ "$link" == "up" ] ; then + if [ "$link" = "up" ] ; then speed="connected" else speed="no link" @@ -166,10 +166,10 @@ format_port() { <th style="width: 1em;">Anschluss Modus:</th> <td> <select name="mode"> - <option value="BATMAN" <% [ "$ETHMODE" == "BATMAN" ] && echo -n 'selected="selected" ' %>>BATMAN</option> - <option value="CLIENT" <% [ "$ETHMODE" == "CLIENT" ] && echo -n 'selected="selected" ' %>>CLIENT</option> + <option value="BATMAN" <% [ "$ETHMODE" = "BATMAN" ] && echo -n 'selected="selected" ' %>>BATMAN</option> + <option value="CLIENT" <% [ "$ETHMODE" = "CLIENT" ] && echo -n 'selected="selected" ' %>>CLIENT</option> <% if grep -q "ONE_PORT" "/etc/network.$board_name" ; then %> - <option value="WAN" <% [ "$ETHMODE" == "WAN" ] && echo -n 'selected="selected" ' %>>WAN</option> + <option value="WAN" <% [ "$ETHMODE" = "WAN" ] && echo -n 'selected="selected" ' %>>WAN</option> <% fi %> </select> </td> @@ -207,16 +207,16 @@ format_port() { <tr> <td> <select name="mode0"> - <option value="BATMAN" <% [ "$LAN0MODE" == "BATMAN" ] && echo -n 'selected="selected" ' %>>BATMAN</option> - <option value="CLIENT" <% [ "$LAN0MODE" == "CLIENT" ] && echo -n 'selected="selected" ' %>>CLIENT</option> - <option value="WAN" <% [ "$LAN0MODE" == "WAN" ] && echo -n 'selected="selected" ' %>>WAN</option> + <option value="BATMAN" <% [ "$LAN0MODE" = "BATMAN" ] && echo -n 'selected="selected" ' %>>BATMAN</option> + <option value="CLIENT" <% [ "$LAN0MODE" = "CLIENT" ] && echo -n 'selected="selected" ' %>>CLIENT</option> + <option value="WAN" <% [ "$LAN0MODE" = "WAN" ] && echo -n 'selected="selected" ' %>>WAN</option> </select> </td> <td> <select name="mode1"> - <option value="BATMAN" <% [ "$LAN1MODE" == "BATMAN" ] && echo -n 'selected="selected" ' %>>BATMAN</option> - <option value="CLIENT" <% [ "$LAN1MODE" == "CLIENT" ] && echo -n 'selected="selected" ' %>>CLIENT</option> - <option value="WAN" <% [ "$LAN1MODE" == "WAN" ] && echo -n 'selected="selected" ' %>>WAN</option> + <option value="BATMAN" <% [ "$LAN1MODE" = "BATMAN" ] && echo -n 'selected="selected" ' %>>BATMAN</option> + <option value="CLIENT" <% [ "$LAN1MODE" = "CLIENT" ] && echo -n 'selected="selected" ' %>>CLIENT</option> + <option value="WAN" <% [ "$LAN1MODE" = "WAN" ] && echo -n 'selected="selected" ' %>>WAN</option> </select> </td> <td><input type="submit" name="change_twoport" /></td> @@ -240,7 +240,7 @@ format_port() { <%in /www/ssl/cgi-bin/footer %> <% # write -if [ "$do_reboot" == "1" ] ; then +if [ "$do_reboot" = "1" ] ; then reboot fi %> diff --git a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/reboot.html b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/reboot.html index eddc4ff6482bcd6d0fcf9578df249bde072e9fdd..2efdf3ecd57d2cb4e02a82414b4227b51c033f0a 100755 --- a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/reboot.html +++ b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/reboot.html @@ -2,7 +2,7 @@ <% # prepare -if [ "$REQUEST_METHOD" == "POST" ] ; then +if [ "$REQUEST_METHOD" = "POST" ] ; then if [ "$POST_reboot" != "" ] ; then do_reboot=1 MSG='<span class="green">Router wird neugestartet...</span>' @@ -29,7 +29,7 @@ fi <%in /www/ssl/cgi-bin/footer %> <% # write -if [ "$do_reboot" == "1" ] ; then +if [ "$do_reboot" = "1" ] ; then reboot fi %> diff --git a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/settings.html b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/settings.html index cfb3a6b76165a2d6e33173de0834b2d3b25df0e8..7dd5eed1ffa7ce3b534cf06fdac41458a14cc8fb 100755 --- a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/settings.html +++ b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/settings.html @@ -2,7 +2,7 @@ <% # write -if [ "$REQUEST_METHOD" == "POST" ] ; then +if [ "$REQUEST_METHOD" = "POST" ] ; then #check for valid hostname as specified in rfc 1123 #see http://stackoverflow.com/a/3824105 regex='^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])' @@ -24,7 +24,7 @@ if [ "$REQUEST_METHOD" == "POST" ] ; then # Bitratenbegrenzung uci -q get "fff.trafficcontrol" > /dev/null || uci -q set fff.trafficcontrol=fff - if [ "$POST_traffic_limit" == "on" ] ; then + if [ "$POST_traffic_limit" = "on" ] ; then uci -q set "fff.trafficcontrol.enabled=1" uci -q set "simple-tc.example.enabled=1" else @@ -40,7 +40,7 @@ if [ "$REQUEST_METHOD" == "POST" ] ; then # Restliche Einstellungen uci -q set "fff.notifyupdate=webui" - if [ "$POST_upgrade_notification" == "on" ] ; then + if [ "$POST_upgrade_notification" = "on" ] ; then uci -q set "fff.notifyupdate.value=1" else uci -q set "fff.notifyupdate.value=0" @@ -50,7 +50,7 @@ if [ "$REQUEST_METHOD" == "POST" ] ; then if uci -q get system.poe_passthrough > /dev/null ; then uci -q set "fff.poe_passthrough=fff" - if [ "$POST_poe_passthrough" == "on" ] ; then + if [ "$POST_poe_passthrough" = "on" ] ; then uci -q set "fff.poe_passthrough.active=1" uci -q set "system.poe_passthrough.value=1" else @@ -70,12 +70,12 @@ fi <% # read chkd='checked="checked" ' -if [ "$(uci -q get 'fff.trafficcontrol.enabled')" == "1" ] ; then # not set=0 +if [ "$(uci -q get 'fff.trafficcontrol.enabled')" = "1" ] ; then # not set=0 traffic_checked="$chkd" else traffic_checked="" fi -if [ "$(uci -q get 'fff.notifyupdate.value')" == "0" ] ; then # not set=1 +if [ "$(uci -q get 'fff.notifyupdate.value')" = "0" ] ; then # not set=1 upgrade_checked="" else upgrade_checked="$chkd" @@ -122,7 +122,7 @@ fi <% if uci -q get system.poe_passthrough > /dev/null ; then - if [ "$(uci -q get 'fff.poe_passthrough.active')" == "1" ] ; then # not set=0 + if [ "$(uci -q get 'fff.poe_passthrough.active')" = "1" ] ; then # not set=0 poe_pt_checked="$chkd" else poe_pt_checked="" diff --git a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/upgrade.html b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/upgrade.html index af460237217452e057e7e0b0da3aa3f2ec0c2aff..9762edc30245e695b4f725d2ce64958657602489 100755 --- a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/upgrade.html +++ b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/upgrade.html @@ -2,10 +2,10 @@ <% # prepare -if [ "$REQUEST_METHOD" == "POST" ] ; then +if [ "$REQUEST_METHOD" = "POST" ] ; then if [ "$POST_reset" != "" ] ; then # reset - if [ "$FORM_really_reset" == "on" ] ; then + if [ "$FORM_really_reset" = "on" ] ; then do_reset=1 MSG='<span class="green">Router wird zurückgesetzt und anschließend neugestartet...</span>' fi @@ -13,12 +13,12 @@ if [ "$REQUEST_METHOD" == "POST" ] ; then # upgrade if [ ! -f "$HASERL_firmware_path" ] ; then MSG='<span class="red">Firmware Datei nicht gefunden!</span>' - elif [ "$(du -k "$HASERL_firmware_path" | cut -f1)" == "0" ] ; then + elif [ "$(du -k "$HASERL_firmware_path" | cut -f1)" = "0" ] ; then MSG='<span class="red">Firmware Datei ist leer!</span>' elif ! error=$(sysupgrade -T "$HASERL_firmware_path") ; then MSG="<span class=\"red\">Firmware Datei ungültig: <tt>${error}</tt></span>" else - if [ "$POST_keep_config" == "on" ] ; then + if [ "$POST_keep_config" = "on" ] ; then args="" else args="-n" @@ -63,12 +63,12 @@ fi <%in /www/ssl/cgi-bin/footer %> <% # write -if [ "$do_reset" == "1" ] ; then +if [ "$do_reset" = "1" ] ; then echo "<pre>" echo y | firstboot reboot echo "</pre>" -elif [ "$do_sysupgrade" == "1" ] ; then +elif [ "$do_sysupgrade" = "1" ] ; then echo "<pre>" echo "# sysupgrade $args $HASERL_firmware_path" sysupgrade $args $HASERL_firmware_path