1 --- header.pl.old Sat Aug 27 02:22:18 2005
2 +++ header.pl Sat Sep 17 15:53:34 2005
4 &General::readhash("${General::swroot}/ppp/settings", \%pppsettings);
5 &General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
8 + if ( ! ( $netsettings{'CONFIG_TYPE'} =~ /^(2|3|6|7)$/ && $netsettings{'RED_TYPE'} =~ /^(DHCP|STATIC)$/ ) ) {
9 + $profileused="- $pppsettings{'PROFILENAME'}";
12 if ( ( $pppsettings{'METHOD'} eq 'DHCP' && $netsettings{'RED_TYPE'} ne 'PPTP')
13 || $netsettings{'RED_TYPE'} eq 'DHCP' ) {
14 if (open(IFACE, "${General::swroot}/red/iface")) {
17 if (-e "${General::swroot}/red/active") {
18 $timestr = &General::age("${General::swroot}/red/active");
19 - $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'connected'} - $number channel (<span class='ipcop_StatusBigRed'>$timestr</span>) - $pppsettings{'PROFILENAME'}</span>";
20 + $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'connected'} - $number channel (<span class='ipcop_StatusBigRed'>$timestr</span>) $profileused</span>";
23 if (-e "${General::swroot}/red/dial-on-demand") {
24 - $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'dod waiting'} - $pppsettings{'PROFILENAME'}</span>";
25 + $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'dod waiting'} $profileused</span>";
27 - $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'idle'} - $pppsettings{'PROFILENAME'}</span>";
28 + $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'idle'} $profileused</span>";
31 - $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'connecting'} - $pppsettings{'PROFILENAME'}</span>";
32 + $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'connecting'} $profileused</span>";
35 } elsif ($netsettings{'RED_TYPE'} eq "STATIC" || $pppsettings {'METHOD'} eq 'STATIC') {
36 if (-e "${General::swroot}/red/active") {
37 $timestr = &General::age("${General::swroot}/red/active");
38 - $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'connected'} (<span class='ipcop_StatusBigRed'>$timestr</span>) - $pppsettings{'PROFILENAME'}</span>";
39 + $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'connected'} (<span class='ipcop_StatusBigRed'>$timestr</span>) $profileused</span>";
41 - $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'idle'} - $pppsettings{'PROFILENAME'}</span>";
42 + $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'idle'} $profileused</span>";
44 } elsif ( ( (-e "${General::swroot}/dhcpc/dhcpcd-$iface.pid") && $netsettings{'RED_TYPE'} ne 'PPTP' ) ||
45 !system("/bin/ps -ef | /bin/grep -q '[p]ppd'") || !system("/bin/ps -ef | /bin/grep -q '[c]onnectioncheck'")) {
47 } elsif ($pppsettings{'TYPE'} eq 'eagleusbadsl') {
48 $speed = `/usr/sbin/eaglestat | /bin/grep Rate`;
50 - $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'connected'} (<span class='ipcop_StatusBigRed'>$timestr</span>) - $pppsettings{'PROFILENAME'} (\@$speed)</span>";
51 + $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'connected'} (<span class='ipcop_StatusBigRed'>$timestr</span>) $profileused (\@$speed)</span>";
53 - $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'connected'} (<span class='ipcop_StatusBigRed'>$timestr</span>) - $pppsettings{'PROFILENAME'}</span>";
54 + $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'connected'} (<span class='ipcop_StatusBigRed'>$timestr</span>) $profileused</span>";
57 if (-e "${General::swroot}/red/dial-on-demand") {
58 - $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'dod waiting'} - $pppsettings{'PROFILENAME'}</span>";
59 + $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'dod waiting'} $profileused</span>";
61 - $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'connecting'} - $pppsettings{'PROFILENAME'}</span>";
62 + $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'connecting'} $profileused</span>";
66 - $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'idle'} - $pppsettings{'PROFILENAME'}</span>";
67 + $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'idle'} $profileused</span>";