summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-12-20 00:05:37 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-12-20 00:05:37 +0000
commit73664f3bb1816f30dfe94f41ea6241a9c5328114 (patch)
tree5d2278393b17bb855173b88c47f85d153624cf9f /perl-install
parent3fae0b21431abe463ca6bfa2746d48d6a6756aa4 (diff)
downloaddrakx-73664f3bb1816f30dfe94f41ea6241a9c5328114.tar
drakx-73664f3bb1816f30dfe94f41ea6241a9c5328114.tar.gz
drakx-73664f3bb1816f30dfe94f41ea6241a9c5328114.tar.bz2
drakx-73664f3bb1816f30dfe94f41ea6241a9c5328114.tar.xz
drakx-73664f3bb1816f30dfe94f41ea6241a9c5328114.zip
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/ChangeLog16
-rw-r--r--perl-install/Xconfigurator_consts.pm2
-rw-r--r--perl-install/install2.pm41
-rw-r--r--perl-install/install_any.pm6
-rw-r--r--perl-install/install_steps.pm16
-rw-r--r--perl-install/install_steps_gtk.pm2
-rw-r--r--perl-install/pkgs.pm32
-rwxr-xr-xperl-install/standalone/XFdrake6
-rwxr-xr-xperl-install/standalone/draksec3
9 files changed, 65 insertions, 59 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog
new file mode 100644
index 000000000..3c1566445
--- /dev/null
+++ b/perl-install/ChangeLog
@@ -0,0 +1,16 @@
+1999-12-19 Pixel <pixel@mandrakesoft.com>
+
+ * install2.pm (configureX): write current fstab and conf.modules
+ before X configuration (da
+
+
+ * install_any.pm (install_urpmi): added
+ $SIG{CHLD} = 'IGNORE';
+ fork and exec("gzip", "-9", $f) || c::_exit(1);
+ may cause problems?
+
+ * install2.pm (main): moved updating things for kde in
+ install_steps::afterInstallPackages
+ * install2.pm (main): moved msec in in addToBeDone after
+ doInstallStep in install2::miscellaneous
+
diff --git a/perl-install/Xconfigurator_consts.pm b/perl-install/Xconfigurator_consts.pm
index 8ff939f5e..f747586e2 100644
--- a/perl-install/Xconfigurator_consts.pm
+++ b/perl-install/Xconfigurator_consts.pm
@@ -511,7 +511,7 @@ Section "Keyboard"
# following line
#Protocol "Xqueue"
- AutoRepeat 500 5
+ AutoRepeat 250 30
# Let the server do the NumLock processing. This should only be
# required when using pre-R6 clients
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index b637203f5..77af259fd 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -50,7 +50,7 @@ my (%installSteps, @orderedInstallSteps);
partitionDisks => [ __("Setup filesystems"), 1, 0, '', "selectPath" ],
formatPartitions => [ __("Format partitions"), 1, -1, '', "partitionDisks" ],
choosePackages => [ __("Choose packages to install"), 1, 1, 'beginner', "selectPath" ],
- doInstallStep => [ __("Install system"), 1, -1, ''],#, ["formatPartitions", "selectPath"] ],
+ doInstallStep => [ __("Install system"), 1, -1, '', ["formatPartitions", "selectPath"] ],
configureNetwork => [ __("Configure networking"), 1, 1, 'beginner', "formatPartitions" ],
installCrypto => [ __("Cryptographic"), 1, 1, '!expert', "configureNetwork" ],
configureTimezone => [ __("Configure timezone"), 1, 1, '', "doInstallStep" ],
@@ -362,6 +362,20 @@ sub doInstallStep {
#------------------------------------------------------------------------------
sub miscellaneous {
$o->miscellaneous($_[0]);
+
+ addToBeDone {
+ setVarsInSh("$o->{prefix}/etc/sysconfig/system", {
+ HDPARM => $o->{miscellaneous}{HDPARM},
+ TYPE => $o->{installClass},
+ SECURITY => $o->{security},
+ });
+ install_any::fsck_option();
+
+ local $ENV{LILO_PASSWORD} = $o->{lilo}{password};
+ run_program::rooted($o->{prefix}, "/etc/security/msec/init.sh", $o->{security});
+ chmod 0755, map { "$o->{prefix}/etc/X11/$_" } qw(xdm/Xsession xinit/xinitrc);
+
+ } 'doInstallStep';
}
#------------------------------------------------------------------------------
@@ -440,6 +454,11 @@ sub setupBootloader {
#------------------------------------------------------------------------------
sub configureX {
my ($clicked) = $_[0];
+
+ #- done here and also at the end of install2.pm, just in case...
+ fs::write($o->{prefix}, $o->{fstab}, $o->{manualFstab}, $o->{useSupermount});
+ modules::write_conf("$o->{prefix}/etc/conf.modules", 'append');
+
$o->setupXfree if $o->{packages}{XFree86}{installed} || $clicked;
}
#------------------------------------------------------------------------------
@@ -450,7 +469,7 @@ sub exitInstall { $o->exitInstall(getNextStep() eq "exitInstall") }
#- MAIN
#-######################################################################################
sub main {
- $SIG{__DIE__} = sub { chomp(my $err = $_[0]); log::l("ERROR: $err") };
+ $SIG{__DIE__} = sub { chomp(my $err = $_[0]); log::l("WARNING: $err") };
$::beginner = $::expert = $::g_auto_install = 0;
@@ -602,28 +621,14 @@ sub main {
last if $o->{step} eq 'exitInstall';
}
-
- local $ENV{LILO_PASSWORD} = $o->{lilo}{password};
- run_program::rooted($o->{prefix}, "/etc/security/msec/init.sh", $o->{security});
-
- chmod 0755, map { "$o->{prefix}/etc/X11/$_" } qw(xdm/Xsession xinit/xinitrc);
-
- run_program::rooted($o->{prefix}, "kudzu", "-q"); # -q <=> fermetagueuleconnard
-
fs::write($o->{prefix}, $o->{fstab}, $o->{manualFstab}, $o->{useSupermount});
modules::write_conf("$o->{prefix}/etc/conf.modules", 'append');
- #- update language and icons for KDE.
- log::l("updating language for kde");
- install_any::kdelang_postinstall($o->{prefix});
- log::l("updating kde icons according to available devices");
- install_any::kdeicons_postinstall($o->{prefix});
-
- run_program::rooted($o->{prefix}, "kdeDesktopCleanup");
-
install_any::lnx4win_postinstall($o->{prefix}) if $o->{lnx4win};
install_any::killCardServices();
+ run_program::rooted($o->{prefix}, "kudzu", "-q"); # -q <=> fermetagueuleconnard
+
#- have the really bleeding edge ddebug.log for this f*cking msec :-/
eval { commands::cp('-f', "/tmp/ddebug.log", "$o->{prefix}/root") };
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index c2885cf26..39ee33259 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -507,6 +507,8 @@ sub install_urpmi {
chop, print LIST "$dir/Mandrake/RPMS/$_\n" foreach <FILES>;
close FILES or log::l("hdlist2files failed"), return;
+ run_program::run("gzip", "-9", $f);
+
$dir .= "/Mandrake/RPMS with ../base/hdlist" if $method =~ /ftp|http/;
eval { output "$prefix/etc/urpmi/urpmi.cfg", "$name $dir\n" };
}
@@ -582,9 +584,7 @@ sub kdelang_postinstall($) {
my %i18n = getVarsFromSh("$prefix/etc/sysconfig/i18n");
my $lang = $i18n{LANG} eq 'se' ? 'sv' : $i18n{LANG};
- update_userkderc($prefix, 'Locale', {
- language => "Language=$lang\n",
- });
+ update_userkderc($prefix, 'Locale', { language => "Language=$lang\n" });
}
sub kdeicons_postinstall($) {
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index d401d58a0..96e9306c8 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -256,16 +256,6 @@ sub afterInstallPackages($) {
#- remove the nasty acon...
run_program::rooted($o->{prefix}, "chkconfig", "--del", "acon") unless $ENV{LANGUAGE} =~ /ar/;
- #- miscellaneous
- addToBeDone {
- setVarsInSh("$o->{prefix}/etc/sysconfig/system", {
- HDPARM => $o->{miscellaneous}{HDPARM},
- TYPE => $o->{installClass},
- SECURITY => $o->{security},
- });
- install_any::fsck_option();
- } 'doInstallStep';
-
if ($o->{pcmcia}) {
substInFile { s/.*(TaskBarShowAPMStatus).*/$1=1/ } "$o->{prefix}/usr/lib/X11/icewm/preferences";
eval { commands::cp("$o->{prefix}/usr/share/applnk/System/kapm.kdelnk",
@@ -280,6 +270,12 @@ sub afterInstallPackages($) {
install_any::install_urpmi($o->{prefix}, $o->{method});
substInFile { s/^urpmi\n//; $_ .= "urpmi\n" if eof } "$msec/group.conf" if -d $msec;
}
+
+ #- update language and icons for KDE.
+ log::l("updating language for kde");
+ install_any::kdelang_postinstall($o->{prefix});
+ log::l("updating kde icons according to available devices");
+ install_any::kdeicons_postinstall($o->{prefix});
}
#------------------------------------------------------------------------------
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index f48221efa..aa72c0527 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -782,7 +782,7 @@ EndSection
Section "Keyboard"
Protocol "Standard"
- AutoRepeat 500 5
+ AutoRepeat 250 30
LeftAlt Meta
RightAlt Meta
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 4b00800a7..a50f8a54e 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -79,8 +79,8 @@ sub select($$;$) {
}
1;
}
-sub unselect($$;$) {
- my ($packages, $p, $size) = @_;
+sub unselect($$) {
+ my ($packages, $p) = @_;
$p->{base} and return;
my $set = set_new($p->{name});
my $l = $set->{list};
@@ -98,26 +98,10 @@ sub unselect($$;$) {
$i->{selected} <= 0 || $i->{base} and next;
if (--$i->{selected} == 0) {
- push @$l, @{$i->{deps} || []} if !$size || ($size -= $i->{size}) > 0;
+ push @$l, @{$i->{deps} || []};
}
}
- return if defined $size && $size <= 0;
-
-#- #- garbage collect for circular dependencies
-#- my $changed = 0; #1;
-#- while ($changed) {
-#- $changed = 0;
-#- NEXT: foreach my $p (grep { $_->{selected} > 0 && !$_->{base} } values %$packages) {
-#- my $set = set_new(@{$p->{provides}});
-#- foreach (@{$set->{list}}) {
-#- my $q = Package($packages, $_);
-#- $q->{selected} == -1 || $q->{base} and next NEXT;
-#- set_add($set, @{$q->{provides}}) if $q->{selected};
-#- }
-#- $p->{selected} = 0;
-#- $changed = 1;
-#- }
-#- }
+ 1;
}
sub toggle($$) {
my ($packages, $p) = @_;
@@ -306,7 +290,7 @@ sub setSelectedFromCompssList {
$nb += $_->{size} if $_->{selected};
}
if ($nb > $max_size) {
- unselect($packages, $p, $nb - $max_size) unless $isUpgrade;
+ unselect($packages, $p) unless $isUpgrade;
$min_level = $p->{values}[$ind];
last;
}
@@ -545,10 +529,6 @@ sub install($$$) {
my ($prefix, $isUpgrade, $toInstall) = @_;
my %packages;
- foreach my $p (@$toInstall) {
- print "$p->{name}\n";
- }
-
return if $::g_auto_install;
log::l("reading /usr/lib/rpm/rpmrc");
@@ -586,7 +566,7 @@ sub install($$$) {
my $callbackOpen = sub {
my $f = (my $p = $packages{$_[0]})->{file};
print LOG "$f\n";
- my $fd = install_any::getFile($f) or log::l("bad file $f");
+ my $fd = install_any::getFile($f) or log::l("ERROR: bad file $f");
$fd ? fileno $fd : -1;
};
my $callbackClose = sub { $packages{$_[0]}{installed} = 1; };
diff --git a/perl-install/standalone/XFdrake b/perl-install/standalone/XFdrake
index b625647be..6b181d88a 100755
--- a/perl-install/standalone/XFdrake
+++ b/perl-install/standalone/XFdrake
@@ -36,6 +36,12 @@ $::skiptest = /-skiptest/;
$::testing = /-testing/;
$::isStandalone = 1;
+my $f = "/usr/X11R6/lib/X11/Cards";
+-e $f or system("urpmi --auto XFree86 XFree86-75dpi-fonts");
+-e $f or die "install XFree86 first!\n";
+
+`pidof xfs` > 0 or system("/etc/rc.d/init.d/xfs start");
+
system("mount /proc 2>/dev/null"); # ensure /proc is mounted for pci probing
my $in = vnew interactive('su');
diff --git a/perl-install/standalone/draksec b/perl-install/standalone/draksec
index 04d332541..2eb11319c 100755
--- a/perl-install/standalone/draksec
+++ b/perl-install/standalone/draksec
@@ -29,7 +29,10 @@ delete @l{0,1,5} unless $::expert;
if (my $level = $in->ask_from_list('', _("Choose security level"), [ values %l ], $l{$ENV{SECURE_LEVEL}})) {
my $w = $in->wait_message('', _("Setting security level"));
$in->suspend;
+
+ $ENV{LILO_PASSWORD} = ''; # make it non interactive
system("/etc/security/msec/init.sh ". $m{$level});
+
$in->resume;
}