summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-11-25 02:21:17 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-11-25 02:21:17 +0000
commit7a08dbc23f114bf6b6eae275e21e63b6667a1b37 (patch)
treec99d2cf8a7c5e28215d574b7164de0a387004016
parent949ab0f0941e3266d8ab79380399dfe6a0020aea (diff)
downloaddrakx-7a08dbc23f114bf6b6eae275e21e63b6667a1b37.tar
drakx-7a08dbc23f114bf6b6eae275e21e63b6667a1b37.tar.gz
drakx-7a08dbc23f114bf6b6eae275e21e63b6667a1b37.tar.bz2
drakx-7a08dbc23f114bf6b6eae275e21e63b6667a1b37.tar.xz
drakx-7a08dbc23f114bf6b6eae275e21e63b6667a1b37.zip
no_comment
-rw-r--r--docs/TODO2
-rw-r--r--perl-install/ftp.pm8
-rw-r--r--perl-install/http.pm13
-rw-r--r--perl-install/install_any.pm1
-rw-r--r--perl-install/network.pm5
-rw-r--r--perl-install/partition_table.pm1
-rwxr-xr-xperl-install/standalone/diskdrake9
-rw-r--r--tools/ddcprobe/not_handled.c1
8 files changed, 32 insertions, 8 deletions
diff --git a/docs/TODO b/docs/TODO
index 336662ec5..6d5727900 100644
--- a/docs/TODO
+++ b/docs/TODO
@@ -1,3 +1,5 @@
+diskdrake bug: saved information on floppy contains isMounted.
+
move security question before isntallation of packages
verify kernel-smp is put in lilo by default, works on torturebox :-/
diff --git a/perl-install/ftp.pm b/perl-install/ftp.pm
index 6e1002840..6c498f2af 100644
--- a/perl-install/ftp.pm
+++ b/perl-install/ftp.pm
@@ -3,6 +3,7 @@ package ftp;
use Net::FTP;
use install_any;
+use network;
use log;
# non-rentrant!!
@@ -34,12 +35,7 @@ sub new {
$ENV{PASSWORD} = 'mdkinst@test';
}
- my $host = $ENV{HOST};
- if ($host !~ /^[.\d]+$/) {
- $host = join ".", unpack "C4", (gethostbyname $host)[4];
- }
-
- my $ftp = Net::FTP->new($host, %options) or die '';
+ my $ftp = Net::FTP->new(network::resolv($ENV{HOST}), %options) or die '';
$ftp->login($ENV{LOGIN}, $ENV{PASSWORD}) or die '';
$ftp->binary;
diff --git a/perl-install/http.pm b/perl-install/http.pm
index fbf6c001c..9da302513 100644
--- a/perl-install/http.pm
+++ b/perl-install/http.pm
@@ -3,6 +3,7 @@ package http;
use IO::Socket;
use install_any;
+use network;
my $sock;
@@ -11,6 +12,7 @@ sub getFile($) {
local($^W) = 0;
my ($host, $port, $path) = $ENV{URLPREFIX} =~ m,^http://([^/:]+)(?::(\d+))?(/\S*)?$,;
+ $host = network::resolv($host);
$path .= "/" . install_any::relGetFile($_[0]);
$sock->close if $sock;
@@ -24,6 +26,17 @@ sub getFile($) {
"Host: $host" . ($port && ":$port"),
"User-Agent: DrakX/vivelinuxabaszindozs",
"", "");
+
+ #- skip until empty line
+ local $_;
+ my ($now, $last) = 0;
+ do {
+ $last = $now;
+ sysread($sock, $_, 1) || die;
+ sysread($sock, $_, 1) || die if /\015/;
+ $now = /\012/;
+ } until ($now && $last);
+
$sock;
}
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 2b2c6e018..dbacd6e12 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -471,6 +471,7 @@ sub install_urpmi {
my $dir = ${{ nfs => "file://mnt/nfs",
ftp => $ENV{URLPREFIX},
+ http => $ENV{URLPREFIX},
cdrom => "removable_cdrom_1://mnt/cdrom" }}{$method};
local *FILES; open FILES, "hdlist2files $f|";
chop, print LIST "$dir/Mandrake/RPMS/$_\n" foreach <FILES>;
diff --git a/perl-install/network.pm b/perl-install/network.pm
index 9ddde836f..e471734bc 100644
--- a/perl-install/network.pm
+++ b/perl-install/network.pm
@@ -146,6 +146,11 @@ sub sethostname {
syscall_('sethostname', $netc->{HOSTNAME}, length $netc->{HOSTNAME}) or log::l("sethostname failed: $!");
}
+sub resolv($) {
+ my ($name) = @_;
+ is_ip($name) ? $name : join(".", unpack "C4", (gethostbyname $name)[4]);
+}
+
sub dnsServers {
my ($netc) = @_;
grep { $_ } map { $netc->{$_} } qw(dnsServer dnsServer2 dnsServer3);
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 7bc22ada5..83831d28f 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -229,6 +229,7 @@ sub verifyParts($) {
}
sub verifyPrimary($) {
my ($pt) = @_;
+ $_->{start} > 0 || die "partition must NOT start at sector 0" foreach @{$pt->{normal}};
verifyParts_(@{$pt->{normal}}, $pt->{extended});
}
diff --git a/perl-install/standalone/diskdrake b/perl-install/standalone/diskdrake
index a3ffafe83..1a9bba3c3 100755
--- a/perl-install/standalone/diskdrake
+++ b/perl-install/standalone/diskdrake
@@ -22,7 +22,7 @@
# DiskDrake is also based upon the libfdisk and the install from Red Hat Software
-use lib qw(/usr/lib/libDrakX .);
+use lib qw(/usr/lib/libDrakX);
use common qw(:common :functional);
use diskdrake;
use interactive_gtk;
@@ -31,8 +31,13 @@ use fsedit;
use fs;
use log;
+local $_ = join '', @ARGV;
+
+/-h/ and die "usage: XFdrake [--expert] [--testing]\n";
+
+$::expert = /--expert/;
+$::testing = /--testing/;
$::isStandalone = 1;
-#$::expert = 1;
if ($>) {
$ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}";
diff --git a/tools/ddcprobe/not_handled.c b/tools/ddcprobe/not_handled.c
new file mode 100644
index 000000000..40cbb5427
--- /dev/null
+++ b/tools/ddcprobe/not_handled.c
@@ -0,0 +1 @@
+int main() { return 1; }