summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-11-12 12:29:38 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-11-12 12:29:38 +0000
commitd47df30f43b630decb5b522c43e0a0683a5aee82 (patch)
tree0f26f697d030ca51bfe888e3dd30552eee9b511a /perl-install
parente4caee01567512d4f7751f8614d4d3541a062a62 (diff)
downloaddrakx-d47df30f43b630decb5b522c43e0a0683a5aee82.tar
drakx-d47df30f43b630decb5b522c43e0a0683a5aee82.tar.gz
drakx-d47df30f43b630decb5b522c43e0a0683a5aee82.tar.bz2
drakx-d47df30f43b630decb5b522c43e0a0683a5aee82.tar.xz
drakx-d47df30f43b630decb5b522c43e0a0683a5aee82.zip
(network::tools::is_dynamic_ip) consolidate test for any dynamic interface
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/network/tools.pm7
-rwxr-xr-xperl-install/standalone/drakconnect2
2 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index 0810ea629..ddad3b24d 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -9,7 +9,7 @@ use MDK::Common::Globals "network", qw($in $prefix $disconnect_file $connect_pro
use MDK::Common::System qw(getVarsFromSh);
@ISA = qw(Exporter);
-@EXPORT = qw(ask_connect_now ask_info2 connect_backend connected connected_bg disconnect_backend disconnected is_wireless_intf passwd_by_login read_providers_backend read_secret_backend test_connected type2interface write_cnx_script write_initscript write_secret_backend);
+@EXPORT = qw(ask_connect_now ask_info2 connect_backend connected connected_bg disconnect_backend disconnected is_dynamic_ip is_wireless_intf passwd_by_login read_providers_backend read_secret_backend test_connected type2interface write_cnx_script write_initscript write_secret_backend);
@EXPORT_OK = qw($in);
sub write_cnx_script {
@@ -352,4 +352,9 @@ sub is_wireless_intf {
member($module, qw(acx100_pci airo aironet_cs aironet4500_cs airo_cs airport at76c503 hermes netwave_cs orinoco_cs prism2_usb orinoco ray_cs usbvnet_rfmd wavelan_cs wvlan_cs))
}
+sub is_dynamic_ip {
+ my ($intf) = @_;
+ every { $_->{BOOTPROTO} eq "static" } values %$intf
+}
+
1;
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect
index 0c5c26d43..83814c2a1 100755
--- a/perl-install/standalone/drakconnect
+++ b/perl-install/standalone/drakconnect
@@ -355,7 +355,7 @@ sub update_list() {
}
sub apply() {
- network::sethostname($netc) if every { $_->{BOOTPROTO} eq "static" } values %$intf;
+ network::sethostname($netc) if is_dynamic_ip($intf);
$netcnx->{type} eq 'modem' and network::modem::ppp_configure($in, $netcnx->{$netcnx->{type}});
$netcnx->{type} eq 'isdn_internal' and network::isdn::isdn_write_config_backend($netcnx->{$netcnx->{type}}, $netc, $netcnx); #$light