#!/bin/sh
. /usr/lib/libmodcgi.sh
sec_begin 'Enable/Disable cpmaccfg'
cgi_print_radiogroup_active "enabled" "$CPMACCFG_ENABLED" "" ""
sec_end
sec_begin 'Port Status'
cat << EOF
|
Port | Mode | VLAN | Port 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 ' |
LAN Port | Mode | VLAN | Speed | Flow Control |
Port '$row' | ' echo -n '' echo -n ' | ' echo -n ' | ' echo -n ' |
WLAN group: | Please choose the assignment for wireless LAN |
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. |
IP eth1: ' echo -n ' Subnet: ' echo -n '
' else SetToNull=$SetToNull'' fi if [ $CPMACCFG_VLAN1 = "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_VLAN1 = "eth3" -o $CPMACCFG_VLAN2 = "eth3" -o $CPMACCFG_VLAN3 = "eth3" -o $CPMACCFG_VLAN4 = "eth3" ]; then echo -n 'IP eth3: ' echo -n ' Subnet: ' echo -n '
' else SetToNull=$SetToNull'' fi if [ $CPMACCFG_VLAN1 = "eth4" -o $CPMACCFG_VLAN2 = "eth4" -o $CPMACCFG_VLAN3 = "eth4" -o $CPMACCFG_VLAN4 = "eth4" ]; then echo -n 'IP eth4: ' echo -n ' Subnet: ' echo -n '
' else SetToNull=$SetToNull'' fi sec_end