#!/bin/sh . /usr/lib/libmodcgi.sh check "$CPMACCFG_ENABLED" yes:auto "*":man sec_begin 'Enable/Disable cpmaccfg' cat << EOF

EOF cat << EOF

EOF sec_end sec_begin 'Port Status' cat << EOF

  EOF # Link-Farbe und Anzahl External Ports bestimmen LINK="green" EXTPORTS=$(/sbin/cpmaccfg info | grep "External" | awk '{print $3}') # Ports Anzeigen row=1 while [ $row -le $EXTPORTS ]; do COLOR="darkred" PORT=$(/sbin/cpmaccfg gpme $row | sed -e "s/.*: //g") if [ "$PORT" != "no link" ]; then COLOR=$LINK;fi echo -n '' let row++ done cat << EOF
 '$row'

EOF # Portstatus anzeigen row=1 while [ $row -le $EXTPORTS ]; do echo -n '' let row++ done cat << EOF
PortModeVLANPort Media
'$row'' echo -n $(/sbin/cpmaccfg gpm | grep $row | awk '{print $3}') VLAN=$(cat /mod/etc/conf/cpmaccfg.cfg | grep "VLAN"$row | sed -e "s/.*VLAN$row='//g" | sed -e "s/'//g") if [ $VLAN = "eth0" ];then COLOR="lightblue"; fi if [ $VLAN = "eth1" ];then COLOR="lightgreen"; fi if [ $VLAN = "eth2" ];then COLOR="lightcyan"; fi if [ $VLAN = "eth3" ];then COLOR="lightyellow"; fi echo -n '' echo -n $VLAN echo -n '' echo -n $(/sbin/cpmaccfg gpme $row | sed -e "s/.*: //g") echo -n '
save = auto-detect EOF sec_end sec_begin 'Port Settings' cat << EOF

EOF # Dropdown für Einstellungen anzeigen [ -r /var/env.cache ] && . /var/env.cache BOXTYPE=${CONFIG_PRODUKT#Fritz_Box_} if [ "$BOXTYPE" != "7170" ];then drop="disabled"; fi row=1 while [ $row -le $EXTPORTS ]; do echo -n '' echo -n '' echo -n '' echo -n '' echo -n '' let row++ done cat << EOF
LAN PortModeVLANSpeedFlow Control
Port '$row'


EOF ETHERMODE=$(echo 'ar7cfg.ethmode' | ar7cfgctl -s) if [ $ETHERMODE = "ethmode_router" ]; then cat << EOF
WLAN group: Please choose the assignment for wireless LAN

EOF else echo -n "
No WLAN assignment available! WLAN is bridged in AVM webinterface.
" echo -n "Please disable the option 'All computers are in the same network'
" echo -n "to use the WLAN feature for VLAN assignment.
" fi sec_end SetToNull='' sec_begin 'Advanced VLAN/IP Settings' if [ $CPMACCFG_VLAN2 = "eth1" -o $CPMACCFG_VLAN2 = "eth1" -o $CPMACCFG_VLAN3 = "eth1" -o $CPMACCFG_VLAN4 = "eth1" ]; then echo -n '

IP eth1: ' echo -n ' Subnet: ' echo -n '

' else SetToNull=$SetToNull'' fi if [ $CPMACCFG_VLAN2 = "eth2" -o $CPMACCFG_VLAN2 = "eth2" -o $CPMACCFG_VLAN3 = "eth2" -o $CPMACCFG_VLAN4 = "eth2" ]; then echo -n '

IP eth2: ' echo -n ' Subnet: ' echo -n '

' else SetToNull=$SetToNull'' fi if [ $CPMACCFG_VLAN2 = "eth3" -o $CPMACCFG_VLAN2 = "eth3" -o $CPMACCFG_VLAN3 = "eth3" -o $CPMACCFG_VLAN4 = "eth3" ]; then echo -n '

IP eth1: ' echo -n ' Subnet: ' echo -n '

' else SetToNull=$SetToNull'' fi if [ $CPMACCFG_VLAN2 = "eth4" -o $CPMACCFG_VLAN2 = "eth4" -o $CPMACCFG_VLAN3 = "eth4" -o $CPMACCFG_VLAN4 = "eth4" ]; then echo -n '

IP eth1: ' echo -n ' Subnet: ' echo -n '

' else SetToNull=$SetToNull'' fi sec_end