summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-06-03 09:52:45 +0000
committerOlivier Blin <oblin@mandriva.org>2005-06-03 09:52:45 +0000
commit59cfb9ee23428ac52612cd9c57162d03523b8099 (patch)
tree7dc5ca638cc0b97e620ae1aa501eae25693f6247
parent5b698cae1e7e481e7ce9525c2db3436153cfe15a (diff)
downloaddrakx-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
-rw-r--r--perl-install/install_any.pm14
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;
}