summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-02-12 14:41:18 +0000
committerFrancois Pons <fpons@mandriva.com>2003-02-12 14:41:18 +0000
commit3b4d0d54a1d8b97c904c9bff12e3ce2eecfa3999 (patch)
tree14a99c21cd85acecc784c5b0caf40f9bb7c8009a /perl-install
parent36e7b9be5e3055d9df464c40f457d86938e11fe4 (diff)
downloaddrakx-backup-do-not-use-3b4d0d54a1d8b97c904c9bff12e3ce2eecfa3999.tar
drakx-backup-do-not-use-3b4d0d54a1d8b97c904c9bff12e3ce2eecfa3999.tar.gz
drakx-backup-do-not-use-3b4d0d54a1d8b97c904c9bff12e3ce2eecfa3999.tar.bz2
drakx-backup-do-not-use-3b4d0d54a1d8b97c904c9bff12e3ce2eecfa3999.tar.xz
drakx-backup-do-not-use-3b4d0d54a1d8b97c904c9bff12e3ce2eecfa3999.zip
updated to find an interface even when no profile are available.
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/drakpxe16
1 files changed, 10 insertions, 6 deletions
diff --git a/perl-install/standalone/drakpxe b/perl-install/standalone/drakpxe
index f6c04a6fc..2700490fe 100755
--- a/perl-install/standalone/drakpxe
+++ b/perl-install/standalone/drakpxe
@@ -49,11 +49,9 @@ $::direct = grep { /-direct/ } @ARGV;
#my $shorewall = network::shorewall::read();
#
#- get network configuration.
-my $netcnx = {};
my $netc = {};
my $intf = {};
-network::netconnect::read_net_conf('', $netcnx, $netc);
-network::netconnect::load_conf($netcnx, $netc, $intf);
+network::read_all_conf('', $netc, $intf);
my $in = 'interactive'->vnew('su', 'default');
@@ -128,7 +126,13 @@ undef $::Wizard_no_previous;
step_check_intf:
-my @intf = grep { exists $_->{NETWORK} } values %$intf;
+my @intf = grep { exists $_->{NETWORK} } map {
+ unless ($_->{NETWORK}) {
+ foreach my $s (split "\n", `route`) {
+ print STDERR "$s\n";
+ $s =~ /^(\S+)\s+\S+\s+$_->{NETMASK}\s+.*$_->{DEVICE}/ and $_->{NETWORK} = $1;
+ }
+ } $_ } values %$intf;
if (@intf < 1) {
#- no interface already configured found, ask user to configure.
$in->ask_warn(N("No network adapter on your system!"),
@@ -151,7 +155,7 @@ if (@intf < 1) {
step_ip_range:
#- read current configuration, or create a default suitable automatically.
-my $dhcpd_conf = parse_dhcpd_conf("/etc/dhcpd.conf", $netcnx, $netc, $intf[0]);
+my $dhcpd_conf = parse_dhcpd_conf("/etc/dhcpd.conf", {}, $netc, $intf[0]);
#- get back default of ip.
my $pool;
@@ -214,7 +218,7 @@ Leave it blank if you do not want to set up automatic installation mode.
#- now install packages...
my %rpm2file = ('dhcp-server' => '/usr/sbin/dhcpd',
- pxe => '/usr/sbin/pxe',
+ 'pxe' => '/usr/sbin/pxe',
'tftp-server' => '/usr/sbin/in.tftpd',
'apache' => '/usr/sbin/httpd');