diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-06-03 09:52:45 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-06-03 09:52:45 +0000 |
commit | 59cfb9ee23428ac52612cd9c57162d03523b8099 (patch) | |
tree | 7dc5ca638cc0b97e620ae1aa501eae25693f6247 /perl-install/install_any.pm | |
parent | 5b698cae1e7e481e7ce9525c2db3436153cfe15a (diff) | |
download | drakx-59cfb9ee23428ac52612cd9c57162d03523b8099.tar drakx-59cfb9ee23428ac52612cd9c57162d03523b8099.tar.gz drakx-59cfb9ee23428ac52612cd9c57162d03523b8099.tar.bz2 drakx-59cfb9ee23428ac52612cd9c57162d03523b8099.tar.xz drakx-59cfb9ee23428ac52612cd9c57162d03523b8099.zip |
provide backward compatibility for network fields in loadO
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r-- | perl-install/install_any.pm | 14 |
1 files changed, 14 insertions, 0 deletions
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; } |