diff options
Diffstat (limited to 'proxy_wizard')
-rwxr-xr-x | proxy_wizard/Squid.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/proxy_wizard/Squid.pm b/proxy_wizard/Squid.pm index 230323e4..cf91cebe 100755 --- a/proxy_wizard/Squid.pm +++ b/proxy_wizard/Squid.pm @@ -30,6 +30,8 @@ use MDK::Wizard::Wizcommon; my $wiz = new MDK::Wizard::Wizcommon; my $HOSTNAME = $wiz->{net}->network_get("HOSTNAME"); +my $DOMAINNAME = chomp_(`dnsdomainname`); +my $SHORTHOSTNAME = chomp_(`hostname -s`); if (!$HOSTNAME) { $HOSTNAME = chomp_(`hostname`) } my $df = -d '/var/spool/squid' ? `/bin/df -m /var/spool/squid` : `/bin/df -m /var/spool`; my ($free_disk) = $df =~ m/\d+\s+\d+\s+\d+\s+(\d+)/; @@ -58,8 +60,11 @@ my $o = { wiz_squid_menupeer => '', wiz_squid_disk => '' }, - needed_rpm => [ 'squid' ], - defaultimage => "$ENV{__WIZ_HOME__}proxy_wizard/images/proxy.png" + init => sub { + test_host_domain($SHORTHOSTNAME, $DOMAINNAME); + }, + needed_rpm => [ 'squid' ], + defaultimage => "$ENV{__WIZ_HOME__}proxy_wizard/images/proxy.png" }; $o->{pages} = { |