diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/ChangeLog | 32 | ||||
-rw-r--r-- | perl-install/Xconfig.pm | 2 | ||||
-rw-r--r-- | perl-install/Xconfigurator.pm | 133 | ||||
-rw-r--r-- | perl-install/Xconfigurator_consts.pm | 201 | ||||
-rw-r--r-- | perl-install/detect_devices.pm | 1 | ||||
-rw-r--r-- | perl-install/fs.pm | 4 | ||||
-rw-r--r-- | perl-install/fsedit.pm | 1 | ||||
-rw-r--r-- | perl-install/install2.pm | 2 | ||||
-rw-r--r-- | perl-install/install_any.pm | 14 | ||||
-rw-r--r-- | perl-install/install_steps.pm | 31 | ||||
-rw-r--r-- | perl-install/install_steps_interactive.pm | 52 | ||||
-rw-r--r-- | perl-install/modules.pm | 2 | ||||
-rw-r--r-- | perl-install/partition_table.pm | 5 | ||||
-rw-r--r-- | perl-install/pkgs.pm | 2 | ||||
-rw-r--r-- | perl-install/share/list | 1 |
15 files changed, 254 insertions, 229 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog index b9b7c0cad..0a3ed269b 100644 --- a/perl-install/ChangeLog +++ b/perl-install/ChangeLog @@ -1,3 +1,35 @@ +2000-03-25 Pixel <pixel@mandrakesoft.com> + + * lilo.pm: updated to the new format of entries. It was an hash. + Now the key is field kernel_or_dev, and entries is an array. + + (get): added, it returns the entry using a kernel + (needed because entries is no more a hash) + + * install_steps_interactive.pm (setupLILO): adapted to the new format + + * Xconfigurator.pm (write_XF86Config): basic XF86Config-4 handling + + * fsedit.pm (suggest_part): if suggested part contains a field + "hd", ensure the partition is created on this hard drive + + * install2.pm (main): before leaving installation, remove + /var/lib/urpmi if urpmi not installed + + * diskdrake.pm (Resize): ext2resize to size $part->{size} instead + of $size + +2000-03-24 Pixel <pixel@mandrakesoft.com> + + * detect_devices.pm (hasHPT): added. Now nice handling of hpt366 + (ultra66) without rebooting and making special floppy :) + + * lilo.pm (install_grub): much better grub configuration (better + than lilo's :pp) + + * install_steps.pm (setupBootloaderBefore): remove entry floppy + for security > 3 + 2000-03-23 Pixel <pixel@mandrakesoft.com> * install_steps_gtk.pm (selectMouse): added, takes care of telling diff --git a/perl-install/Xconfig.pm b/perl-install/Xconfig.pm index 8e31ed4af..a65bdb29c 100644 --- a/perl-install/Xconfig.pm +++ b/perl-install/Xconfig.pm @@ -44,7 +44,6 @@ sub getinfoFromXF86Config { open F, "$prefix/etc/X11/XF86Config" or return {}; foreach (<F>) { if (/^Section "Keyboard"/ .. /^EndSection/) { - $o->{keyboard}{altmeta} ||= ($1 eq "ModeShift" ? 1 : 0) if /^\s*RightAlt\s+"(.*?)"/; $o->{keyboard}{xkb_keymap} ||= $1 if /^\s*XkbLayout\s+"(.*?)"/; } elsif (/^Section "Pointer"/ .. /^EndSection/) { $o->{mouse}{XMOUSETYPE} ||= $1 if /^\s*Protocol\s+"(.*?)"/; @@ -60,6 +59,7 @@ sub getinfoFromXF86Config { $c{flags}{needVideoRam} ||= 1 if /^\s*VideoRam\s+/; $c{vendor} ||= $1 if /^\s*VendorName\s+"(.*?)"/; $c{board} ||= $1 if /^\s*BoardName\s+"(.*?)"/; + $c{driver} ||= $1 if /^\s*Driver\s+"(.*?)"/; $c{options}{$1} ||= 1 if /^\s*Option\s+"(.*?)"/; $c{options}{$1} ||= 0 if /^\s*#\s*Option\s+"(.*?)"/; diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index 956f8695a..f71a08454 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -2,7 +2,7 @@ package Xconfigurator; use diagnostics; use strict; -use vars qw($in $install $isLaptop $resolution_wanted @window_managers @depths @monitorSize2resolution @hsyncranges %min_hsync4wres @vsyncranges %depths @resolutions %serversdriver @svgaservers @accelservers @allbutfbservers @allservers %vgamodes %videomemory @ramdac_name @ramdac_id @clockchip_name @clockchip_id %keymap_translate %standard_monitors $intro_text $finalcomment_text $s3_comment $cirrus_comment $probeonlywarning_text $monitorintro_text $hsyncintro_text $vsyncintro_text $XF86firstchunk_text $keyboardsection_start $keyboardsection_part2 $keyboardsection_part3 $keyboardsection_end $pointersection_text1 $pointersection_text2 $monitorsection_text1 $monitorsection_text2 $monitorsection_text3 $monitorsection_text4 $modelines_text_Trident_TG_96xx $modelines_text $devicesection_text $screensection_text1 %lines @options %xkb_options $default_monitor); +use vars qw($in $install $isLaptop $resolution_wanted @window_managers @depths @monitorSize2resolution @hsyncranges %min_hsync4wres @vsyncranges %depths @resolutions %serversdriver @svgaservers @accelservers @allbutfbservers @allservers %vgamodes %videomemory @ramdac_name @ramdac_id @clockchip_name @clockchip_id %keymap_translate %standard_monitors $s3_comment $cirrus_comment $XF86firstchunk_text $keyboardsection_start $keyboardsection_start_v4 $keyboardsection_part2 $keyboardsection_part3 $keyboardsection_part3_v4 $keyboardsection_end $pointersection_text $pointersection_text_v4 $monitorsection_text1 $monitorsection_text2 $monitorsection_text3 $monitorsection_text4 $modelines_text_Trident_TG_96xx $modelines_text $devicesection_text $devicesection_text_v4 $screensection_text1 %lines @options %xkb_options $default_monitor $layoutsection_v4); use pci_probing::main; use common qw(:common :file :functional :system); @@ -55,6 +55,7 @@ sub readCardsDB { $card->{flags}{needVideoRam} = 1 if member($val, qw(mgag10 mgag200 RIVA128)); }, SERVER => sub { $card->{server} = $val; }, + DRIVER => sub { $card->{driver} = $val; }, RAMDAC => sub { $card->{ramdac} = $val; }, DACSPEED => sub { $card->{dacspeed} = $val; }, CLOCKCHIP => sub { $card->{clockchip} = $val; $card->{flags}{noclockprobe} = 1; }, @@ -623,43 +624,58 @@ sub write_XF86Config { my ($o, $file) = @_; my $O; - local *F; - open F, ">$file" or die "can't write XF86Config in $file: $!"; + local (*F, *G); + open F, ">$file" or die "can't write XF86Config in $file: $!"; + open G, ">$file-4" or die "can't write XF86Config in $file-4: $!"; print F $XF86firstchunk_text; + print G $XF86firstchunk_text; #- Write keyboard section. $O = $o->{keyboard}; print F $keyboardsection_start; - - print F " RightAlt ", ($O->{altmeta} ? "ModeShift" : "Meta"), "\n"; - print F $keyboardsection_part2; - print F " XkbDisable\n" unless $O->{xkb_keymap}; + print G $keyboardsection_start_v4; + print F qq( XkbDisable\n) unless $O->{xkb_keymap}; + print G qq( Option "XkbDisable"\n) unless $O->{xkb_keymap}; print F $keyboardsection_part3; + print G $keyboardsection_part3_v4; print F qq( XkbLayout "$O->{xkb_keymap}"\n); + print G qq( Option "XkbLayout" "$O->{xkb_keymap}"\n); print F join '', map { " $_\n" } @{$xkb_options{$O->{xkb_keymap}} || []}; + print G join '', map { /(\S+)(.*)/; qq( Option "$1" $2\n) } @{$xkb_options{$O->{xkb_keymap}} || []}; print F $keyboardsection_end; + print G $keyboardsection_end; #- Write pointer section. $O = $o->{mouse}; - print F $pointersection_text1; + print F $pointersection_text; + print G $pointersection_text_v4; print F qq( Protocol "$O->{XMOUSETYPE}"\n); + print G qq( Option "Protocol" "$O->{XMOUSETYPE}"\n); 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 $pointersection_text2; print F "#" unless $O->{XEMU3}; - print F " Emulate3Buttons\n"; + print G "#" unless $O->{XEMU3}; + print F qq( Emulate3Buttons\n); + print G qq( Option "Emulate3Buttons"\n); print F "#" unless $O->{XEMU3}; - print F " Emulate3Timeout 50\n\n"; + print G "#" unless $O->{XEMU3}; + print F qq( Emulate3Timeout 50\n\n); + print G qq( Option "Emulate3Timeout" "50"\n\n); print F "# ChordMiddle is an option for some 3-button Logitech mice\n\n"; + print G "# ChordMiddle is an option for some 3-button Logitech mice\n\n"; print F "#" unless $O->{chordmiddle}; - print F " ChordMiddle\n\n"; + print G "#" unless $O->{chordmiddle}; + print F qq( ChordMiddle\n\n); + print G qq( Option "ChordMiddle"\n\n); print F " ClearDTR\n" if $O->{cleardtrrts}; print F " ClearRTS\n\n" if $O->{cleardtrrts}; print F "EndSection\n\n\n"; + print G "EndSection\n\n\n"; print F qq( Section "Module" @@ -686,71 +702,100 @@ EndSection #- Write monitor section. $O = $o->{monitor}; print F $monitorsection_text1; + print G $monitorsection_text1; print F qq( Identifier "$O->{type}"\n); + print G qq( Identifier "$O->{type}"\n); print F qq( VendorName "$O->{vendor}"\n); - print F qq( ModelName "$O->{model}"\n); - print F "\n"; + print G qq( VendorName "$O->{vendor}"\n); + print F qq( ModelName "$O->{model}"\n\n); + print G qq( ModelName "$O->{model}"\n\n); print F $monitorsection_text2; - print F qq( HorizSync $O->{hsyncrange}\n); - print F "\n"; + print G $monitorsection_text2; + print F qq( HorizSync $O->{hsyncrange}\n\n); + print G qq( HorizSync $O->{hsyncrange}\n\n); print F $monitorsection_text3; - print F qq( VertRefresh $O->{vsyncrange}\n); - print F "\n"; + print G $monitorsection_text3; + print F qq( VertRefresh $O->{vsyncrange}\n\n); + print G qq( VertRefresh $O->{vsyncrange}\n\n); print F $monitorsection_text4; print F ($O->{modelines} || '') . ($o->{card}{type} eq "TG 96" ? $modelines_text_Trident_TG_96xx : $modelines_text); print F "\nEndSection\n\n\n"; + print G "\nEndSection\n\n\n"; #- Write Device section. $O = $o->{card}; print F $devicesection_text; + print G $devicesection_text_v4; print F qq(Section "Device"\n); + print G qq(Section "Device"\n); print F qq( Identifier "$O->{type}"\n); + print G qq( Identifier "$O->{type}"\n); print F qq( VendorName "$O->{vendor}"\n); + print G qq( VendorName "$O->{vendor}"\n); print F qq( BoardName "$O->{board}"\n); + print G qq( BoardName "$O->{board}"\n); + + print G qq( Driver "$O->{driver}"\n); print F "#" if $O->{memory} && !$O->{flags}{needVideoRam}; + print G "#" if $O->{memory} && !$O->{flags}{needVideoRam}; print F " VideoRam $O->{memory}\n" if $O->{memory}; + print G " VideoRam $O->{memory}\n" if $O->{memory}; print F map { " $_\n" } @{$O->{lines} || []}; + print G map { " $_\n" } @{$O->{lines} || []}; print F qq( Ramdac "$O->{ramdac}"\n) if $O->{ramdac}; + print G qq( Ramdac "$O->{ramdac}"\n) if $O->{ramdac}; print F qq( Dacspeed "$O->{dacspeed}"\n) if $O->{dacspeed}; + print G qq( Dacspeed "$O->{dacspeed}"\n) if $O->{dacspeed}; if ($O->{clockchip}) { print F qq( Clockchip "$O->{clockchip}"\n); + print G qq( Clockchip "$O->{clockchip}"\n); } else { print F " # Clock lines\n"; + print G " # Clock lines\n"; print F " Clocks $_\n" foreach (@{$O->{clocklines}}); + print G " Clocks $_\n" foreach (@{$O->{clocklines}}); } print F "\n"; + print G "\n"; print F map { (!$O->{options}{$_} && '#') . qq( Option "$_"\n) } keys %{$O->{options} || {}}; + print G map { (!$O->{options}{$_} && '#') . qq( Option "$_"\n) } keys %{$O->{options} || {}}; print F "EndSection\n\n\n"; + print G "EndSection\n\n\n"; #- Write Screen sections. - print F $screensection_text1; + print F $screensection_text1, "\n"; + print G $screensection_text1, "\n"; + + my $subscreen = sub { + my ($f, $server, $defdepth, $depths) = @_; + print $f " DefaultColorDepth $defdepth\n" if $defdepth; + + foreach (ikeys(%$depths)) { + my $m = $server ne "fbdev" ? join(" ", map { qq("$_->[0]x$_->[1]") } @{$depths->{$_}}) : qq("default"); + print $f qq( Subsection "Display"\n); + print $f qq( Depth $_\n) if $_; + print $f qq( Modes $m\n); + print $f qq( ViewPort 0 0\n); + print $f qq( EndSubsection\n); + } + print $f "EndSection\n"; + }; my $screen = sub { my ($server, $defdepth, $device, $depths) = @_; print F qq( - Section "Screen" Driver "$server" Device "$device" Monitor "$o->{monitor}{type}" ); - print F " DefaultColorDepth $defdepth\n" if $defdepth; - - foreach (ikeys(%$depths)) { - my $m = $server ne "fbdev" ? join(" ", map { qq("$_->[0]x$_->[1]") } @{$depths->{$_}}) : qq("default"); - print F qq( Subsection "Display"\n); - print F qq( Depth $_\n) if $_; - print F qq( Modes $m\n); - print F qq( ViewPort 0 0\n); - print F qq( EndSubsection\n); - } - print F "EndSection\n"; - }; #-" + $subscreen->(*F, $server, $defdepth, $depths); + }; #- SVGA screen section. print F qq( @@ -774,19 +819,30 @@ Section "Screen" &$screen("accel", $O->{default_depth}, $O->{type}, $O->{depth}); &$screen("fbdev", $O->{default_depth}, $O->{type}, $O->{depth}); + + + print G qq( +Section "Screen" + Identifier "screen1" + Device "$O->{type}" + Monitor "$o->{monitor}{type}" +); + $subscreen->(*G, "svga", $O->{default_depth}, $O->{depth}); + + print G $layoutsection_v4; } sub XF86check_link { - my ($void) = @_; + my ($ext) = @_; - my $f = "$prefix/etc/X11/XF86Config"; + my $f = "$prefix/etc/X11/XF86Config$ext"; touch($f); - my $l = "$prefix/usr/X11R6/lib/X11/XF86Config"; + my $l = "$prefix/usr/X11R6/lib/X11/XF86Config$ext"; if (-e $l && (stat($f))[1] != (stat($l))[1]) { #- compare the inode, must be the sames -e $l and unlink($l) || die "can't remove bad $l"; - symlinkf "../../../../etc/X11/XF86Config", $l; + symlinkf "../../../../etc/X11/XF86Config$ext", $l; } } @@ -813,7 +869,8 @@ sub main { ($prefix, $o, $in, $allowFB, $isLaptop, $install) = @_; $o ||= {}; - XF86check_link(); + XF86check_link(''); + XF86check_link('-4'); { my $w = $in->wait_message('', _("Preparing X-Window configuration"), 1); @@ -858,7 +915,9 @@ sub main { my $f = "$prefix/etc/X11/XF86Config"; if (-e "$f.test") { rename $f, "$f.old" or die "unable to make a backup of XF86Config"; + rename "$f-4", "$f-4.old"; rename "$f.test", $f; + rename "$f.test-4", "$f-4"; symlinkf "../..$o->{card}{prog}", "$prefix/etc/X11/X"; } } diff --git a/perl-install/Xconfigurator_consts.pm b/perl-install/Xconfigurator_consts.pm index 2ddd2fb9a..fab7106f1 100644 --- a/perl-install/Xconfigurator_consts.pm +++ b/perl-install/Xconfigurator_consts.pm @@ -326,73 +326,6 @@ $default_monitor = "High Frequency SVGA, 1024x768 at 70 Hz"; 'ru' => [ 'XkbVariant "winkeys"', 'XkbOptions "grp:caps_toggle"' ], ); -#-#- * Screen/video card configuration. -#-%ramdacs = ( -#- __("No RAMDAC Setting (recommended)") => '', -#- __("AT&T 20C490 (S3 and AGX servers, ARK driver)"), => 'att20c490', -#- __("AT&T 20C498/21C498/22C498 (S3, autodetected)"), => 'att20c498', -#- __("AT&T 20C409/20C499 (S3, autodetected)"), => 'att20c409', -#- __("AT&T 20C505 (S3)"), => 'att20c505', -#- __("BrookTree BT481 (AGX)"), => 'bt481', -#- __("BrookTree BT482 (AGX)"), => 'bt482', -#- __("BrookTree BT485/9485 (S3)"), => 'bt485', -#- __("Sierra SC15025 (S3, AGX)"), => 'sc15025', -#- __("S3 GenDAC (86C708) (autodetected)"), => 's3gendac', -#- __("S3 SDAC (86C716) (autodetected)"), => 's3_sdac', -#- __("STG-1700 (S3, autodetected)"), => 'stg1700', -#- __("STG-1703 (S3, autodetected)"), => 'stg1703', -#- __("TI 3020 (S3)"), => 'ti3020', -#- __("TI 3025 (S3, autodetected)"), => 'ti3025', -#- __("TI 3026 (S3, autodetected)"), => 'ti3026', -#- __("IBM RGB 514 (S3, autodetected)"), => 'ibm_rgb514', -#- __("IBM RGB 524 (S3, autodetected)"), => 'ibm_rgb524', -#- __("IBM RGB 525 (S3, autodetected)"), => 'ibm_rgb525', -#- __("IBM RGB 526 (S3)"), => 'ibm_rgb526', -#- __("IBM RGB 528 (S3, autodetected)"), => 'ibm_rgb528', -#- __("ICS5342 (S3, ARK)"), => 'ics5342', -#- __("ICS5341 (W32)"), => 'ics5341', -#- __("IC Works w30C516 ZoomDac (ARK)"), => 'zoomdac', -#- __("Normal DAC"), => 'normal', -#-); -#- -#-@clockchip_name = ( -#- __("No Clockchip Setting (recommended)") => '', -#- __("Chrontel 8391") => 'ch8391', -#- __("ICD2061A and compatibles (ICS9161A => DCS2824)") => 'icd2061a', -#- __("ICS2595") => 'ics2595', -#- __("ICS5342 (similar to SDAC, but not completely compatible)") => 'ics5342', -#- __("ICS5341") => 'ics5341', -#- __("S3 GenDAC (86C708) and ICS5300 (autodetected)") => 's3gendac', -#- __("S3 SDAC (86C716)") => 's3_sdac', -#- __("STG 1703 (autodetected)") => 'stg1703', -#- __("Sierra SC11412") => 'sc11412', -#- __("TI 3025 (autodetected)") => 'ti3025', -#- __("TI 3026 (autodetected)") => 'ti3026', -#- __("IBM RGB 51x/52x (autodetected)") => 'ibm_rgb5xx', -#-); -#- - -$intro_text = " -This program will create a basic XF86Config file, based on menu selections you make. - -The XF86Config file usually resides in /usr/X11R6/lib/X11 or /etc/X11. A -sample XF86Config file is supplied with XFree86; it is configured for a -standard VGA card and monitor with 640x480 resolution. - -You can either take the sample XF86Config as a base and edit it for your -configuration, or let this program produce a base XF86Config file for your -configuration and fine-tune it. Refer to /usr/X11R6/lib/X11/doc/README.Config -for a detailed overview of the configuration process. - -For accelerated servers (including accelerated drivers in the SVGA server), -there are many chipset and card-specific options and settings. This program -does not know about these. On some configurations some of these settings must -be specified. Refer to the server man pages and chipset-specific READMEs. - -Before continuing with this program, make sure you know the chipset and -amount of video memory on your video card. SuperProbe can help with this. -It is also helpful if you know what server you want to run."; - $s3_comment = ' # Use Option "nolinear" if the server doesn\'t start up correctly # (this avoids the linear framebuffer probe). If that fails try @@ -409,64 +342,21 @@ $cirrus_comment = ' # address that the card maps the framebuffer to. '; -$probeonlywarning_text = ' -It is possible that the hardware detection routines in the server some how -cause the system to crash and the screen to remain blank. If this is the -case, skip this step the next time. The server may need a -Ramdac, ClockChip or special option (e.g. "nolinear" for S3) to probe -and start-up correctly. -'; - -$monitorintro_text = __(' -Now we want to set the specifications of the monitor. The two critical -parameters are the vertical refresh rate, which is the rate at which the -the whole screen is refreshed, and most importantly the horizontal sync rate, -which is the rate at which scanlines are displayed. - -The valid range for horizontal sync and vertical sync should be documented -in the manual of your monitor. If in doubt, check the monitor database -/usr/X11R6/lib/X11/doc/Monitors to see if your monitor is there. -'); - -$hsyncintro_text = __(' -You must indicate the horizontal sync range of your monitor. You can either -select one of the predefined ranges below that correspond to industry- -standard monitor types, or give a specific range. - -It is VERY IMPORTANT that you do not specify a monitor type with a horizontal -sync range that is beyond the capabilities of your monitor. If in doubt, -choose a conservative setting. -'); - -$vsyncintro_text = __(' -You must indicate the vertical sync range of your monitor. You can either -select one of the predefined ranges below that correspond to industry- -standard monitor types, or give a specific range. For interlaced modes, -the number that counts is the high one (e.g. 87 Hz rather than 43 Hz). -'); $XF86firstchunk_text = ' -# File generated by XConfigurator. +# File generated by XFdrake. # ********************************************************************** # Refer to the XF86Config(4/5) man page for details about the format of # this file. # ********************************************************************** -# ********************************************************************** -# Files section. This allows default font and rgb paths to be set -# ********************************************************************** - Section "Files" -# The location of the RGB database. Note, this is the name of the -# file minus the extension (like ".txt" or ".db"). There is normally -# no need to change the default. - RgbPath "/usr/X11R6/lib/X11/rgb" # Multiple FontPath entries are allowed (they are concatenated together) -# By default, Red Hat 6.0 and later now use a font server independent of +# By default, Mandrake 6.0 and later now use a font server independent of # the X server to render fonts. FontPath "unix/:-1" @@ -516,30 +406,40 @@ Section "Keyboard" # following line #Protocol "Xqueue" - AutoRepeat 0 0 + AutoRepeat 250 30 # Let the server do the NumLock processing. This should only be # required when using pre-R6 clients #ServerNumLock # Specify which keyboard LEDs can be user-controlled (eg, with xset(1)) - #Xleds 1 2 3 + #Xleds "1 2 3" #To set the LeftAlt to Meta, RightAlt key to ModeShift, #RightCtl key to Compose, and ScrollLock key to ModeLock: LeftAlt Meta -'; - -$keyboardsection_part2 = ' - ScrollLock Compose - RightCtl Control + RightAlt Meta + ScrollLock Compose + RightCtl Control # To disable the XKEYBOARD extension, uncomment XkbDisable. # XkbDisable '; +$keyboardsection_start_v4 = ' +# ********************************************************************** +# Keyboard section +# ********************************************************************** + +Section "InputDevice" + + Identifier "Keyboard1" + Driver "Keyboard" + Option "AutoRepeat" "250 30" +'; + if (arch() =~ /^sparc/) { $keyboardsection_part3 = ' # To customise the XKB settings to suit your keyboard, modify the @@ -578,6 +478,16 @@ if (arch() =~ /^sparc/) { XkbGeometry "sun(type5)" XkbSymbols "sun/us(sun5)" '; +$keyboardsection_part3_v4 = ' + Option "XkbRules" "sun" + Option "XkbModel" "sun" + Option "XkbLayout" "us" + Option "XkbCompat" "compat/complete" + Option "XkbTypes" "types/complete" + Option "XkbKeycodes" "sun(type5)" + Option "XkbGeometry" "sun(type5)" + Option "XkbSymbols" "sun/us(sun5)" +'; } else { $keyboardsection_part3 = ' # To customise the XKB settings to suit your keyboard, modify the @@ -613,13 +523,18 @@ $keyboardsection_part3 = ' XkbRules "xfree86" XkbModel "pc105" '; + +$keyboardsection_part3_v4 = ' + Option "XkbRules" "xfree86" + Option "XkbModel" "pc105" +'; } $keyboardsection_end = ' EndSection '; -$pointersection_text1 = ' +$pointersection_text = ' # ********************************************************************** # Pointer section # ********************************************************************** @@ -627,20 +542,15 @@ $pointersection_text1 = ' Section "Pointer" '; -$pointersection_text2 = ' - -# When using XQUEUE, comment out the above two lines, and uncomment -# the following line. - -# Protocol "Xqueue" - -# Baudrate and SampleRate are only for some Logitech mice +$pointersection_text_v4 = ' +# ********************************************************************** +# Pointer section +# ********************************************************************** -# BaudRate 9600 -# SampleRate 150 +Section "InputDevice" -# Emulate3Buttons is an option for 2-button Microsoft mice -# Emulate3Timeout is the timeout in milliseconds (default is 50ms) + Identifier "Mouse1" + Driver "mouse" '; $monitorsection_text1 = ' @@ -838,21 +748,23 @@ $devicesection_text = ' # Graphics device section # ********************************************************************** -# Any number of graphics device sections may be present - Section "Device" - Identifier "Generic VGA" - VendorName "Unknown" - BoardName "Unknown" + Identifier "Generic VGA" Chipset "generic" +EndSection -# VideoRam 256 +'; -# Clocks 25.2 28.3 +$devicesection_text_v4 = ' +# ********************************************************************** +# Graphics device section +# ********************************************************************** +Section "Device" + Identifier "Generic VGA" + Driver "vga" EndSection -# Device auto configured: '; $screensection_text1 = ' @@ -861,3 +773,12 @@ $screensection_text1 = ' # ********************************************************************** '; +$layoutsection_v4 = ' + +Section "ServerLayout" + Identifier "layout1" + Screen "screen1" + InputDevice "Mouse1" "CorePointer" + InputDevice "Keyboard1" "CoreKeyboard" +EndSection +'; diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index e5ca00ea5..f5e2efa89 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -197,6 +197,7 @@ sub syslog { sub hasSMP { c::detectSMP() } +#- warning: hasHPT does a pci probe sub hasHPT { cat_("/proc/cmdline") =~ /(ide2=(\S+)(\s+ide3=(\S+))?)/ and return $1; diff --git a/perl-install/fs.pm b/perl-install/fs.pm index 7ab038273..c1352146f 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -341,9 +341,9 @@ sub write_fstab($;$$) { isExt2($_) and ($freq, $passno) = (1, ($_->{mntpoint} eq '/') ? 1 : 2); isNfs($_) and $dir = '', $options = $_->{options} || 'ro,nosuid,rsize=8192,wsize=8192'; - isFat($_) and $options = $_->{options} || "user,exec"; + isFat($_) and $options = $_->{options} || "user,exec,umask=0"; - my $dev = isLoopback($_) ? + my $dev = isLoopback($_) ? ($_->{mntpoint} eq '/' ? "/initrd/loopfs$_->{loopback_file}" : loopback::file($_)) : ($_->{device} =~ /^\// ? $_->{device} : "$dir$_->{device}"); diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm index e45883fd9..b89ffe25c 100644 --- a/perl-install/fsedit.pm +++ b/perl-install/fsedit.pm @@ -177,6 +177,7 @@ sub suggest_part($$$;$) { grep { !$_->{maxsize} || $part->{size} <= $_->{maxsize} } grep { $_->{size} <= ($part->{maxsize} || $part->{size}) } grep { !has_mntpoint($_->{mntpoint}, $hds) || isSwap($_) && !$has_swap } + grep { !$_->{hd} || $_->{hd} eq $hd->{device} } grep { !$part->{type} || $part->{type} == $_->{type} } @$suggestions or return; diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 8fa163367..3130eff8c 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -671,6 +671,8 @@ sub main { #- make sure failed upgrade will not hurt too much. install_steps::cleanIfFailedUpgrade($o); + -e "$o->{prefix}/usr/bin/urpmi" or eval { commands::rm("-rf", "$o->{prefix}/var/lib/urpmi") }; + #- 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 08db3ef9a..f268fb81d 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -258,6 +258,13 @@ I'll try to go on blanking bad partitions"), $err]) unless $o->{partitioning}{re _("DiskDrake failed to read correctly the partition table. Continue at your own risk!")) if !$ok2 && $ok && !$o->{partitioning}{readonly}; + my @win = grep { isFat($_) && isFat({ type => fsedit::typeOfPart($_->{device}) }) } @{$o->{fstab}}; + my @nt = grep { isNT($_) && isNT( { type => fsedit::typeOfPart($_->{device}) }) } @{$o->{fstab}}; + log::l("win parts: ", join ",", map { $_->{device} } @win) if @win; + log::l("nt parts: ", join ",", map { $_->{device} } @nt) if @nt; + $_->{mntpoint} = @win == 1 ? "/mnt/windows" : "/mnt/win_$_->{device_windobe}" foreach @win; + $_->{mntpoint} = @nt == 1 ? "/mnt/nt" : "/mnt/nt_$_->{device_windobe}" foreach @nt; + $ok2; } @@ -440,22 +447,21 @@ sub setupFB { #- a frame buffer kernel is used, in such case we use it instead #- with the right mode, nothing more to do. foreach (qw(secure smp)) { - if ($o->{bootloader}{entries}{"/boot/vmlinuz-$_"}) { + if (my $e = lilo::get("/boot/vmlinuz-$_", $o->{bootloader})) { if ($_ eq 'secure') { log::l("warning: kernel-secure is not fb, using a kernel-fb instead"); #- nothing done, fall through linux-fb. } else { - $o->{bootloader}{entries}{"/boot/vmlinuz-$_"}{vga} = $vga; + $e->{vga} = $vga; lilo::install($o->{prefix}, $o->{bootloader}); return 1; } } } - my $root = $o->{bootloader}{entries}{'/boot/vmlinuz'}{root}; if (lilo::add_kernel($o->{prefix}, $o->{bootloader}, kernelVersion(), 'fb', { label => 'linux-fb', - root => $root, + root => lilo::get("/boot/vmlinuz", $o->{bootloader})->{root}, vga => $vga, })) { $o->{bootloader}{default} = 'linux-fb'; diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 6ba76b965..ab9c4ab24 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -262,6 +262,9 @@ Consoles 1,3,4,7 may also contain interesting information"; $o->pcmciaConfig(); + #- for mandrake_firstime + output "$o->{prefix}/var/lock/TMP_1ST", ""; + #- remove the nasty acon... run_program::rooted($o->{prefix}, "chkconfig", "--del", "acon") unless $ENV{LANGUAGE} =~ /ar/; @@ -612,15 +615,13 @@ sub readBootloaderConfigBeforeInstall { #- change the /boot/vmlinuz or /boot/vmlinuz-smp entries to follow symlink. foreach $image (keys %ofpkgs) { - if ($o->{bootloader}{entries}{"/boot/$image"} && pkgs::packageFlagSelected($ofpkgs{$image})) { - $v = readlink "$o->{prefix}/boot/$image"; - if ($v) { - $v = "/boot/$v" if $v !~ m|^/|; - if (-e "$o->{prefix}$v") { - $o->{bootloader}{entries}{$v} = $o->{bootloader}{entries}{"/boot/$image"}; - delete $o->{bootloader}{entries}{"/boot/$image"}; - log::l("renaming /boot/$image entry by $v"); - } + pkgs::packageFlagSelected($ofpkgs{$image}) or next; + if (my $v = readlink "$o->{prefix}/boot/$image") { + $v = "/boot/$v" if $v !~ m|^/|; + if (-e "$o->{prefix}$v") { + my $e = lilo::get("/boot/$image", $o->{bootloader}) or next; + $e->{kernel} = $v; + log::l("renaming /boot/$image entry by $v"); } } } @@ -640,6 +641,7 @@ sub setupBootloaderBefore { } else { require lilo; lilo::suggest($o->{prefix}, $o->{bootloader}, $o->{hds}, $o->{fstab}, install_any::kernelVersion()); + lilo::suggest_floppy($o->{bootloader}) if $o->{security} <= 3; $o->{bootloader}{keytable} ||= keyboard::keyboard2kmap($o->{keyboard}); } } @@ -664,8 +666,8 @@ sub setupBootloader($) { } else { eval { lilo::install($o->{prefix}, $o->{bootloader}, $o->{fstab}) }; my $err = $@; - eval { lilo::install_grub($o->{prefix}, $o->{bootloader}, $o->{fstab}) }; - die if $err; + eval { lilo::install_grub($o->{prefix}, $o->{bootloader}, $o->{fstab}, $o->{hds}) }; + die $err if $err; } } @@ -745,11 +747,14 @@ sub miscellaneous { if (my @l = detect_devices::getIDEBurners() and !/ide-scsi/) { $_ .= " " . join(" ", map { "$_=ide-scsi" } @l); } - #- keep some given parameters if (my $m = modules::get_options("ide-mod")) { - /options="(.*)"/ and $_ .= " $1" if !/ide.=/; + $m =~ /options="(.*)"/ and $_ .= " $1" if !/ide.=/; } + #- keep some given parameters + #-TODO + + log::l("perImageAppend: $_"); $o->{bootloader}{perImageAppend} = $_; } diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 2f8316b33..59aa06e70 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -749,14 +749,14 @@ _("Restrict command line options") => { val => \$b->{restricted}, type => "bool" my $c = $o->ask_from_list_([''], _("Here are the following entries in LILO. You can add some more or change the existing ones."), - [ (sort @{[map_each { "$::b->{label} ($::a)" . ($b->{default} eq $::b->{label} && " *") } %{$b->{entries}}]}), __("Add"), __("Done") ], + [ (sort @{[map { "$_->{label} ($_->{kernel_or_dev})" . ($b->{default} eq $_->{label} && " *") } @{$b->{entries}}]}), __("Add"), __("Done") ], ); $c eq "Done" and last; - my ($e, $name); + my ($e); if ($c eq "Add") { - my @labels = map { $_->{label} } values %{$b->{entries}}; + my @labels = map { $_->{label} } @{$b->{entries}}; my $prefix; if ($o->ask_from_list_('', _("Which type of entry do you want to add"), [ __("Linux"), __("Other OS (windows...)") ]) eq "Linux") { $e = { type => 'image' }; @@ -768,17 +768,16 @@ You can add some more or change the existing ones."), $e->{label} = $prefix; for (my $nb = 0; member($e->{label}, @labels); $nb++) { $e->{label} = "$prefix-$nb" } } else { - ($name) = $c =~ /\((.*?)\)/; - $e = $b->{entries}{$name}; + $c =~ /(\S+)/; + ($e) = grep { $_->{label} eq $1 } @{$b->{entries}}; } - my $old_name = $name; my %old_e = %$e; my $default = my $old_default = $e->{label} eq $b->{default}; my @l; if ($e->{type} eq "image") { @l = ( -_("Image") => { val => \$name, list => [ eval { glob_("/boot/vmlinuz*") } ] }, +_("Image") => { val => \$e->{kernel_or_dev}, list => [ eval { glob_("/boot/vmlinuz*") } ] }, _("Root") => { val => \$e->{root}, list => [ map { "/dev/$_->{device}" } @{$o->{fstab}} ], not_edit => !$::expert }, _("Append") => \$e->{append}, _("Initrd") => { val => \$e->{initrd}, list => [ eval { glob_("/boot/initrd*") } ] }, @@ -787,7 +786,7 @@ _("Read-write") => { val => \$e->{'read-write'}, type => 'bool' } @l = @l[0..5] unless $::expert; } else { @l = ( -_("Root") => { val => \$name, list => [ map { "/dev/$_->{device}" } @{$o->{fstab}} ], not_edit => !$::expert }, +_("Root") => { val => \$e->{kernel_or_dev}, list => [ map { "/dev/$_->{device}" } @{$o->{fstab}} ], not_edit => !$::expert }, _("Table") => { val => \$e->{table}, list => [ '', map { "/dev/$_->{device}" } @{$o->{hds}} ], not_edit => !$::expert }, _("Unsafe") => { val => \$e->{unsafe}, type => 'bool' } ); @@ -803,16 +802,14 @@ _("Default") => { val => \$default, type => 'bool' }, '', \@l, complete => sub { $e->{label} or $o->ask_warn('', _("Empty label not allowed")), return 1; - member($e->{label}, map { $_->{label} } grep { $_ != $e } values %{$b->{entries}}) and $o->ask_warn('', _("This label is already in use")), return 1; - $name ne $old_name && $b->{entries}{$name} and $o->ask_warn('', _("A entry %s already exists", $name)), return 1; - } - )) { + member($e->{label}, map { $_->{label} } grep { $_ != $e } @{$b->{entries}}) and $o->ask_warn('', _("This label is already in use")), return 1; + 0; + })) { $b->{default} = $old_default || $default ? $default && $e->{label} : $b->{default}; - delete $b->{entries}{$old_name}; - $b->{entries}{$name} = $e; + push @{$b->{entries}}, $e if $c eq "Add"; } else { - delete $b->{entries}{$old_name}; + @{$b->{entries}} = grep { $_ != $e } @{$b->{entries}}; } } eval { $o->SUPER::setupBootloader }; @@ -865,14 +862,14 @@ _("Restrict command line options") => { val => \$b->{restricted}, type => "bool" my $c = $o->ask_from_list_([''], _("Here are the following entries in SILO. You can add some more or change the existing ones."), - [ (sort @{[map_each { "$::b->{label} ($::a)" . ($b->{default} eq $::b->{label} && " *") } %{$b->{entries}}]}), __("Add"), __("Done") ], + [ (sort @{[map { "$_->{label} ($_->{kernel_or_dev})" . ($b->{default} eq $_->{label} && " *") } @{$b->{entries}}]}), __("Add"), __("Done") ], ); $c eq "Done" and last; - my ($e, $name); + my ($e); if ($c eq "Add") { - my @labels = map { $_->{label} } values %{$b->{entries}}; + my @labels = map { $_->{label} } @{$b->{entries}}; my $prefix; $e = { type => 'image' }; @@ -881,17 +878,16 @@ You can add some more or change the existing ones."), $e->{label} = $prefix; for (my $nb = 0; member($e->{label}, @labels); $nb++) { $e->{label} = "$prefix-$nb" } } else { - ($name) = $c =~ /\((.*?)\)/; - $e = $b->{entries}{$name}; + $c =~ /(\S+)/; + ($e) = grep { $_->{label} eq $1 } @{$b->{entries}}; } - my $old_name = $name; my %old_e = %$e; my $default = my $old_default = $e->{label} eq $b->{default}; my @l; if ($e->{type} eq "image") { @l = ( -_("Image") => { val => \$name, list => [ eval { glob_("/boot/vmlinuz*") } ] }, +_("Image") => { val => \$e->{kernel_or_dev}, list => [ eval { glob_("/boot/vmlinuz*") } ] }, _("Partition") => { val => \$e->{partition}, list => [ map { ("/dev/$_->{device}" =~ /\D*(\d*)/)[0] || 1} @{$o->{fstab}} ], not_edit => !$::expert }, _("Root") => { val => \$e->{root}, list => [ map { "/dev/$_->{device}" } @{$o->{fstab}} ], not_edit => !$::expert }, _("Append") => \$e->{append}, @@ -912,16 +908,14 @@ _("Default") => { val => \$default, type => 'bool' }, '', \@l, complete => sub { $e->{label} or $o->ask_warn('', _("Empty label not allowed")), return 1; - member($e->{label}, map { $_->{label} } grep { $_ != $e } values %{$b->{entries}}) and $o->ask_warn('', _("This label is already in use")), return 1; - $name ne $old_name && $b->{entries}{$name} and $o->ask_warn('', _("A entry %s already exists", $name)), return 1; - } - )) { + member($e->{label}, map { $_->{label} } grep { $_ != $e } @{$b->{entries}}) and $o->ask_warn('', _("This label is already in use")), return 1; + 0; + })) { $b->{default} = $old_default || $default ? $default && $e->{label} : $b->{default}; - delete $b->{entries}{$old_name}; - $b->{entries}{$name} = $e; + push @{$b->{entries}}, $e if $c eq "Add"; } else { - delete $b->{entries}{$old_name}; + @{$b->{entries}} = grep { $_ != $e } @{$b->{entries}}; } } eval { $o->SUPER::setupBootloader }; diff --git a/perl-install/modules.pm b/perl-install/modules.pm index 38f9a6428..2e3729d59 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -517,6 +517,8 @@ sub load_thiskind($;&$) { my @devs = (@pcidevs, @pcmciadevs); + load("sd_mod") if $type eq 'scsi' && @devs; + my %devs; foreach (@devs) { my ($text, $mod) = @$_; pci_probing::main::check($mod) or next; diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index 660546339..5eaba831b 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -7,7 +7,7 @@ use Data::Dumper; @ISA = qw(Exporter); %EXPORT_TAGS = ( - types => [ qw(type2name type2fs name2type fs2type isExtended isExt2 isSwap isDos isWin isFat isPrimary isNfs isSupermount isRAID isHFS isMountableRW isApplePartMap isLoopback) ], + types => [ qw(type2name type2fs name2type fs2type isExtended isExt2 isSwap isDos isWin isFat isPrimary isNfs isSupermount isRAID isHFS isNT isMountableRW isApplePartMap isLoopback) ], ); @EXPORT_OK = map { @$_ } values %EXPORT_TAGS; @@ -48,7 +48,7 @@ arch() =~ /^sparc/ ? ( 0x4 => 'DOS 16-bit FAT (up to 32M)', 0x5 => 'DOS 3.3+ Extended Partition', 0x6 => 'DOS FAT16', - 0x7 => 'OS/2 IFS (e.g., HPFS) / Windows NT NTFS / Advanced Unix / QNX2.x pre-1988 (see below under IDs 4d-4f)', + 0x7 => 'NTFS (or HPFS)', 0x8 => 'OS/2 (v1.0-1.3 only) / AIX boot partition / SplitDrive / Commodore DOS / DELL partition spanning multiple drives / QNX 1.x and 2.x ("qny")', ), 0x9 => 'AIX data partition / Coherent filesystem / QNX 1.x and 2.x ("qnz")', @@ -202,6 +202,7 @@ sub isDos($) { $ {{ 1=>1, 4=>1, 6=>1 }}{$_[0]{type}} } sub isWin($) { $ {{ 0xb=>1, 0xc=>1, 0xe=>1, 0x1b=>1, 0x1c=>1, 0x1e=>1 }}{$_[0]{type}} } sub isFat($) { isDos($_[0]) || isWin($_[0]) } sub isNfs($) { $_[0]{type} eq 'nfs' } #- small hack +sub isNT($) { $_[0]{type} == 0x7 } sub isSupermount($) { $_[0]{type} eq 'supermount' } sub isHFS($) { $type2fs{$_[0]{type}} eq 'hfs' } sub isMountableRW { isExt2($_[0]) || isFat($_[0]) } diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 3be8ece68..409bca76c 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -65,7 +65,7 @@ autoirpm autoirpm-icons numlock 'zh_TW.Big5' => [ 'rxvt-CLE', 'fonts-ttf-big5' ], ); -@preferred = qw(perl-GTK postfix ghostscript-X vim-minimal); +@preferred = qw(perl-GTK postfix ghostscript-X vim-minimal kernel); #- constant for small transaction. $limitMinTrans = 8; diff --git a/perl-install/share/list b/perl-install/share/list index c1436489d..8db700e78 100644 --- a/perl-install/share/list +++ b/perl-install/share/list @@ -95,3 +95,4 @@ /usr/lib/perl5/site_perl/5.005/ARCH-linux/auto/Gtk/Gtk.bs /usr/lib/perl5/site_perl/5.005/ARCH-linux/auto/Gtk/Gtk.so /usr/lib/rpm/rpmrc +/usr/sbin/ext2resize |