]>
Commit | Line | Data |
---|---|---|
cd1a2927 MT |
1 | --- header.pl.old Sat Aug 27 02:22:18 2005 |
2 | +++ header.pl Sat Sep 17 15:53:34 2005 | |
3 | @@ -544,6 +544,11 @@ | |
4 | &General::readhash("${General::swroot}/ppp/settings", \%pppsettings); | |
5 | &General::readhash("${General::swroot}/ethernet/settings", \%netsettings); | |
6 | ||
7 | + my $profileused=''; | |
8 | + if ( ! ( $netsettings{'CONFIG_TYPE'} =~ /^(2|3|6|7)$/ && $netsettings{'RED_TYPE'} =~ /^(DHCP|STATIC)$/ ) ) { | |
9 | + $profileused="- $pppsettings{'PROFILENAME'}"; | |
10 | + } | |
11 | + | |
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")) { | |
15 | @@ -593,24 +598,24 @@ | |
16 | ||
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>"; | |
21 | } else { | |
22 | if ($count == 0) { | |
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>"; | |
26 | } else { | |
27 | - $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'idle'} - $pppsettings{'PROFILENAME'}</span>"; | |
28 | + $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'idle'} $profileused</span>"; | |
29 | } | |
30 | } else { | |
31 | - $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'connecting'} - $pppsettings{'PROFILENAME'}</span>"; | |
32 | + $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'connecting'} $profileused</span>"; | |
33 | } | |
34 | } | |
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>"; | |
40 | } else { | |
41 | - $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'idle'} - $pppsettings{'PROFILENAME'}</span>"; | |
42 | + $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'idle'} $profileused</span>"; | |
43 | } | |
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'")) { | |
46 | @@ -633,19 +638,19 @@ | |
47 | } elsif ($pppsettings{'TYPE'} eq 'eagleusbadsl') { | |
48 | $speed = `/usr/sbin/eaglestat | /bin/grep Rate`; | |
49 | } | |
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>"; | |
52 | } else { | |
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>"; | |
55 | } | |
56 | } else { | |
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>"; | |
60 | } else { | |
61 | - $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'connecting'} - $pppsettings{'PROFILENAME'}</span>"; | |
62 | + $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'connecting'} $profileused</span>"; | |
63 | } | |
64 | } | |
65 | } else { | |
66 | - $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'idle'} - $pppsettings{'PROFILENAME'}</span>"; | |
67 | + $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'idle'} $profileused</span>"; | |
68 | } | |
69 | return $connstate; | |
70 | } |