#!/bin/bash # include modpatch function . ${include_modpatch} DIRI="/usr/www/${HTML}/de/home" if ! [ -f "$1"$DIRI/fondevices.html ]; then DIRI="/usr/www/${HTML}/de/fon" fi # pulldown selection WWWUSR="/usr/www/${HTML}/de" [ -f "$1"$WWWUSR/fon_config/fon_config_1.js ] && sed -i -e "s/FON 3 (analog)/FON 3 (nicht vorhanden)/" "$1"$WWWUSR/fon_config/fon_config_1.js [ -f "$1"$WWWUSR/fon_config/fon_config_fondevices.js ] && sed -i -e "s/extensionNo = .;/extensionNo = 2;/" "$1"$WWWUSR/fon_config/fon_config_fondevices.js [ -f "$1"${DIRI}/fondevices.html ] && sed -i -e "s/extensionNo = .;/extensionNo = 2;/" "$1"${DIRI}/fondevices.js [ -e "$1"${DIRI}/fondevices.html ] && exit 0 echo2 " -- removing lines from $2 source:" if [ "$2" != "7150" ]; then echo2 " ${DIRI}/ppFonbuch.html" if [ "$2" = "7170" ]; then sed -i -e "s/, Fon3 = 3//" "$1"${DIRI}/ppFonbuch.html sed -i -e "/\", Fon3=3\"/d" "$1"${DIRI}/ppFonbuch.html sed -i -e "s/\"ISDN-Telefone=5\"/\"ISDN\/DECT-Telefone=5\"/" "$1"${DIRI}/ppFonbuch.html else sed -i -e "s/, Fon3 = 3, ISDN = 4//" "$1"${DIRI}/ppFonbuch.html sed -i -e "/\", Fon3=3\"/d" "$1"${DIRI}/ppFonbuch.html sed -i -e "/\", \"/d" "$1"${DIRI}/ppFonbuch.html sed -i -e "/\"ISDN-Telefone=5\"/d" "$1"${DIRI}/ppFonbuch.html fi if [ -e "$1"/usr/www/${HTML}/de/fon_config/fon_config_1.js ]; then echo2 " /usr/www/${HTML}/de/fon_config/fon_config_1.js" sed -i -e "/^var g_txtPort3 .*$/d" "$1"/usr/www/${HTML}/de/fon_config/fon_config_1.js sed -i -e "/^\tname = jslGetValue(\"uiPostPort2Name\");$/,/^\t}[ \t]*$/d" "$1"/usr/www/${HTML}/de/fon_config/fon_config_1.js fi for FILE in dial.frm fon1isdn.frm fonbuch.frm foncalls.frm; do if [ -e "$1"${DIRI}/$FILE ]; then echo2 " ${DIRI}/$FILE" sed -i -e "s/^<\/td>$/,/^.*<\/button><\/td>/d" "$1"${DIRI}/fonlist.html sed -i -e "/^.*$/{N;/^.*\n.*<.tr>$/d}" "$1"${DIRI}/fonlist.html if [ -e "$1"/usr/www/${HTML}/de/fon/rul.html ]; then echo2 " /usr/www/${HTML}/de/fon/rul.html" sed -i -e "/Text48/d" "$1"/usr/www/${HTML}/de/fon/rul.html sed -i -e "/uiViewRulNr3/,/^.*<\/td>/d" "$1"/usr/www/${HTML}/de/fon/rul.html sed -i -e "/^.*$/{N;/^.*\n.*<.tr>$/d}" "$1"/usr/www/${HTML}/de/fon/rul.html fi echo2 " /usr/www/${HTML}/de/system/nachts.js" sed -i -e "/KeineSperre(\"[23]\")/d" "$1"/usr/www/${HTML}/de/system/nacht.js sed -i -e "/Klingelsperre(\"[23]\",/d" "$1"/usr/www/${HTML}/de/system/nacht.js fi exit 0