summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-02-23 08:26:13 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-02-23 08:26:13 +0000
commitd941bca470cb274880944d23172517511e6c0830 (patch)
treec18713666cbbab5f1d0839370ce22d9a2f10877f /perl-install
parentfbec5aacf2dba0552c020eb826ccac4cb0227716 (diff)
downloaddrakx-d941bca470cb274880944d23172517511e6c0830.tar
drakx-d941bca470cb274880944d23172517511e6c0830.tar.gz
drakx-d941bca470cb274880944d23172517511e6c0830.tar.bz2
drakx-d941bca470cb274880944d23172517511e6c0830.tar.xz
drakx-d941bca470cb274880944d23172517511e6c0830.zip
handle and translate BOOTPROTO
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/drakconnect11
1 files changed, 9 insertions, 2 deletions
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect
index 25477d3d6..1e88c63b6 100755
--- a/perl-install/standalone/drakconnect
+++ b/perl-install/standalone/drakconnect
@@ -335,8 +335,12 @@ sub build_notebook {
),
),
);
- if ($is_ethernet) { $gui->{intf}{BOOTPROTO}->set_popdown_strings(N_("static"), N_("dhcp")) }
- else {
+ if ($is_ethernet) {
+ my $proto = $gui->{intf}{BOOTPROTO};
+ $proto->{protocols} = { static => N("static"), dhcp => N_("DHCP") };
+ $proto->set_popdown_strings(values %{$proto->{protocols}});
+ $proto->set_text($proto->{protocols}->{$intf->{BOOTPROTO}});
+ } else {
$_->set_sensitive(0) foreach $gui->{intf}{IPADDR}, $gui->{intf}{NETMASK};
delete $gui->{intf}{BOOTPROTO};
}
@@ -567,6 +571,9 @@ sub save_notebook {
$gui->{intf_bool}{MII_NOT_SUPPORTED} and $intf->{MII_NOT_SUPPORTED} = bool2yesno(!$gui->{intf_bool}{MII_NOT_SUPPORTED}->get_active);
$gui->{intf_bool}{HWADDR} and (bool2yesno($gui->{intf_bool}{HWADDR}->get_active) eq 'yes' ? ($intf->{HWADDR} = 'yes') : delete $intf->{HWADDR});
+ if (my $proto = $gui->{intf}{BOOTPROTO}) {
+ $intf->{BOOTPROTO} = { reverse %{$proto->{protocols}} }->{$proto->get_text};
+ }
if ($intf->{BOOTPROTO} eq 'static') {
check_field($intf, 'IPADDR', 'NETMASK') or $in->ask_warn(N("Error"), N("IP address should be in format 1.2.3.4")) and return 0;
}