From 59cfb9ee23428ac52612cd9c57162d03523b8099 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 3 Jun 2005 09:52:45 +0000 Subject: provide backward compatibility for network fields in loadO --- perl-install/install_any.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'perl-install') diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index a549c1a8d..c1eda5734 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -1346,6 +1346,20 @@ sub loadO { $o->{rpmsrate_flags_chosen}{CAT_SYSTEM} = 1; } + #- backward compatibility for network fields + exists $o->{intf} and $o->{net}{ifcfg} = delete $o->{intf}; + exists $o->{netcnx}{type} and $o->{net}{type} = delete $o->{netcnx}{type}; + exists $o->{netc}{NET_INTERFACE} and $o->{net}{net_interface} = delete $o->{netc}{NET_INTERFACE}; + my %netc_translation = ( + resolv => [ qw(dnsServer dnsServer2 dnsServer3 DOMAINNAME DOMAINNAME2 DOMAINNAME3) ], + network => [ qw(NETWORKING FORWARD_IPV4 NETWORKING_IPV6 HOSTNAME GATEWAY GATEWAYDEV NISDOMAIN) ], + auth => [ qw(LDAPDOMAIN WINDOMAIN) ], + ); + foreach my $dest (keys %netc_translation) { + exists $o->{netc}{$_} and $o->{net}{$dest}{$_} = delete $o->{netc}{$_} foreach @{$netc_translation{$dest}}; + } + delete @$o{qw(netc netcnx)}; + $o; } -- cgit v1.2.1