diff options
author | Francois Pons <fpons@mandriva.com> | 2000-09-06 14:21:26 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-09-06 14:21:26 +0000 |
commit | cc85e855ad2d11bddbabc9e0a4d4e41df5ff6cc7 (patch) | |
tree | fdc3ea1a0c8929885df80852b7225f3c348cc3cf | |
parent | fe108560318dbdae544d30e6850177288c814066 (diff) | |
download | drakx-backup-do-not-use-cc85e855ad2d11bddbabc9e0a4d4e41df5ff6cc7.tar drakx-backup-do-not-use-cc85e855ad2d11bddbabc9e0a4d4e41df5ff6cc7.tar.gz drakx-backup-do-not-use-cc85e855ad2d11bddbabc9e0a4d4e41df5ff6cc7.tar.bz2 drakx-backup-do-not-use-cc85e855ad2d11bddbabc9e0a4d4e41df5ff6cc7.tar.xz drakx-backup-do-not-use-cc85e855ad2d11bddbabc9e0a4d4e41df5ff6cc7.zip |
*** empty log message ***
-rw-r--r-- | perl-install/install_steps.pm | 11 | ||||
-rwxr-xr-x | perl-install/live_install | 66 | ||||
-rw-r--r-- | perl-install/printerdrake.pm | 6 |
3 files changed, 51 insertions, 32 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 930a8714a..132930ecb 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -271,6 +271,7 @@ sub choosePackages { sub beforeInstallPackages { my ($o) = @_; + log::l("before install packages"); #- save these files in case of upgrade failure. if ($o->{isUpgrade}) { foreach (@filesToSaveForUpgrade) { @@ -281,20 +282,27 @@ sub beforeInstallPackages { } } + log::l("before install packages, after copy"); #- some packages need such files for proper installation. any::writeandclean_ldsoconf($o->{prefix}); + log::l("before install packages, after writing ld.so.conf"); $::live or fs::write($o->{prefix}, $o->{fstab}, $o->{manualFstab}, $o->{useSupermount}); + log::l("before install packages, after adding localhost in hosts"); network::add2hosts("$o->{prefix}/etc/hosts", "localhost.localdomain", "127.0.0.1"); + log::l("before openning database"); require pkgs; pkgs::init_db($o->{prefix}, $o->{isUpgrade}); + log::l("initialized database"); } sub pkg_install { my ($o, @l) = @_; + log::l("selecting packages"); require pkgs; pkgs::selectPackage($o->{packages}, pkgs::packageByName($o->{packages}, $_) || die "$_ rpm not found") foreach @l; + log::l("installing packages"); $o->installPackages; } @@ -671,7 +679,8 @@ sub readBootloaderConfigBeforeInstall { foreach my $e (@{$o->{bootloader}{entries}}) { while (my $v = readlink "$o->{prefix}/$e->{kernel_or_dev}") { $v = "/boot/$v" if $v !~ m|^/|; - -e "$o->{prefix}$v" or next; + log::l("testing for presence of file $o->{prefix}$v"); + -e "$o->{prefix}$v" or last; log::l("renaming /boot/$e->{kernel_or_dev} entry by $v"); $e->{kernel_or_dev} = $v; } diff --git a/perl-install/live_install b/perl-install/live_install index 4f519f0fc..a9440db3e 100755 --- a/perl-install/live_install +++ b/perl-install/live_install @@ -1,28 +1,38 @@ -#!../perl - -my $dir = `pwd`; -chomp $dir; -$dir .= "/../../.."; - -#- update /tmp/rhimage which points to top dir of Mandrake CD. -system "/bin/rm", "-rf", "/tmp/rhimage"; -mkdir "/tmp/rhimage", 0700 or die "cannot create directory /tmp/rhimage"; -system "/bin/rm", "-rf", "/tmp/drakx"; -mkdir "/tmp/drakx", 0700 or die "cannot create directory /tmp/drakx\n"; - -#- copy whole set of mdkinst tree and symlink to the CD. -foreach (qw(Mandrake RPMS misc boot images)) { - symlink "$dir/../../$_", "/tmp/rhimage/$_"; -} -system "/bin/cp", "-a", "$dir/../../Mandrake/mdkinst", "/tmp/drakx"; - -#- start the true live_install. -if (-x "/tmp/drakx/mdkinst/usr/bin/perl-install/live_install2") { - chdir "/tmp/drakx/mdkinst/usr/bin/perl-install2"; - system "/tmp/drakx/mdkinst/usr/bin/perl-install/live_install2"; -} else { - print STDERR "unable to get a working live system to start, check your working directory"; -} - -system "/bin/rm", "-rf", "/tmp/drakx"; -system "/bin/rm", "-rf", "/tmp/rhimage"; +#!/bin/sh + +dir=`pwd`/../../.. + +/bin/rm -rf /tmp/rhimage +mkdir -m 0700 /tmp/rhimage || exit 1 +/bin/rm -rf /tmp/drakx +mkdir -m 0700 /tmp/drakx || exit 2 + +for i in Mandrake RPMS misc boot images +do + ln -sf "$dir/../../$i" "/tmp/rhimage/$i" +done + +/bin/cp -a "$dir/../../Mandrake/mdkinst" "/tmp/drakx" + +if [ -x "/tmp/drakx/mdkinst/usr/bin/perl-install/live_install2" ]; then + $perlcoredir=/usr/lib/perl5/5.6.0/i386-linux/CORE + cd /tmp/drakx/mdkinst/usr/bin/perl-install + if [ -x $perlcoredir/libperl.so ]; then + mv $perlcoredir/libperl.so /tmp/drakx/mdkinst + else + mkdir -p $perlcoredir + ln -sf /tmp/drakx/mdkinst/$perlcoredir/libperl.so $perlcoredir/libperl.so + fi + + ../../../lib/ld-linux.so.2 ../perl ./live_install2 + + rm -f $perlcoredir/libperl.so + if [ -x /tmp/drakx/mdkinst ]; then + mv /tmp/drakx/mdkinst/libperl.so $perlcoredir/libperl.so + fi +else + echo >&2 "unable to get a working live system to start, check your working directory" +fi + +#/bin/rm -rf /tmp/drakx +#/bin/rm -rf /tmp/rhimage diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm index 065e7c1a3..fc9743ba6 100644 --- a/perl-install/printerdrake.pm +++ b/perl-install/printerdrake.pm @@ -49,7 +49,7 @@ _("Printer Device") => {val => \$printer->{DEVICE}, list => \@port } ], ); #- make the DeviceURI from DEVICE. - $printer->{DeviceURI} = ($printer->{DEVICE} =~ /usb/ ? "usb:" : "parallel:") . $_->{DEVICE}; + $printer->{DeviceURI} = ($printer->{DEVICE} =~ /usb/ ? "usb:" : "parallel:") . $printer->{DEVICE}; foreach (@parport) { $printer->{DEVICE} eq $_->{port} or next; @@ -149,7 +149,7 @@ sub setup_uri($$$) { my ($printer, $in, $install) = @_; return if !$in->ask_from_entries_refH(_("Printer Device URI"), -_("You can specify directly the URI to access the printer with CUPS."), +_("You can specify directly the URI to access the printer with CUPS."), [ _("Printer Device URI") => { val => \$printer->{DeviceURI}, list => [ printer::get_direct_uri(), "file:/", "http://", @@ -157,7 +157,7 @@ _("Printer Device URI") => { val => \$printer->{DeviceURI}, list => [ printer::g "lpq://", "smb://", "socket://", - ], }, + ], not_edit => 0 }, ], ); if ($printer->{DeviceURI} =~ /^smb:/) { &$install('samba'); |