#!/bin/bash # include modpatch function . ${include_modpatch} #echo "-- removing 'LAN 2-4' ..." echo2 " -- removing lines from:" echo2 " /usr/www/${HTML}/de/home/home.html" sed -i -e "/^.*.*eth[123].*<.td>$/{N;/^.*.*eth[123].*<.td>\n.*.*<.td>$/d}" "$1"/usr/www/${HTML}/de/home/home.html sed -i -e "/^.*$/{N;/^.*\n.*<.tr>$/d}" "$1"/usr/www/${HTML}/de/home/home.html sed -i -e "s/ \$var:txt038 / \$var:txt006 /" "$1"/usr/www/${HTML}/de/home/home.html echo2 " -- changing 'LAN 1' to 'LAN' in:" echo2 " /usr/www/${HTML}/de/internet/internet_expert.js" sed -i -e "s/LAN 1/LAN/" "$1"/usr/www/${HTML}/de/internet/internet_expert.js sed -i -e "s/LAN 2, LAN 3, LAN 4//" "$1"/usr/www/${HTML}/de/internet/internet_expert.js INC_EXT=inc [ -f /usr/www/${HTML}/de/internet/internet_expert.${INC_EXT} ] || INC_EXT=html echo2 " /usr/www/${HTML}/de/internet/internet_expert.${INC_EXT}" sed -i -e "s/' LAN 1'/' LAN'/" "$1"/usr/www/${HTML}/de/internet/internet_expert.${INC_EXT} sed -i -e "s/\" LAN A\"/\" LAN\"/" "$1"/usr/www/${HTML}/de/internet/internet_expert.${INC_EXT} echo2 " /usr/www/${HTML}/de/system/netipadr.js" sed -i -e "s/\" LAN 1\"/\" LAN\"/" "$1"/usr/www/${HTML}/de/system/netipadr.js if [ -f "$1"/usr/www/${HTML}/de/system/energy.html ]; then echo2 " /usr/www/${HTML}/de/system/energy.html" sed -i -e "/eth1/d" "$1"/usr/www/${HTML}/de/system/energy.html sed -i -e "/eth2/d" "$1"/usr/www/${HTML}/de/system/energy.html sed -i -e "/eth3/d" "$1"/usr/www/${HTML}/de/system/energy.html sed -i -e "s/LAN 1/LAN/" "$1"/usr/www/${HTML}/de/system/energy.${INC_EXT} fi exit 0 #