summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-04-03 07:14:57 +0000
committerdamien <damien@mandriva.com>2001-04-03 07:14:57 +0000
commit26528d1d90b95be6d47ca9de349fdc5366b3efee (patch)
treef897e00cdce56a0e4f7a20c24b949a503ad3805c
parente41331497fae15c2833fb2bfc790dd664937a42a (diff)
downloaddrakx-26528d1d90b95be6d47ca9de349fdc5366b3efee.tar
drakx-26528d1d90b95be6d47ca9de349fdc5366b3efee.tar.gz
drakx-26528d1d90b95be6d47ca9de349fdc5366b3efee.tar.bz2
drakx-26528d1d90b95be6d47ca9de349fdc5366b3efee.tar.xz
drakx-26528d1d90b95be6d47ca9de349fdc5366b3efee.zip
bug fixes
-rwxr-xr-xperl-install/standalone/draknet16
1 files changed, 14 insertions, 2 deletions
diff --git a/perl-install/standalone/draknet b/perl-install/standalone/draknet
index 977f52b67..ad65b951b 100755
--- a/perl-install/standalone/draknet
+++ b/perl-install/standalone/draknet
@@ -170,6 +170,7 @@ $table1->attach($label8, 1, 2, 2, 3, 'fill', 'fill',0,0);
my $button2 = new Gtk::Button($c ? _("Disconnect...") : _("Connect..."));
$button2->signal_connect (clicked => sub {
+ $::isWizard = 0;
if (!netconnect::connected('', $netc)) {
my $up;
{
@@ -216,9 +217,15 @@ $clist1->set_shadow_type('etched_out');
$vbox2->pack_start($clist1, 0, 0, 5);
#$scrolled1->add_with_viewport($table2);
+my $ip_regexp = qr/(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
foreach (0..$#all_cards) {
-$clist1->append($_+1, "eth$_", $intf->{"eth$_"}{IPADDR}, $intf->{"eth$_"}{BOOTPROTO}, $all_cards[$_]->[1]);
-$clist1->set_selectable($_, 0);
+ my $ip;
+ if (-e "/sbin/ifconfig") {
+ local $_=`LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /sbin/ifconfig "eth$_"`;
+ /inet addr\:$ip_regexp/; $ip = "$1.$2.$3.$4";
+ } else { $intf->{"eth$_"}{IPADDR} }
+ $clist1->append($_+1, "eth$_", $ip , $intf->{"eth$_"}{BOOTPROTO}, $all_cards[$_]->[1]);
+ $clist1->set_selectable($_, 0);
}
my $hbox3 = new Gtk::HBox(0,0);
@@ -331,6 +338,11 @@ sub update {
$clist1->freeze();
$clist1->clear();
foreach (0..$#all_cards) {
+ my $ip;
+ if (-e "/sbin/ifconfig") {
+ local $_=`LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /sbin/ifconfig "eth$_"`;
+ /inet addr\:$ip_regexp/; $ip = "$1.$2.$3.$4";
+ } else { $intf->{"eth$_"}{IPADDR} }
$clist1->append($_+1, "eth$_", $intf->{"eth$_"}{IPADDR}, $intf->{"eth$_"}{BOOTPROTO}, $all_cards[$_]->[1]);
$clist1->set_selectable($_, 0);
}