#!/bin/bash # include modpatch function . ${include_modpatch} for FILE in "menus/menu2_usb.inc" "home/menu2_usb.html"; do echo2 " -- removing /usr/www/${HTML}/${avm_Lang}/$FILE" rm -rf "$1"/usr/www/${HTML}/${avm_Lang}/$FILE done #the following removes work on all versions #remove usb item .80 ##sed -i -e "/usbhost/d" "$1"/usr/www/${HTML}/${avm_Lang}/home/home.html ##grep -q "usbhost" "$1"/usr/www/${HTML}/${avm_Lang}/home/home.html && echo2 " -- usb menu entry not removed on: /usr/www/${HTML}/${avm_Lang}/home/home.html" #the following removes work on all versions sed -i -e "/Usb/d" "$1"/usr/www/${HTML}/${avm_Lang}/home/home.html sed -i -e "/txt036/d" "$1"/usr/www/${HTML}/${avm_Lang}/home/home.html sed -i -e "/^.*$/{N;/^.*\n.*<.tr>$/d}" "$1"/usr/www/${HTML}/${avm_Lang}/home/home.html grep -q "Usb" "$1"/usr/www/${HTML}/${avm_Lang}/home/home.html && echo2 " -- usb menu entry not removed on: /usr/www/${HTML}/${avm_Lang}/home/home.html" #remove usb item .80 ##sed -i -e "/usbdisk_cut/d" "$1"/usr/www/${HTML}/${avm_Lang}/menus/menu2_homehome.html #remove usb item sed -i -e "/'status'/d" "$1"/usr/www/${HTML}/${avm_Lang}/menus/menu2_homehome.html #87 Menu is not lua jet sed -i -e '/<.li>/,$ s/.*//' "$1"/usr/www/${HTML}/${avm_Lang}/menus/menu2_net.html grep -q "status" "$1"/usr/www/${HTML}/${avm_Lang}/menus/menu2_net.html || echo2 " -- usb menu entry not removed on: /usr/www/${HTML}/${avm_Lang}/menus/menu2_net.html" #the following removes are diffent on newer versions for ITEM in fon home konfig internet wlan system software; do if [ -w "$1"/usr/www/${HTML}/${avm_Lang}/menus/menu2_$ITEM.html ]; then # echo2 " /usr/www/${HTML}/${avm_Lang}/menus/menu2_$ITEM.html" #remove usb menu item sed -i -e "s//" "$1"/usr/www/${HTML}/${avm_Lang}/menus/menu2_$ITEM.html grep -q "nousb" "$1"/usr/www/${HTML}/${avm_Lang}/menus/menu2_$ITEM.html && echo2 " -- usb menu entry removed from /usr/www/${HTML}/${avm_Lang}/menus/menu2_$ITEM.html" #remove software menu item fi done echo "-- removing GUI USB-entrys ..." #remove enhsettings usb item .80 [ -f "$1"/usr/www/${HTML}/${avm_Lang}/enhsettings/enhsettings.js ] && sed -i -e "s///" "$1"/usr/www/${HTML}/${avm_Lang}/enhsettings/enhsettings.js #remove enhsettings usb item [ -f "$1"/usr/www/${HTML}/${avm_Lang}/enhsettings/enhsettings.html ] && sed -i -e "s///" "$1"/usr/www/${HTML}/${avm_Lang}/enhsettings/enhsettings.html #remove sitemap usb item ok [ -f "$1"/usr/www/${HTML}/${avm_Lang}/home/sitemap.html ] && sed -i -e "/'usb', 'status'/d" "$1"/usr/www/${HTML}/${avm_Lang}/home/sitemap.html [ -f "$1"/usr/www/${HTML}/${avm_Lang}/home/sitemap.html ] && sed -i -e "s///" "$1"/usr/www/${HTML}/${avm_Lang}/home/sitemap.html ## remove usb tab entrys # /usr/www/${HTML}/${avm_Lang}/system/syslog.html # echo2 " /usr/www/${HTML}/${avm_Lang}/system/syslog.html" sed -i -e "/
$/d" "$1"/usr/www/${HTML}/${avm_Lang}/system/syslog.html sed -i -e "/USB-Zubeh.r/d" "$1"/usr/www/${HTML}/${avm_Lang}/system/syslog.html sed -i -e "/Tabs(3)/d" "$1"/usr/www/${HTML}/${avm_Lang}/system/syslog.html ########################################### ## remove usb entrys in energysaving optio if [ -e "$1"/usr/www/${HTML}/${avm_Lang}/system/energy.html ]; then if `cat "$1"/usr/www/${HTML}/${avm_Lang}/system/energy.html | grep -q 'usbleft_val'` ; then echo2 " /usr/www/${HTML}/${avm_Lang}/system/energy.html" sed -i -e "/\$var:Text23 /,/class=\"backdialog\"/d" "$1"/usr/www/${HTML}/${avm_Lang}/system/energy.html #.49 version sed -i -e "/\$var:TextUSBZubehoer /,/class=\"backdialog\"/d" "$1"/usr/www/${HTML}/${avm_Lang}/system/energy.html sed -i -e "/USB-/,/class=\"backdialog\"/d" "$1"/usr/www/${HTML}/${avm_Lang}/system/energy.html # all in one echo2 " /usr/www/${HTML}/${avm_Lang}/system/energy.js" #.80 version if `cat "$1"/usr/www/${HTML}/${avm_Lang}/system/energy.js | grep -q "SetPowerDisplay('usb"` ; then sed -i -e '/function SetPowerDisplay/i\ __Marker__\ }' "$1"/usr/www/${HTML}/${avm_Lang}/system/energy.js sed -i -e "/SetPowerDisplay('usb'/,/__Marker__/d" "$1"/usr/www/${HTML}/${avm_Lang}/system/energy.js fi fi fi ########################################## #remouve usb options for infoled if [ -e "$1"/usr/www/${HTML}/${avm_Lang}/system/infoled.inc ]; then echo2 " /usr/www/${HTML}/${avm_Lang}/system/infoled.inc" # sed -i -e "s/^.*TextBlinkDECT.*$//" "$1"/usr/www/${HTML}/${avm_Lang}/system/infoled.inc sed -i -e "s/^.*TextBlinkFWUpdateUSB.*$//" "$1"/usr/www/${HTML}/${avm_Lang}/system/infoled.inc sed -i -e "/USB/d" "$1"/usr/www/${HTML}/${avm_Lang}/system/infoled.inc fi if [ -e "$1"/usr/www/${HTML}/${avm_Lang}/system/infoled.html ]; then sed -i -e "/TextLeuchtetUSBZubehoer/d" "$1"/usr/www/${HTML}/${avm_Lang}/system/infoled.html # all in one sed -i -e "s/setvariable var:showstick 1/setvariable var:showstick 0/" "$1"/usr/www/${HTML}/${avm_Lang}/system/infoled.html sed -i -e "/USB-Ger/d" "$1"/usr/www/${HTML}/${avm_Lang}/system/infoled.html #older versions sed -i -e "/Text9/d" "$1"/usr/www/${HTML}/${avm_Lang}/system/infoled.html fi #WLAN stick and surf remove echo2 " /usr/www/${HTML}/${avm_Lang}/wlan/common.html" sed -i -e "/uiViewAutoprov/d" "$1"/usr/www/${HTML}/${avm_Lang}/wlan/common.html #all in one sed -i -e "s/in der FRITZ!Box aktivieren./funktioniert am W701 nicht!/" "$1"/usr/www/${HTML}/${avm_Lang}//wlan/common.html #Remove USB Freigabe on firmwares newer as .51 for FILENAME in "home/sitemap.html" "menus/menu2_internet.html"; do if [ -e "$1"/usr/www/${HTML}/${avm_Lang}/$FILENAME ]; then echo2 " /usr/www/${HTML}/${avm_Lang}/$FILENAME" sed -i -e 's|||g' "$1"/usr/www/${HTML}/${avm_Lang}/$FILENAME fi done #Remove USB clickbox form answering machine page , apears on different pages on version 10864 od 10842 for FILENAME in "fon/tamlist.html" "home/tamedit.html"; do if [ -e "$1"/usr/www/${HTML}/${avm_Lang}/$FILENAME ]; then echo2 " /usr/www/${HTML}/${avm_Lang}/$FILENAME" # sed -i -e 's|input type="checkbox" id="uiView_TamUseStick"|input type="hidden" id="uiView_TamUseStick"|g' "$1"/usr/www/${HTML}/${avm_Lang}/$FILENAME sed -i -e '/id="uiView_TamUseStick"/d' "$1"/usr/www/${HTML}/${avm_Lang}/$FILENAME sed -i -e '/echo $var:TextUseStick/d' "$1"/usr/www/${HTML}/${avm_Lang}/$FILENAME # all in one sed -i -e '/USB-/d' "$1"/usr/www/${HTML}/${avm_Lang}/$FILENAME fi done #FAX all in one -> if [ -e "$1"/usr/www/${HTML}/${avm_Lang}/fon_config/fon_config_3fxi.js ]; then echo2 " /usr/www/${HTML}/${avm_Lang}/fon_config/fon_config_3fxi.js" sed -i -e 's|if ("" == "1")|if ("1" == "0")|' "$1"/usr/www/${HTML}/${avm_Lang}/fon_config/fon_config_3fxi.js fi if [ -e "$1"/usr/www/${HTML}/${avm_Lang}/fon_config/fon_config_3fxi.html ]; then echo2 " /usr/www/${HTML}/${avm_Lang}/fon_config/fon_config_3fxi.html" sed -i -e 's| und/oder auf einem USB-Speicher gespeichert||' "$1"/usr/www/${HTML}/${avm_Lang}/fon_config/fon_config_3fxi.html sed -i -e 's|