diff options
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | docs/README | 29 | ||||
-rw-r--r-- | perl-install/Xconfig.pm | 1 | ||||
-rw-r--r-- | perl-install/Xconfigurator.pm | 8 | ||||
-rw-r--r-- | perl-install/common.pm | 5 | ||||
-rw-r--r-- | perl-install/fs.pm | 22 | ||||
-rw-r--r-- | perl-install/install2.pm | 13 | ||||
-rw-r--r-- | perl-install/install_steps_auto_install.pm | 6 | ||||
-rw-r--r-- | perl-install/install_steps_gtk.pm | 9 | ||||
-rw-r--r-- | perl-install/mouse.pm | 7 | ||||
-rw-r--r-- | perl-install/network.pm | 2 | ||||
-rwxr-xr-x | perl-install/standalone/mousedrake | 10 | ||||
-rw-r--r-- | rescue/dirs | 4 | ||||
-rwxr-xr-x | rescue/make_rescue_img | 2 |
14 files changed, 83 insertions, 36 deletions
@@ -97,6 +97,7 @@ clean: find . -name "*~" -o -name ".#*" | xargs rm -f upload: clean install +# do this on source machine: eval `ssh-agent` ; ssh-add function upload() { rsync -qSavz --verbose --exclude '*~' -e ssh --delete $(ROOTDEST)/$$1/$$2 mandrake@kenobi:/c/cooker/$$1; } ;\ upload Mandrake/mdkinst '' ;\ upload Mandrake/base {compss*,mdkinst_stage2.gz,rescue_stage2.gz} ;\ diff --git a/docs/README b/docs/README index ea0f7fe74..93143a4a4 100644 --- a/docs/README +++ b/docs/README @@ -227,3 +227,32 @@ sub selectAlawindows { case, except for auto_install) sub selectAlawindows {} + + +******************************************************************************** +* Miscellaneous **************************************************************** +******************************************************************************** +> o Media access methods: nfs, ftp, http, hd, cdrom +> o Stages: install1, stage1, stage2 +> - What exactly each stage does + +the stage1 takes care of loading the stage2 :) +the stage2 is too big to fit on a floppy, that's why stage1 exists. + +> - How each stage relates to the various media access methods + +stage1 knows only how to access to the media is compiled for. It contains only +the kernel modules needed for that media. For eg, the nfs/ftp/http stage1 +doesn't contain scsi modules nor ide. + +> - How one stage terminates and another begins. i.e., How does +> stage1 find, mount, and launch stage2? + +/sbin/init just starts /sbin/install +/sbin/install takes care of mounting stage2 (in ramdisk if necessary) + then it runs /usr/bin/runinstall2 + +> o Text and Graphic mode installers +> - Architectural overview of each + +have a look at gi/install.fig diff --git a/perl-install/Xconfig.pm b/perl-install/Xconfig.pm index 925c836e0..fb1b03cc4 100644 --- a/perl-install/Xconfig.pm +++ b/perl-install/Xconfig.pm @@ -30,6 +30,7 @@ sub getinfo { add2hash($o->{mouse}, mouse::detect()) unless $o->{mouse}{XMOUSETYPE}; $o->{mouse}{device} ||= "mouse" if -e "/dev/mouse"; + $o->{mouse}{nbuttons} ||= mouse::X2nbuttons($o->{mouse}{XMOUSETYPE}); $o; } diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index 1de705d0f..c69a3c477 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -659,8 +659,8 @@ sub write_XF86Config { print F qq( Device "/dev/$O->{device}"\n); print G qq( Option "Device" "/dev/$O->{device}"\n); #- this will enable the "wheel" or "knob" functionality if the mouse supports it - print F " ZAxisMapping 4 5\n" if - member($O->{XMOUSETYPE}, qw(IntelliMouse IMPS/2 ThinkingMousePS/2 NetScrollPS/2 NetMousePS/2 MouseManPlusPS/2)); + print F " ZAxisMapping 4 5\n" if $O->{nbuttons} > 3; + print F " ZAxisMapping 6 7\n" if $O->{nbuttons} > 5; print F "#" unless $O->{XEMU3}; print G "#" unless $O->{XEMU3}; @@ -896,7 +896,7 @@ Section "ServerLayout" print G ' InputDevice "Keyboard1" "CoreKeyboard" EndSection -'; +'; #-" close F; close G; @@ -1015,7 +1015,7 @@ sub main { $in->ask_warn('', _("Please log out and then use Ctrl-Alt-BackSpace")) unless $found; } else { $in->set_help('configureXxdm') unless $::isStandalone; - my $run = $o->{xdm} || $::auto || $in->ask_yesorno(_("X at startup"), + my $run = exists $o->{xdm} ? $o->{xdm} : $::auto || $in->ask_yesorno(_("X at startup"), _("I can set up your computer to automatically start X upon booting. Would you like X to start when you reboot?"), 1); diff --git a/perl-install/common.pm b/perl-install/common.pm index 0a9a29271..cbbc79ff2 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -359,10 +359,7 @@ sub formatAlaTeX($) { sub formatLines($) { my ($t, $tmp); foreach (split "\n", $_[0]) { - if (/^$/) { - $t .= "$tmp\n"; - $tmp = ""; - } elsif (/^\s/) { + if (/^\s/) { $t .= "$tmp\n"; $tmp = $_; } else { diff --git a/perl-install/fs.pm b/perl-install/fs.pm index 2eb7c4bf9..9d3c38049 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -232,6 +232,14 @@ sub umount($) { sub mount_part($;$$) { my ($part, $prefix, $rdonly) = @_; + if ($part->{realMntpoint} eq "/tmp/hdimage") { + my $dir = "$prefix$part->{mntpoint}"; + $dir =~ s|/+$||; + log::l("special hd case ($dir)"); + rmdir $dir; + symlink "/tmp/hdimage", $dir; + return; + } #- root carrier's link can't be mounted loopback::carryRootCreateSymlink($part, $prefix); @@ -277,23 +285,13 @@ sub umount_part($;$) { } sub mount_all($;$$) { - my ($fstab, $prefix, $hd_dev) = @_; #- hd_dev is the device used for hd install + my ($fstab, $prefix) = @_; log::l("mounting all filesystems"); - $hd_dev ||= cat_("/proc/mounts") =~ m|/tmp/(\S+)\s+/tmp/hdimage| unless $::isStandalone; - #- order mount by alphabetical ordre, that way / < /home < /home/httpd... foreach (sort { $a->{mntpoint} cmp $b->{mntpoint} } grep { $_->{mntpoint} } @$fstab) { - if ($hd_dev && $_->{device} eq $hd_dev) { - my $dir = "$prefix$_->{mntpoint}"; - $dir =~ s|/+$||; - log::l("special hd case ($dir)"); - rmdir $dir; - symlink "/tmp/hdimage", $dir; - } else { - mount_part($_, $prefix); - } + mount_part($_, $prefix); } } diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 52fa053ca..b692650f0 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -298,8 +298,12 @@ sub selectInstallClass { sub partitionDisks { return install_any::searchAndMount4Upgrade($o) if $o->{isUpgrade}; - ($o->{hd_dev}) = cat_("/proc/mounts") =~ m|/tmp/(\S+)\s+/tmp/hdimage|; - + my $stage1_hd; + if (cat_("/proc/mounts") =~ m|/tmp/(\S+)\s+/tmp/hdimage\s+(\S+)|) { + $stage1_hd = { dev => $1, fs => $2 }; + install_any::getFile("XXX"); #- close still opened filehandle + fs::umount("/tmp/hdimage"); + } $::o->{steps}{formatPartitions}{done} = 0; eval { fs::umount_all($o->{fstab}, $o->{prefix}) } if $o->{fstab} && !$::testing; @@ -320,6 +324,8 @@ sub partitionDisks { unless ($::testing) { $o->rebootNeeded foreach grep { $_->{rebootNeeded} } @{$o->{hds}}; } + fs::mount($stage1_hd->{dev}, "/tmp/hdimage", $stage1_hd->{fs}) if $stage1_hd; + $o->{fstab} = [ fsedit::get_fstab(@{$o->{hds}}, $o->{raid}) ]; fsedit::get_root($o->{fstab}) or die _("You must have a root partition. @@ -421,6 +427,7 @@ sub miscellaneous { #------------------------------------------------------------------------------ sub configureNetwork { #- get current configuration of network device. + log::l("debugging: $o->{netc}{HOSTNAME}"); eval { $o->{netc} ||= {}; $o->{intf} ||= []; add2hash($o->{netc}, network::read_conf("$o->{prefix}/etc/sysconfig/network")) if -r "$o->{prefix}/etc/sysconfig/network"; @@ -670,7 +677,7 @@ sub main { $::o = $o = $o_; #- get stage1 network configuration if any. - $o->{netc} = network::read_conf("/tmp/network"); + $o->{netc} ||= network::read_conf("/tmp/network"); if (my ($file) = glob_('/tmp/ifcfg-*')) { log::l("found network config file $file"); my $l = network::read_interface_conf($file); diff --git a/perl-install/install_steps_auto_install.pm b/perl-install/install_steps_auto_install.pm index 83c19c007..71aac7080 100644 --- a/perl-install/install_steps_auto_install.pm +++ b/perl-install/install_steps_auto_install.pm @@ -28,6 +28,12 @@ sub new { } } +sub configureNetwork { + my ($o) = @_; + modules::load_thiskind('net', sub {}, $o->{pcmcia}); + install_steps::configureNetwork($o); +} + sub enteringStep($$$) { my ($o, $step) = @_; print _("Entering step `%s'\n", translate($o->{steps}{$step}{text})); diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index a7dd7621b..c4751a9d9 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -767,9 +767,10 @@ sub create_steps_window { $pixmap->signal_connect(enter_notify_event => sub { print "HERE\n" }); if ($step->{reachable}) { - gtksignal_connect(gtkadd(new Gtk::Button, $b), - clicked => sub { die "setstep $step_name\n" }); - } else { $b } + my $button = new Gtk::Button + $button->set_relief('none'); + gtksignal_connect(gtkadd($button, $b), clicked => sub { die "setstep $step_name\n" }); + $button; } grep { !eval $o->{steps}{$_}{hidden}; } @{$o->{orderedSteps}}), @@ -777,7 +778,7 @@ sub create_steps_window { my $t = $_; my $w = new Gtk::Button(''); $w->set_name($t); -# $w->set_usize(0, 7); + $w->set_usize(0, 7); gtksignal_connect($w, clicked => sub { $::setstep or return; #- just as setstep s install_theme($o, $t); die "theme_changed\n" diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm index 1f9183462..5acd6dcd3 100644 --- a/perl-install/mouse.pm +++ b/perl-install/mouse.pm @@ -58,6 +58,7 @@ arch() =~ /^sparc/ ? ( [ 2, "ttyS", "Microsoft", "Microsoft", __("Generic Mouse (serial)") ], [ 2, "ttyS", "Microsoft", "Microsoft", __("Microsoft compatible (serial)") ], [ 3, "ttyS", "Microsoft", "Microsoft", __("Generic 3 Button Mouse (serial)") ], + [ 3, "ttyS", "Microsoft", "ThinkingMouse", __("Kensington Thinking Mouse (serial)") ], [ 2, "ttyS", "MouseSystems", "MouseSystems", __("Mouse Systems (serial)") ], ); map_index { @@ -75,6 +76,10 @@ sub name2mouse { die "$name not found"; } +sub X2nbuttons { + first(map { $_->{nbuttons} } grep { $_->{XMOUSETYPE} eq $_[0] } @mouses); +} + sub serial_ports_names() { map { "ttyS" . ($_ - 1) . " / COM$_" } 1..4; } @@ -92,7 +97,7 @@ sub read($) { sub write($;$) { my ($prefix, $mouse) = @_; - local $mouse->{FULLNAME} = qq("$mouse->{FULLNAME}"); + local $mouse->{FULLNAME} = qq("$mouse->{FULLNAME}"); #-" local $mouse->{WHEEL} = bool2yesno($mouse->{nbuttons} > 3); setVarsInSh("$prefix/etc/sysconfig/mouse", $mouse, qw(MOUSETYPE XMOUSETYPE FULLNAME XEMU3 WHEEL device)); symlinkf $mouse->{device}, "$prefix/dev/mouse" or log::l("creating $prefix/dev/mouse symlink failed"); diff --git a/perl-install/network.pm b/perl-install/network.pm index ac0610c21..7c5ca5056 100644 --- a/perl-install/network.pm +++ b/perl-install/network.pm @@ -19,7 +19,7 @@ use log; sub read_conf { my ($file) = @_; my %netc = getVarsFromSh($file); - $netc{dnsServer} = $netc{NS0}; + $netc{dnsServer} = delete $netc{NS0}; \%netc; } diff --git a/perl-install/standalone/mousedrake b/perl-install/standalone/mousedrake index ee5c72d54..d40bcff62 100755 --- a/perl-install/standalone/mousedrake +++ b/perl-install/standalone/mousedrake @@ -44,14 +44,14 @@ modules::write_conf('') if $mouse->{device} eq "usbmouse" && !$::testing; my $f = "/etc/X11/XF86Config"; my $g = "/etc/X11/XF86Config-4"; + +my $zaxis = "\n ZAxisMapping 4 5" if $mouse->{nbuttons} > 3; + $zaxis .= "\n ZAxisMapping 6 7" if $mouse->{nbuttons} > 5; substInFile { if (/^Section "Pointer"/ .. /^EndSection/) { + $_ = '' if /ZAxisMapping/; #- remove existing line s|^(\s*Protocol\s+).*|$1"$mouse->{XMOUSETYPE}"|; - s|^(\s*Device\s+).*|$1"/dev/mouse"|; -#- my $zaxis = "4 5" if $mouse->{nbuttons} > 3; -#- $zaxis .= " 6 7" if $mouse->{nbuttons} > 5; -#- s|^(\s*ZAxisMapping\s+).*|$1$zaxis| if $zaxis; -#- s|^([#]\s*ZAxisMapping\s+).*|# ZAxisMapping\t\n|; } + s|^(\s*Device\s+).*|$1"/dev/mouse"$zaxis|; } } $f if -e $f && !$::testing; substInFile { diff --git a/rescue/dirs b/rescue/dirs index ae6616b1e..6ace88d5d 100644 --- a/rescue/dirs +++ b/rescue/dirs @@ -1,3 +1,7 @@ /mnt/cdrom /mnt/disk /mnt/floppy +/lib +/tmp +/modules +/proc diff --git a/rescue/make_rescue_img b/rescue/make_rescue_img index 32186628a..b276d3a17 100755 --- a/rescue/make_rescue_img +++ b/rescue/make_rescue_img @@ -41,8 +41,6 @@ foreach (cat_("dirs")) { } _ "cp -a tree/* $tmp"; _ "find $tmp -name 'CVS*' | xargs rm -rf"; -_ "cd $tmp; mkdir -p lib tmp modules proc"; - foreach (keyboard::loadkeys_files) { install($_); |