From 825da272c3b2e89b86e19656ade350240204896b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 22 Oct 1999 16:58:56 +0000 Subject: no_comment --- perl-install/c/stuff.xs.pm | 3 +- perl-install/install2.pm | 30 +++++++++---------- perl-install/install_any.pm | 24 ++++++++++++++- perl-install/install_steps.pm | 2 +- perl-install/share/po/DrakX.pot | 65 ++++++++++++++++++----------------------- 5 files changed, 69 insertions(+), 55 deletions(-) diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm index 2b301d1b0..12bdc913c 100644 --- a/perl-install/c/stuff.xs.pm +++ b/perl-install/c/stuff.xs.pm @@ -17,6 +17,7 @@ print ' #include #include #include +#include #include #include @@ -549,7 +550,7 @@ headerGetEntry_string_list(h, query) [ qw(int S_IFCHR S_IFBLK KDSKBENT KT_SPEC NR_KEYS MAX_NR_KEYMAPS BLKRRPART TIOCSCTTY HDIO_GETGEO BLKGETSIZE MS_MGC_VAL MS_RDONLY O_NONBLOCK SECTORSIZE WNOHANG - VT_ACTIVATE VT_WAITACTIVE VT_GETSTATE + VT_ACTIVATE VT_WAITACTIVE VT_GETSTATE CDROM_LOCKDOOR ) ], ); push @macros, [ qw(int RPMTAG_NAME RPMTAG_GROUP RPMTAG_SIZE RPMTAG_VERSION RPMTAG_SUMMARY RPMTAG_DESCRIPTION RPMTAG_RELEASE RPMTAG_ARCH RPMTAG_FILENAMES RPMTAG_OBSOLETES) ] diff --git a/perl-install/install2.pm b/perl-install/install2.pm index dbd447232..688bf1894 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -267,7 +267,12 @@ sub setupSCSI { #------------------------------------------------------------------------------ sub partitionDisks { - return if $o->{lnx4win} || $o->{isUpgrade}; + return + $o->{fstab} = [ + { device => "loop7", mntpoint => "/", isFormatted => 1, isMounted => 1 }, + { device => "/initrd/dos/lnx4win/swapfile", mntpoint => "swap", isFormatted => 1, isMounted => 1 }, + ] if $o->{lnx4win}; + return if $o->{isUpgrade}; $::o->{steps}{formatPartitions}{done} = 0; eval { fs::umount_all($o->{fstab}, $o->{prefix}) } if $o->{fstab} && !$::testing; @@ -294,17 +299,16 @@ sub partitionDisks { } sub formatPartitions { - return if $o->{lnx4win} || $o->{isUpgrade}; - - $o->choosePartitionsToFormat($o->{fstab}); + unless ($o->{lnx4win} || $o->{isUpgrade}) { + $o->choosePartitionsToFormat($o->{fstab}); - unless ($::testing) { - $o->formatPartitions(@{$o->{fstab}}); - fs::mount_all([ grep { isExt2($_) || isSwap($_) } @{$o->{fstab}} ], $o->{prefix}); + unless ($::testing) { + $o->formatPartitions(@{$o->{fstab}}); + fs::mount_all([ grep { isExt2($_) || isSwap($_) } @{$o->{fstab}} ], $o->{prefix}); + } } mkdir "$o->{prefix}/$_", 0755 foreach qw(dev etc etc/sysconfig etc/sysconfig/console etc/sysconfig/network-scripts - etc/sysconfig/network-scripts home mnt root tmp var var/tmp var/lib var/lib/rpm); } @@ -543,9 +547,8 @@ sub main { fs::write($o->{prefix}, $o->{fstab}); modules::write_conf("$o->{prefix}/etc/conf.modules", 'append'); - run_program::run("/usr/bin/postinstall2") if $o->{lnx4win}; - - killCardServices(); + install_any::lnx4win_postinstall() if $o->{lnx4win}; + install_any::killCardServices(); log::l("installation complete, leaving"); print "\n" x 30; @@ -561,11 +564,6 @@ sub main { } } -sub killCardServices { - my $pid = chop_(cat_("/tmp/cardmgr.pid")); - $pid and kill(15, $pid); #- send SIGTERM -} - #-###################################################################################### #- Wonderful perl :( #-###################################################################################### diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 4d867ab4b..1575db050 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -13,7 +13,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK); #-###################################################################################### #- misc imports #-###################################################################################### -use common qw(:common :system :functional); +use common qw(:common :system :functional :file); use commands; use run_program; use partition_table qw(:types); @@ -272,3 +272,25 @@ sub enableMD5 { print; } } + +sub lnx4win_postinstall { + my ($prefix) = @_; + my $dir = "/dos/lnx4win"; + my $kernel = "$dir/vmlinuz"; + rename $kernel, "$kernel.old"; + commands::cp("-f", "$prefix/boot/vmlinuz", $kernel); + + unlink "$dir/size.txt"; + unlink "$dir/swapfile.txt"; + symlinkf "/initrd/dos", "$prefix/mnt/dos"; +} + +sub killCardServices { + my $pid = chop_(cat_("/tmp/cardmgr.pid")); + $pid and kill(15, $pid); #- send SIGTERM +} + +sub unlockCdroms { + ioctl detect_devices::tryOpen($_), c::CDROM_LOCKDOOR(), 0 + foreach detect_devices::cdroms(); +} diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 9b4d5d260..41d7a59cb 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -381,7 +381,7 @@ sub setupXfree { } #------------------------------------------------------------------------------ -sub exitInstall {} +sub exitInstall { install_any::unlockCdroms } #-###################################################################################### #- Wonderful perl :( diff --git a/perl-install/share/po/DrakX.pot b/perl-install/share/po/DrakX.pot index 5e7728d38..f6c57d806 100644 --- a/perl-install/share/po/DrakX.pot +++ b/perl-install/share/po/DrakX.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 1999-10-22 13:03+0200\n" +"POT-Creation-Date: 1999-10-22 19:05+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -82,12 +82,12 @@ msgid "" "try changing some parameters" msgstr "" -#: ../Xconfigurator.pm_.c:312 +#: ../Xconfigurator.pm_.c:312 ../t2.pm_.c:15 #, c-format msgid "(leaving in %d seconds)" msgstr "" -#: ../Xconfigurator.pm_.c:316 ../my_gtk.pm_.c:431 +#: ../Xconfigurator.pm_.c:316 ../my_gtk.pm_.c:431 ../t2.pm_.c:19 msgid "Is this correct?" msgstr "" @@ -662,7 +662,7 @@ msgstr "" msgid "Choose the new size" msgstr "" -#: ../diskdrake.pm_.c:445 ../install_steps_graphical.pm_.c:301 +#: ../diskdrake.pm_.c:445 ../install_steps_graphical.pm_.c:302 msgid "MB" msgstr "" @@ -1166,15 +1166,15 @@ msgstr "" msgid "server" msgstr "" -#: ../install2.pm_.c:293 +#: ../install2.pm_.c:298 msgid "Partitioning failed: no root filesystem" msgstr "" -#: ../install2.pm_.c:476 +#: ../install2.pm_.c:480 msgid "Error reading file $f" msgstr "" -#: ../install2.pm_.c:481 +#: ../install2.pm_.c:485 #, c-format msgid "Bad kickstart file %s (failed %s)" msgstr "" @@ -1219,104 +1219,97 @@ msgstr "" msgid "No floppy drive available" msgstr "" -#: ../install_steps_graphical.pm_.c:256 +#: ../install_steps_graphical.pm_.c:257 msgid "You must have a swap partition" msgstr "" -#: ../install_steps_graphical.pm_.c:259 +#: ../install_steps_graphical.pm_.c:260 msgid "" "You don't have a swap partition\n" "\n" "Continue anyway?" msgstr "" -#: ../install_steps_graphical.pm_.c:301 +#: ../install_steps_graphical.pm_.c:302 msgid "Total size: " msgstr "" -#: ../install_steps_graphical.pm_.c:313 -#, c-format -msgid "Version: %s\n" -msgstr "" - #: ../install_steps_graphical.pm_.c:314 #, c-format -msgid "Size: %d KB\n" +msgid "Version: %s\n" msgstr "" #: ../install_steps_graphical.pm_.c:315 #, c-format -msgid "" -"Summary: %s\n" -"\n" +msgid "Size: %d KB\n" msgstr "" -#: ../install_steps_graphical.pm_.c:427 +#: ../install_steps_graphical.pm_.c:430 msgid "Choose the packages you want to install" msgstr "" -#: ../install_steps_graphical.pm_.c:430 +#: ../install_steps_graphical.pm_.c:433 msgid "Info" msgstr "" -#: ../install_steps_graphical.pm_.c:438 ../install_steps_interactive.pm_.c:81 +#: ../install_steps_graphical.pm_.c:441 ../install_steps_interactive.pm_.c:81 msgid "Install" msgstr "" -#: ../install_steps_graphical.pm_.c:439 +#: ../install_steps_graphical.pm_.c:442 msgid "Select less" msgstr "" -#: ../install_steps_graphical.pm_.c:440 +#: ../install_steps_graphical.pm_.c:443 msgid "Select more" msgstr "" -#: ../install_steps_graphical.pm_.c:441 +#: ../install_steps_graphical.pm_.c:444 msgid "Show less" msgstr "" -#: ../install_steps_graphical.pm_.c:442 +#: ../install_steps_graphical.pm_.c:445 msgid "Show more" msgstr "" -#: ../install_steps_graphical.pm_.c:459 +#: ../install_steps_graphical.pm_.c:462 msgid "Installing" msgstr "" -#: ../install_steps_graphical.pm_.c:465 +#: ../install_steps_graphical.pm_.c:468 msgid "Please wait, " msgstr "" -#: ../install_steps_graphical.pm_.c:467 +#: ../install_steps_graphical.pm_.c:470 msgid "Time remaining " msgstr "" -#: ../install_steps_graphical.pm_.c:468 +#: ../install_steps_graphical.pm_.c:471 msgid "Total time " msgstr "" -#: ../install_steps_graphical.pm_.c:473 +#: ../install_steps_graphical.pm_.c:476 msgid "Preparing installation" msgstr "" -#: ../install_steps_graphical.pm_.c:494 +#: ../install_steps_graphical.pm_.c:497 #, c-format msgid "Installing package %s" msgstr "" -#: ../install_steps_graphical.pm_.c:519 +#: ../install_steps_graphical.pm_.c:522 msgid "Go on anyway?" msgstr "" -#: ../install_steps_graphical.pm_.c:519 +#: ../install_steps_graphical.pm_.c:522 msgid "There was an error ordering packages:" msgstr "" -#: ../install_steps_graphical.pm_.c:543 +#: ../install_steps_graphical.pm_.c:546 msgid "Use existing configuration for X11?" msgstr "" -#: ../install_steps_graphical.pm_.c:617 ../install_steps_interactive.pm_.c:508 +#: ../install_steps_graphical.pm_.c:620 ../install_steps_interactive.pm_.c:508 #: ../interactive.pm_.c:47 ../interactive.pm_.c:57 ../my_gtk.pm_.c:194 #: ../my_gtk.pm_.c:431 ../my_gtk.pm_.c:521 msgid "Ok" -- cgit v1.2.1