diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/Xconfigurator.pm | 15 | ||||
-rw-r--r-- | perl-install/fs.pm | 14 | ||||
-rw-r--r-- | perl-install/install2.pm | 9 | ||||
-rw-r--r-- | perl-install/install_steps.pm | 12 | ||||
-rw-r--r-- | perl-install/install_steps_gtk.pm | 2 | ||||
-rw-r--r-- | perl-install/install_steps_interactive.pm | 2 | ||||
-rw-r--r-- | perl-install/interactive_gtk.pm | 4 | ||||
-rw-r--r-- | perl-install/modules.pm | 3 | ||||
-rw-r--r-- | perl-install/pkgs.pm | 7 | ||||
-rw-r--r-- | perl-install/share/compssList | 2 | ||||
-rwxr-xr-x | perl-install/standalone/XFdrake | 4 | ||||
-rwxr-xr-x | perl-install/standalone/draksec | 4 |
12 files changed, 59 insertions, 19 deletions
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index 28f65f9d8..83ec2f678 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -281,9 +281,18 @@ sub testFinalConfig($;$$) { $skiptest || $o->{card}{server} eq 'FBDev' and return 1; #- avoid testing since untestable without reboot. - $auto - or $in->ask_yesorno(_("Test configuration"), _("Do you want to test the configuration?"), 1) - or return 1; + #- needed for bad cards not restoring cleanly framebuffer + my $bad_card = $o->{card}{identifier} =~ /i740|ViRGE/; + log::l("the graphic card does not like X in framebuffer") if $bad_card; + + my $mesg = _("Do you want to test the configuration?"); + my $def = 1; + if ($bad_card && !$::isStandalone) { + !$::expert || $auto and return 1; + $mesg = $mesg . "\n" . _("Warning: testing is dangerous on this graphic card"); + $def = 0; + } + $in->ask_yesorno(_("Test configuration"), $mesg, $def) or return 1; unlink "$prefix/tmp/.X9-lock"; diff --git a/perl-install/fs.pm b/perl-install/fs.pm index 60440b7a9..a19b498d0 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -169,9 +169,19 @@ sub mount_all($;$) { log::l("mounting all filesystems"); + my ($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} || '') } @$fstab) { - mount_part($_, $prefix) if $_->{mntpoint}; + foreach (grep { $_->{mntpoint} } sort { ($a->{mntpoint} || '') cmp ($b->{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); + } } } diff --git a/perl-install/install2.pm b/perl-install/install2.pm index e75f14e94..c5f9e0c0b 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -493,6 +493,7 @@ sub main { my $f = ${{ method => sub { $o->{method} = $v }, pcmcia => sub { $o->{pcmcia} = $v }, + vga => sub { $o->{vga16} = $v }, step => sub { $o->{steps}{first} = $v }, expert => sub { $::expert = 1 }, beginner => sub { $::beginner = 1 }, @@ -567,6 +568,12 @@ sub main { $o->{prefix} = $::testing ? "/tmp/test-perl-install" : "/mnt"; mkdir $o->{prefix}, 0755; +#- #- needed very early to switch bad cards in VGA16 +#- foreach (pci_probing::main::probe('')) { +#- log::l("Here: $_->[0]"); +#- $_->[0] =~ /i740|ViRGE/ and add2hash_($o, { vga16 => 1 }), log::l("switching to VGA16 as bad graphic card"); +#- } + #- needed very early for install_steps_gtk eval { $o->{mouse} ||= mouse::detect() } unless $o->{nomouseprobe}; @@ -626,8 +633,6 @@ sub main { 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_steps.pm b/perl-install/install_steps.pm index b5c0650fc..4a252c29b 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -265,8 +265,8 @@ sub afterInstallPackages($) { log::l("updating kde icons according to available devices"); install_any::kdeicons_postinstall($o->{prefix}); - substInFile { s/^(GreetString)=/$1=Welcome to [HOSTNAME]/ } "$o->{prefix}/usr/share/config/kdmrc"; - substInFile { s/(?<=UserView=)false/true/ } "$o->{prefix}/usr/share/config/kdmrc" if $o->{security} < 3; + substInFile { s/^(GreetString)=.*/$1=Welcome to [HOSTNAME]/ } "$o->{prefix}/usr/share/config/kdmrc"; + substInFile { s/^(UserView)=false/$1=true/ } "$o->{prefix}/usr/share/config/kdmrc" if $o->{security} < 3; run_program::rooted($o->{prefix}, "kdeDesktopCleanup"); #- move some file after an upgrade that may be seriously annoying. @@ -492,6 +492,14 @@ sub addUser($) { substInFile { s/^$u->{name}\n//; $_ .= "$u->{name}\n" if eof } "$msec/user.conf" if -d $msec; } run_program::rooted($o->{prefix}, "/etc/security/msec/init-sh/grpuser.sh --refresh"); + + my @users = qw(tie brunette default girl woman-blond); + my @u = @users; push @u, @users while @u < @l; @u = @u[0..$#l]; + foreach (@l) { + my $u = splice(@u, rand(@u), 1); #- known biased (see cookbook for better) + symlink "../../../../icons/util-$u.xpm", "$o->{prefix}/usr/share/apps/kdm/pics/users/$_->{name}.xpm"; + } + symlinkf "../../../../icons/util-hat.xpm", "$o->{prefix}/usr/share/apps/kdm/pics/users/root.xpm"; } #------------------------------------------------------------------------------ diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index 3414c39af..1ec06cef2 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -190,7 +190,7 @@ sub new($$) { 0; }; - if (listlength(cat_("/proc/fb"))) { + if (!$o->{vga16} && listlength(cat_("/proc/fb"))) { &$launchX("XF86_FBDev"); $o->{allowFB} = 1; #- keep in mind FB is used. } else { diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 8c3acd29b..0e9eae8f2 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -754,7 +754,7 @@ sub miscellaneousNetwork { sub miscellaneous { my ($o, $clicked) = @_; my %l = ( - #- 0 => _("Windows(TM)"), #- sorry :-) + 0 => _("Welcome To Crackers"), 1 => _("Poor"), 2 => _("Low"), 3 => _("Medium"), diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm index 0b330bfdd..96f383cd1 100644 --- a/perl-install/interactive_gtk.pm +++ b/perl-install/interactive_gtk.pm @@ -28,12 +28,12 @@ sub ask_from_listW { my $w = my_gtk->new(first(deref($title)), %$o); $w->{retval} = $def || $l->[0]; #- nearly especially for the X test case (see timeout in Xconfigurator.pm) - if (@$l < 5) { #- really ? : && sum(map { length $_ } @$l) < 90) { + if (@$l < 5) { my $defW; my $f = sub { $w->{retval} = $_[1]; Gtk->main_quit }; gtkadd($w->{window}, gtkpack(create_box_with_title($w, @$messages), - gtkadd((@$l < 3 ? create_hbox() : create_vbox()), + gtkadd(@$l < 3 && sum(map { length $_ } @$l) < 60 ? create_hbox() : create_vbox(), map { my $b = new Gtk::Button($_); $b->signal_connect(clicked => [ $f, $_ ]); diff --git a/perl-install/modules.pm b/perl-install/modules.pm index 70c551972..33f47a122 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -35,7 +35,8 @@ my @drivers_by_category = ( "depca" => "Digital DEPCA and EtherWORKS", "e2100" => "Cabletron E2100", "ewrk3" => "Digital EtherWORKS 3", - "tulip" => "Digital 21040 (Tulip)", + "old_tulip" => "Digital 21040/21041/21140 (old Tulip driver)", + "tulip" => "Digital 21040/21041/21140 (Tulip)", "de600" => "D-Link DE-600 pocket adapter", "de620" => "D-Link DE-620 pocket adapter", "dgrs" => "Digi International RightSwitch", diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 2596e8c74..31166e0ff 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -226,10 +226,13 @@ sub readCompssList($$$) { my $p = $e->{$name} or log::l("unknown entry $name (in compssList)"), next; $p->{values} = \@values; } + + my %done; foreach (split ':', $ENV{LANGUAGE}) { my $locales = "locales-" . substr($_, 0, 2); my $p = $packages->{$locales} or next; foreach ($locales, @{$p->{provides} || []}, @{$by_lang{$_} || []}) { + next if $done{$_}; $done{$_} = 1; my $p = $packages->{$_} or next; $p->{values} = [ map { $_ + 70 } @{$p->{values}} ]; } @@ -533,6 +536,10 @@ sub install($$$) { my ($prefix, $isUpgrade, $toInstall) = @_; my %packages; +#- foreach (@$toInstall) { +#- print "$_->{name}\n"; +#- } + return if $::g_auto_install; log::l("reading /usr/lib/rpm/rpmrc"); diff --git a/perl-install/share/compssList b/perl-install/share/compssList index 3479e5257..f87395607 100644 --- a/perl-install/share/compssList +++ b/perl-install/share/compssList @@ -61,7 +61,7 @@ compat-glibc 0 0 40 comsat 0 30 2 control-center 69 0 10 control-center-devel 10 0 10 -control-panel 60 0 54 +#control-panel 60 0 54 cpio 90 76 90 cpp 10 0 94 cproto 15 0 80 diff --git a/perl-install/standalone/XFdrake b/perl-install/standalone/XFdrake index 6b181d88a..b4b5b4e79 100755 --- a/perl-install/standalone/XFdrake +++ b/perl-install/standalone/XFdrake @@ -40,12 +40,12 @@ 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"; +my $in = vnew interactive('su'); + `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'); - my $i = $0 =~ Xdrakres ? Xconfig::getinfoFromXF86Config() : {}; Xconfig::getinfo($i); diff --git a/perl-install/standalone/draksec b/perl-install/standalone/draksec index 62ef6e3c2..1bd9cacb3 100755 --- a/perl-install/standalone/draksec +++ b/perl-install/standalone/draksec @@ -14,10 +14,10 @@ local $_ = join '', @ARGV; $::expert = /-expert/ || cat_("/etc/sysconfig/system") =~ /^TYPE="?expert/m; #" $::isStandalone = 1; -my $in = vnew interactive(); +my $in = vnew interactive('su'); my %m = reverse (my %l = ( - 0 => _("Windows(TM)"), + 0 => _("Welcome To Crackers"), 1 => _("Poor"), 2 => _("Low"), 3 => _("Medium"), |