X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Fdns.cgi;fp=html%2Fcgi-bin%2Fdns.cgi;h=aac7955ec19d717db2798368153f46298b32da3c;hp=d4278d8b9a484825f76f162365b9c4a68902c569;hb=351ad526b23daa2e36a7e09c5c2c7e59d4a35259;hpb=15e34194346674213e2cff30828f6f764311a685 diff --git a/html/cgi-bin/dns.cgi b/html/cgi-bin/dns.cgi index d4278d8b9a..aac7955ec1 100755 --- a/html/cgi-bin/dns.cgi +++ b/html/cgi-bin/dns.cgi @@ -418,10 +418,18 @@ END sub show_nameservers () { &Header::openbox('100%', 'center', "$Lang::tr{'dns title'}"); + # Determine if we are running in recursor mode + my $recursor = 0; + my $unbound_forward = qx(unbound-control forward); + if ($unbound_forward =~ m/^off/) { + $recursor = 1; + } + my $dns_status_string; my $dns_status_col; my $dns_working; + # Test if the DNS system is working. # # Simple send a request to unbound and check if it can resolve the @@ -437,6 +445,10 @@ sub show_nameservers () { $dns_status_col = "${Header::colourred}"; } + if ($recursor) { + $dns_status_string .= " (" . $Lang::tr{'dns recursor mode'} . ")"; + } + print < @@ -705,25 +717,16 @@ print < END ; - } else { -print < - - -
$Lang::tr{'dns recursor mode'}
- - -
- END -; } &Header::closebox();