summaryrefslogtreecommitdiffstats
path: root/proxy_wizard
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2005-08-08 02:15:15 +0000
committerAntoine Ginies <aginies@mandriva.com>2005-08-08 02:15:15 +0000
commit6d5c6fa8e9e4de1f6f91e80d5aa8e2aa823de27b (patch)
tree11a1f6c452bf5b6a6701192a4a35d4e3d8a43087 /proxy_wizard
parentf9c8a2b2111befa80ed51177fa3bfe751d6d2552 (diff)
downloaddrakwizard-6d5c6fa8e9e4de1f6f91e80d5aa8e2aa823de27b.tar
drakwizard-6d5c6fa8e9e4de1f6f91e80d5aa8e2aa823de27b.tar.gz
drakwizard-6d5c6fa8e9e4de1f6f91e80d5aa8e2aa823de27b.tar.bz2
drakwizard-6d5c6fa8e9e4de1f6f91e80d5aa8e2aa823de27b.tar.xz
drakwizard-6d5c6fa8e9e4de1f6f91e80d5aa8e2aa823de27b.zip
fix core dump due to missing hostname
Diffstat (limited to 'proxy_wizard')
-rwxr-xr-xproxy_wizard/Squid.pm9
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} = {