diff options
Diffstat (limited to 'common/IFCFG.pm')
-rw-r--r-- | common/IFCFG.pm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/common/IFCFG.pm b/common/IFCFG.pm index 0d0c96b2..81b7f0e5 100644 --- a/common/IFCFG.pm +++ b/common/IFCFG.pm @@ -54,7 +54,7 @@ sub new { bless $self; } -sub is_dhcp { +sub is_dhcp { my $self = shift; my ($itf) = @_; @@ -63,25 +63,25 @@ sub is_dhcp { } #- TODO : return the main interface -sub default_itf { +sub default_itf { "eth0"; } -sub itf_get { +sub itf_get { my $self = shift; my ($key, $itf) = @_; $itf ||= default_itf; - exists $self->{itf}{$itf}{$key} or die "no $key field in $itf hash"; + exists $self->{itf}{$itf}{$key} or print "ERROR: no $key field in $itf hash\n"; $self->{itf}{$itf}{$key} } -sub network_get { +sub network_get { my $self = shift; my ($key) = @_; - exists $self->{network}{$key} or die "no $key field in network hash"; - $self->{network}{$key}; + exists $self->{network}{$key} or print "ERROR: no $key field in network hash\n"; + $self->{network}{$key} } 10; |