summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-12-05 23:13:43 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-12-05 23:13:43 +0000
commitacbcf359e5e63583f01c06ecbc4346664c443aa0 (patch)
treec572b519c806b4dbd69e22f2d3133f24f06dfec0 /perl-install
parent6e75349144478ac58cb29697e31d2339d2d0a971 (diff)
downloaddrakx-acbcf359e5e63583f01c06ecbc4346664c443aa0.tar
drakx-acbcf359e5e63583f01c06ecbc4346664c443aa0.tar.gz
drakx-acbcf359e5e63583f01c06ecbc4346664c443aa0.tar.bz2
drakx-acbcf359e5e63583f01c06ecbc4346664c443aa0.tar.xz
drakx-acbcf359e5e63583f01c06ecbc4346664c443aa0.zip
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Makefile2
-rw-r--r--perl-install/Makefile.drakxtools2
-rw-r--r--perl-install/ftp.pm6
-rw-r--r--perl-install/install2.pm7
-rw-r--r--perl-install/install_steps.pm8
-rw-r--r--perl-install/install_steps_gtk.pm9
-rw-r--r--perl-install/install_steps_interactive.pm1
-rw-r--r--perl-install/interactive_gtk.pm6
-rw-r--r--perl-install/modules.pm58
-rw-r--r--perl-install/my_gtk.pm38
-rw-r--r--perl-install/pkgs.pm12
11 files changed, 76 insertions, 73 deletions
diff --git a/perl-install/Makefile b/perl-install/Makefile
index ab5257684..96028e3af 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -33,7 +33,7 @@ tar-drakxtools: clean
$(MAKE) -C ../tools clean
cd .. ; rm -rf drakxtools ; cp -af perl-install drakxtools ; cp -af tools/ddcprobe tools/pnp_serial drakxtools
cd ../drakxtools ; rm -rf install* ForMakefile.pm pkgs.pm ftp.pm t.pm standalone/CVS ; mv Makefile.drakxtools Makefile ; mv -f standalone/* .
- cd .. ; tar cfy drakxtools.tar.bz2 --exclude CVS $(patsubst %,drakxtools/%,Makefile MonitorsDB Newt c ddcprobe pnp_serial po pci_probing resize_fat diskdrake diskdrake.rc XFdrake mousedrake lspcidrake printerdrake keyboarddrake *.pm)
+ cd .. ; tar cfy drakxtools.tar.bz2 --exclude CVS $(patsubst %,drakxtools/%,Makefile MonitorsDB Newt c ddcprobe pnp_serial po pci_probing resize_fat diskdrake diskdrake.rc XFdrake mousedrake lspcidrake printerdrake keyboarddrake netdrake *.pm)
cd .. ; rm -rf drakxtools
$(DIRS):
diff --git a/perl-install/Makefile.drakxtools b/perl-install/Makefile.drakxtools
index 8fb4218b3..8bc1ab03c 100644
--- a/perl-install/Makefile.drakxtools
+++ b/perl-install/Makefile.drakxtools
@@ -16,7 +16,7 @@ $(DIRS):
install:
install -d $(BINDEST) $(ETCDEST) $(SBINDEST) $(LIBDEST) $(X11DEST) $(DIRS:%=$(LIBDEST)/%)
- install diskdrake XFdrake mousedrake lspcidrake printerdrake keyboarddrake $(SBINDEST)
+ install diskdrake XFdrake mousedrake lspcidrake printerdrake keyboarddrake netdrake $(SBINDEST)
install -s ddcprobe/ddcxinfos pnp_serial/pnp_serial $(SBINDEST)
for i in *.pm ; do perl -pe '$$_ = "\n" if /\s*use\s+(diagnostics|vars|strict)/' $$i > $(LIBDEST)/$$i ; done
diff --git a/perl-install/ftp.pm b/perl-install/ftp.pm
index bfabc5abf..bef562dad 100644
--- a/perl-install/ftp.pm
+++ b/perl-install/ftp.pm
@@ -27,8 +27,8 @@ sub fromEnv() {
sub new {
my ($host, $prefix, $login, $password) = @_;
- my @l = do { if ($hosts{$host}) {
- @{$hosts{$host}};
+ my @l = do { if ($hosts{"$host$prefix"}) {
+ @{$hosts{"$host$prefix"}};
} else {
my %options = (Passive => 1);
$options{Firewall} = $ENV{PROXY} if $ENV{PROXY};
@@ -44,7 +44,7 @@ sub new {
$ftp->cwd($prefix);
my @l = ($ftp, \ (my $retr = undef));
- $hosts{$host} = \@l;
+ $hosts{"$host$prefix"} = \@l;
@l;
}};
wantarray ? @l : $l[0];
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 635aae38f..010bc84e6 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -601,7 +601,9 @@ sub main {
"DRAKX_PASSWORD=$o->{lilo}{password}\n",
'DRAKX_USERS="', join(" ", map { $_->{name} } @{$o->{users} || []}), qq("\n));
run_program::rooted($o->{prefix}, "/etc/security/msec/init.sh", $o->{security});
-# unlink "$o->{prefix}/tmp/secure.DrakX";
+ unlink "$o->{prefix}/tmp/secure.DrakX";
+
+ run_program::rooted($o->{prefix}, "kudzu", "-q"); # -q <=> fermetagueuleconnard
fs::write($o->{prefix}, $o->{fstab}, $o->{manualFstab});
modules::write_conf("$o->{prefix}/etc/conf.modules", 'append');
@@ -609,6 +611,9 @@ sub main {
install_any::lnx4win_postinstall($o->{prefix}) if $o->{lnx4win};
install_any::killCardServices();
+ #- have the really bleeding edge ddebug.log for this f*cking msec :-/
+ eval { commands::cp('-f', "/tmp/ddebug.log", "$o->{prefix}/root") };
+
#- ala pixel? :-) [fpons]
sync(); sync();
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 4de59ed3a..ef9fe5114 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -193,7 +193,7 @@ sub installPackages($$) {
my ($o, $packages) = @_;
#- hack to ensure proper ordering for installation of packages.
- my @firstToInstall = qw(basesystem sed);
+ my @firstToInstall = qw(setup basesystem sed);
my %firstInstalled;
my @toInstall;
foreach (@firstToInstall) {
@@ -215,8 +215,6 @@ sub afterInstallPackages($) {
#- why not? cuz weather is nice today :-) [pixel]
sync(); sync();
- run_program::rooted($o->{prefix}, "kudzu", "-q"); # -q <=> fermetagueuleconnard
-
$o->pcmciaConfig();
#- miscellaneous
@@ -268,7 +266,7 @@ sub pppConfig {
my %toreplace;
$toreplace{$_} = $o->{modem}{$_} foreach qw(connection phone login passwd auth domain);
- $toreplace{kpppauth} = ${{ 'Script-based' => 0, PAP => 1, 'Terminal-based' => 2, CHAP => 3, }}{$o->{modem}{auth}};
+ $toreplace{kpppauth} = ${{ 'Script-based' => 0, PAP => 1, 'Terminal-based' => 2, CHAP => 3, }}{$o->{modem}{auth}}; #'
$toreplace{phone} =~ s/[^\d]//g;
$toreplace{dnsserver} = join '', map { "$o->{modem}{$_}," } "dns1", "dns2";
@@ -566,7 +564,7 @@ sub miscellaneous {
$ENV{SECURE_LEVEL} = $o->{security};
cat_("/proc/cmdline") =~ /mem=(\S+)/;
- add2hash_($o->{miscellaneous} ||= {}, { numlock => !$o->{pcmcia}, $1 ? (memsize => $1 + 3) : () });
+ add2hash_($o->{miscellaneous} ||= {}, { numlock => !$o->{pcmcia}, $1 ? (memsize => $1) : () });
}
#------------------------------------------------------------------------------
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 51ea451b6..7afb02d4b 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -16,11 +16,8 @@ use Gtk;
use Gtk::XmHTML;
use devices;
use fsedit;
-use keyboard;
-use network;
use modules;
use install_steps;
-use run_program;
use install_steps_interactive;
use interactive_gtk;
use install_any;
@@ -264,9 +261,9 @@ sub doPartitionDisks($$) {
sub choosePackages {
my ($o, $packages, $compss, $compssUsers, $first_time) = @_;
- if ($::beginner) {
+ if ($::beginner) {
require pkgs;
- pkgs::setSelectedFromCompssList_($o->{compssListLevels}, $o->{packages}, install_any::getAvailableSpace($o) * 0.7, $o->{installClass}, $o->{lang}, $o->{isUpgrade});
+ pkgs::setSelectedFromCompssList_($o->{compssListLevels}, $o->{packages}, install_any::getAvailableSpace($o) * 0.7, $o->{installClass}, $o->{isUpgrade});
} else {
pkgs::setSelectedFromCompssList($o->{compssListLevels}, $o->{packages}, 90, $o->{installClass}) unless $::expert || $o->{isUpgrade};
install_steps_interactive::choosePackages(@_);
@@ -300,7 +297,7 @@ sub chooseSizeToInstall {
($o->{packages_}{ind}, $o->{packages_}{select_level}) =
pkgs::setSelectedFromCompssList_($o->{compssListLevels}, $o->{packages},
pkgs::invCorrectSize($spin->get_value_as_int) * sqr(1024),
- $o->{installClass}, $o->{lang}, $o->{isUpgrade});
+ $o->{installClass}, $o->{isUpgrade});
}
sub choosePackagesTree {
my ($o, $packages, $compss, $compssUsers) = @_;
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 2254b5fcc..57eca154f 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -692,6 +692,7 @@ _("Default") => { val => \$default, type => 'bool' },
$o->ask_warn('',
[ _("Installation of LILO failed. The following error occured:"),
grep { !/^Warning:/ } cat_("$o->{prefix}/tmp/.error") ]);
+ unlink "$o->{prefix}/tmp/.error";
die "already displayed";
}
}
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm
index 089b09e7f..00ec1731a 100644
--- a/perl-install/interactive_gtk.pm
+++ b/perl-install/interactive_gtk.pm
@@ -208,13 +208,15 @@ sub wait_messageW($$$) {
gtkpack(new Gtk::VBox(0,0),
@$messages,
$w->{wait_messageW} = new Gtk::Label($W)));
- $w->sync;
+ $w->{wait_messageW}->signal_connect(expose_event => sub { $w->{displayed} = 1 });
+ $w->sync until $w->{displayed};
$w;
}
sub wait_message_nextW {
my ($o, $messages, $w) = @_;
+ $w->{displayed} = 0;
$w->{wait_messageW}->set(join "\n", @$messages);
- $w->sync;
+ $w->flush until $w->{displayed};
}
sub wait_message_endW {
my ($o, $w) = @_;
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index b671de21e..66040a4b7 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -28,7 +28,7 @@ my @drivers_by_category = (
"ac3200" => "Ansel Communication AC3200",
"acenic" => "AceNIC Gigabit Ethernet",
"pcnet32" => "AMD PC/Net 32",
-# "apricot" => "Apricot 82596", # now builtin the kernel
+ "82596" => "Apricot 82596",
# "atp" => "ATP", # builtin the kernel
"cs89x0" => "CS89x0",
"de4x5" => "Digital 425,434,435,450,500",
@@ -70,7 +70,6 @@ my @drivers_by_category = (
"wd" => "WD8003, WD8013 and compatible",
"yellowfin" => "Symbios Yellowfin G-NIC",
- "82596" => "82596",
"8390" => "8390",
"dmfe" => "dmfe",
"dummy" => "dummy",
@@ -87,28 +86,18 @@ my @drivers_by_category = (
"sunrpc" => "sunrpc",
}],
[ 'scsi', {
- "DAC960" => "Mylex DAC960",
"aha152x" => "Adaptec 152x",
"aha1542" => "Adaptec 1542",
"aha1740" => "Adaptec 1740",
"aic7xxx" => "Adaptec 2740, 2840, 2940",
"advansys" => "AdvanSys Adapters",
-# "dpt" => "Distributed Tech SmartCache/Raid I-IV Controller", # not there anymore?
"in2000" => "Always IN2000",
"AM53C974" => "AMD SCSI",
- "megaraid" => "AMI MegaRAID",
"BusLogic" => "BusLogic Adapters",
- "cpqarray" => "Compaq Smart-2/P RAID Controller",
"dtc" => "DTC 3180/3280",
- "eata" => "EATA SCSI PM2x24/PM3224",
- "eata_dma" => "EATA DMA Adapters",
- "eata_pio" => "EATA PIO Adapters",
"seagate" => "Future Domain TMC-885, TMC-950",
"fdomain" => "Future Domain TMC-16x0",
- "gdth" => "ICP Disk Array Controller",
"initio" => "Initio",
- "ips" => "IBM ServeRAID controller",
- "ppa" => "Iomega PPA3 (parallel port Zip)",
"g_NCR5380" => "NCR 5380",
"NCR53c406a" => "NCR 53c406a",
"53c7,8xx" => "NCR 53c7xx",
@@ -124,21 +113,32 @@ my @drivers_by_category = (
"wd7000" => "Western Digital wd7000",
"a100u2w" => "a100u2w",
- "atp870u" => "atp870u",
+ "atp870u" => "atp870u (Acard/Artop)",
"dc395x_trm" => "dc395x_trm",
"ide-scsi" => "ide-scsi",
- "imm" => "Iomega Zip (new driver)",
"psi240i" => "psi240i",
"qlogicfc" => "qlogicfc",
"sim710" => "sim710",
- "st" => "st",
"sym53c416" => "sym53c416",
"tmscsim" => "tmscsim",
}],
+[ 'disk', {
+ "DAC960" => "Mylex DAC960",
+# "dpt" => "Distributed Tech SmartCache/Raid I-IV Controller", # not there anymore?
+ "megaraid" => "AMI MegaRAID",
+ "cpqarray" => "Compaq Smart-2/P RAID Controller",
+ "gdth" => "ICP Disk Array Controller",
+ "ips" => "IBM ServeRAID controller",
+ "eata" => "EATA SCSI PM2x24/PM3224",
+ "eata_pio" => "EATA PIO Adapters",
+ "eata_dma" => "EATA DMA Adapters",
+ "st" => "st",
+ "ppa" => "Iomega PPA3 (parallel port Zip)",
+ "imm" => "Iomega Zip (new driver)",
+}],
[ 'cdrom', {
"sbpcd" => "SoundBlaster/Panasonic",
"aztcd" => "Aztech CD",
-# "bpcd" => "Backpack CDROM", # not there anymore?
"gscd" => "Goldstar R420",
"isp16" => "ISP16/MAD16/Mozart",
"mcd" => "Mitsumi",
@@ -200,6 +200,26 @@ my @drivers_by_category = (
"ds" => "PCMCIA card support",
"i82365" => "PCMCIA i82365 controller",
}],
+[ 'paride', {
+ "aten" => "ATEN EH-100",
+ "bpck" => "Microsolutions backpack",
+ "comm" => "DataStor (older type) commuter adapter",
+ "dstr" => "DataStor EP-2000",
+ "epat" => "Shuttle EPAT",
+ "epia" => "Shuttle EPIA",
+ "fit2" => "Fidelity Intl. (older type)",
+ "fit3" => "Fidelity Intl. TD-3000",
+ "frpw" => "Freecom Power",
+ "friq" => "Freecom IQ (ASIC-2)",
+ "kbic" => "KingByte KBIC-951A and KBIC-971A",
+ "ktti" => "KT Tech. PHd",
+ "on20" => "OnSpec 90c20",
+ "on26" => "OnSpec 90c26",
+ "pd" => "Parallel port IDE disks",
+ "pcd" => "Parallel port CD-ROM",
+ "pf" => "Parallel port ATAPI disk",
+ "paride" => "Main parallel port module",
+}],
[ 'raid', {
"linear" => "linear",
"raid0" => "raid0",
@@ -257,11 +277,7 @@ while (my ($k, $v) = each %drivers) {
sub module_of_type($) {
my ($type) = @_;
- if ($type eq 'scsi&cdrom') {
- grep { $drivers{$_}{type} =~ /^(scsi|cdrom)$/ && !exists $scsi_raid{$_} } keys %drivers;
- } else {
- grep { $drivers{$_}{type} eq $type } keys %drivers;
- }
+ grep { $drivers{$_}{type} =~ /^($type)$/ } keys %drivers;
}
sub text_of_type($) {
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index ba784340c..d6df3696e 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -65,15 +65,7 @@ sub destroy($) {
sub DESTROY { goto &destroy }
sub sync($) {
my ($o) = @_;
-
- flush();
-
show($o);
-
- my $h = Gtk->idle_add(sub { Gtk->main_quit; 1 });
- map { Gtk->main } (1..4);
- Gtk->idle_remove($h);
-
flush();
}
sub flush(;$) {
@@ -218,19 +210,13 @@ sub create_box_with_title($@) {
sub createScrolledWindow($) {
my ($W) = @_;
- if (member(ref $W, qw(Gtk::Text))) {
- gtkpack_(new Gtk::HBox(0,0),
- 1, $W,
- 0, new Gtk::VScrollbar($W->vadj));
- } else {
- my $w = new Gtk::ScrolledWindow(undef, undef);
- $w->set_policy('automatic', 'automatic');
- member(ref $W, qw(Gtk::CList Gtk::CTree)) ?
- $w->add($W) :
- $w->add_with_viewport($W);
- $W->show;
- $w
- }
+ my $w = new Gtk::ScrolledWindow(undef, undef);
+ $w->set_policy('automatic', 'automatic');
+ member(ref $W, qw(Gtk::CList Gtk::CTree Gtk::Text)) ?
+ $w->add($W) :
+ $w->add_with_viewport($W);
+ $W->show;
+ $w
}
sub create_menu($@) {
@@ -299,7 +285,7 @@ sub _create_window($$) {
my $f = new Gtk::Frame(undef);
$w->set_name("Title");
- if ($::isStandalone || $o->{no_border} || 1) {
+ if ($::isStandalone || $o->{no_border} || 1) { # hack
gtkadd($w, $f);
} else {
my $t = new Gtk::Table(0, 0, 0);
@@ -326,9 +312,8 @@ sub _create_window($$) {
$w->set_title($title);
- $w->signal_connect("map_event" => sub { c::XSetInputFocus($w->window->XWINDOW); }) if $my_gtk::force_focus || $o->{force_focus};
- $w->signal_connect("expose_event" => sub { c::XSetInputFocus($w->window->XWINDOW); }) if $my_gtk::force_focus || $o->{force_focus};
- $w->signal_connect("delete_event" => sub { undef $o->{retval}; Gtk->main_quit });
+ $w->signal_connect(expose_event => sub { c::XSetInputFocus($w->window->XWINDOW); }) if $my_gtk::force_focus || $o->{force_focus};
+ $w->signal_connect(delete_event => sub { undef $o->{retval}; Gtk->main_quit });
$w->set_uposition(@{$my_gtk::force_position || $o->{force_position}}) if $my_gtk::force_position || $o->{force_position};
$w->signal_connect("key_press_event" => sub {
@@ -521,8 +506,7 @@ sub _ask_from_list {
1, @$l > 15 ? gtkset_usize(createScrolledWindow($list), 200, 280) : $list,
@okcancel || !ref $title ? (0, create_okcancel($o, @okcancel)) : ())
));
-
- $o->sync; #- otherwise the moveto is not done
+ $o->show; #- otherwise the moveto is not done
my $toselect; map_index {
$list->append($_);
$toselect = $::i if $def && $_ eq $def;
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 01d744038..020ccf7c2 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -145,12 +145,12 @@ sub psUsingHdlist() {
my $f = install_any::getFile('hdlist') or die "no hdlist found";
my %packages;
-# my ($noSeek, $end) = 0;
-# $end = sysseek F, 0, 2 or die "seek failed";
-# sysseek F, 0, 0 or die "seek failed";
+#- my ($noSeek, $end) = 0;
+#- $end = sysseek F, 0, 2 or die "seek failed";
+#- sysseek F, 0, 0 or die "seek failed";
while (my $header = c::headerRead(fileno $f, 1)) {
-# or die "error reading header at offset ", sysseek(F, 0, 1);
+#- or die "error reading header at offset ", sysseek(F, 0, 1);
my $name = c::headerGetEntry($header, 'name');
$packages{$name} = {
@@ -512,8 +512,8 @@ sub install($$) {
};
my $callbackClose = sub { $packages{$_[0]}{installed} = 1; };
my $callbackMessage = \&pkgs::installCallback;
-# my $callbackStart = sub { log::ld("starting installing package ", $_[0]) };
-# my $callbackProgress = sub { log::ld("progressing installation ", $_[0], "/", $_[1]) };
+#- my $callbackStart = sub { log::ld("starting installing package ", $_[0]) };
+#- my $callbackProgress = sub { log::ld("progressing installation ", $_[0], "/", $_[1]) };
#- do not modify/translate the message used with installCallback since
#- these are keys during progressing installation, or change in other