summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2003-02-28 15:26:37 +0000
committerFlorent Villard <warly@mandriva.com>2003-02-28 15:26:37 +0000
commitb53593dd74b1c255d6e3cba0eef5ade14b6d6c2b (patch)
treea446593e92227ae5df575cfb68d59babb2dc7ff3 /common
parente50ac7719ada4befb44f5e5ae57f5c3cd4ff2e68 (diff)
downloaddrakwizard-b53593dd74b1c255d6e3cba0eef5ade14b6d6c2b.tar
drakwizard-b53593dd74b1c255d6e3cba0eef5ade14b6d6c2b.tar.gz
drakwizard-b53593dd74b1c255d6e3cba0eef5ade14b6d6c2b.tar.bz2
drakwizard-b53593dd74b1c255d6e3cba0eef5ade14b6d6c2b.tar.xz
drakwizard-b53593dd74b1c255d6e3cba0eef5ade14b6d6c2b.zip
fix dhcp wizard
Diffstat (limited to 'common')
-rw-r--r--common/scripts/IFCFG.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/scripts/IFCFG.pm b/common/scripts/IFCFG.pm
index 2d1171ba..669525f7 100644
--- a/common/scripts/IFCFG.pm
+++ b/common/scripts/IFCFG.pm
@@ -43,6 +43,8 @@ sub new {
}
}
%{$self->{network}} = getVarsFromSh("/etc/sysconfig/network");
+ $self->{network}{HOSTNAME} ||= `hostname` and chomp $self->{network}{HOSTNAME};
+ ($self->{network}{DOMAINNAME}) = $self->{network}{HOSTNAME} =~ /\.(.*)/ || (`dnsdomainname`) and chomp $self->{network}{DOMAINNAME};
bless $self;
}
@@ -72,7 +74,7 @@ sub network_get {
my $self = shift;
my ($key) = @_;
- exists $self->{network}->{$key} or die "no $key field in network hash";
+ exists $self->{network}{$key} or die "no $key field in network hash";
$self->{network}{$key};
}