summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakconnect
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone/drakconnect')
-rwxr-xr-xperl-install/standalone/drakconnect13
1 files changed, 7 insertions, 6 deletions
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect
index 3a849f75a..298b67fc5 100755
--- a/perl-install/standalone/drakconnect
+++ b/perl-install/standalone/drakconnect
@@ -288,8 +288,7 @@ sub get_int_ip {
local $_ = `LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /sbin/ifconfig $interface`;
$ip = /inet addr:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/mso ? $1 : N("No Ip");
$mask = /Mask:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/mso ? $1 : N("No Mask");
- $_ = `LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /sbin/ifconfig`;
- $state = /$interface/ ? "up" : "down";
+ $state = /inet/ ? "up" : "down";
} else {
$ip = $intf->{$interface}{IPADDR};
$state = "n/a";
@@ -328,7 +327,7 @@ sub apply() {
$button_apply->set_sensitive(0);
}
-sub ethisup { `LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /sbin/ifconfig` =~ /eth$_[0]/ }
+sub ethisup { `LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /sbin/ifconfig eth$_[0]` =~ /inet/ }
my $to_update;
sub update() {
@@ -412,7 +411,7 @@ sub configure_hostname() {
}
sub get_intf_status {
- my ($c) = @ç;
+ my ($c) = @_;
ethisup($c) ? N("Deactivate now") : N("Activate now")
}
@@ -520,8 +519,10 @@ Configure them first by clicking on 'Configure'")),1,1,0);
if ($intf->{"eth$_"}{BOOTPROTO} ne "static") {
delete @{$intf->{"eth$_"}}{qw(IPADDR NETWORK NETMASK BROADCAST)};
} else {
- $intf->{"eth$_"}{IPADDR} = $infos[1]->get_text;
- $intf->{"eth$_"}{NETMASK} = $infos[3]->get_text;
+ if ($infos[1]->get_text ne "No ip") {
+ $intf->{"eth$_"}{IPADDR} = $infos[1]->get_text;
+ $intf->{"eth$_"}{NETMASK} = $infos[3]->get_text;
+ }
}
}
update();