#!/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
|
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_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